File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change 5656#include < map>
5757#include < fstream>
5858
59+ #include < boost/algorithm/string.hpp>
60+
5961#include " catalog.h"
6062#include " catalog_po.h"
6163#include " cat_update.h"
@@ -2679,6 +2681,24 @@ void PoeditFrame::UpdateTitle()
26792681 if (subtitle == " PROJECT VERSION" )
26802682 subtitle.clear ();
26812683
2684+ #if wxCHECK_VERSION(3,1,5)
2685+ if (m_catalog->GetLanguage ().IsValid ())
2686+ {
2687+ // add language to the subtitle, but only if not part of the filename already
2688+ auto lang = m_catalog->GetLanguage ().LanguageTag ();
2689+ if (!boost::algorithm::icontains (fpath.utf8_string (), lang))
2690+ {
2691+ boost::replace_all (lang, " -" , " _" );
2692+ if (!boost::algorithm::icontains (fpath.utf8_string (), lang))
2693+ {
2694+ if (!subtitle.empty ())
2695+ subtitle += L" • " ;
2696+ subtitle += m_catalog->GetLanguage ().DisplayName ();
2697+ }
2698+ }
2699+ }
2700+ #endif
2701+
26822702#ifdef __WXOSX__
26832703 if (@available (macOS 11.0 , *))
26842704 {
You can’t perform that action at this time.
0 commit comments