Load translations from configured data path
This commit is contained in:
parent
cc0631f0b2
commit
ae2457da03
|
@ -305,6 +305,7 @@ bool MyApp::OnInit()
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxString dataDir = wxStandardPaths::Get().GetDataDir();
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
singleInstanceCheck = true;
|
singleInstanceCheck = true;
|
||||||
#else
|
#else
|
||||||
|
@ -315,6 +316,7 @@ bool MyApp::OnInit()
|
||||||
singleInstanceCheck = config->Read ( _T ( "singleInstanceCheck" ),
|
singleInstanceCheck = config->Read ( _T ( "singleInstanceCheck" ),
|
||||||
singleInstanceCheck );
|
singleInstanceCheck );
|
||||||
lang = config->Read ( _T ( "lang" ), systemLocale );
|
lang = config->Read ( _T ( "lang" ), systemLocale );
|
||||||
|
dataDir = config->Read ( _T ( "applicationDir" ), dataDir );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -345,8 +347,8 @@ bool MyApp::OnInit()
|
||||||
prefixes.Add ( _T ( "/usr/share/locale-langpack" ) );
|
prefixes.Add ( _T ( "/usr/share/locale-langpack" ) );
|
||||||
prefixes.Add ( _T ( "/usr/local/share/locale" ) );
|
prefixes.Add ( _T ( "/usr/local/share/locale" ) );
|
||||||
#endif
|
#endif
|
||||||
wxString poDir = wxStandardPaths::Get().GetDataDir() +
|
wxString poDir = dataDir + wxFileName::GetPathSeparator() + _T ( "po" )
|
||||||
wxFileName::GetPathSeparator() + _T ( "po" ) + wxFileName::GetPathSeparator();
|
+ wxFileName::GetPathSeparator();
|
||||||
prefixes.Add ( poDir );
|
prefixes.Add ( poDir );
|
||||||
for ( size_t i = 0; i < prefixes.Count(); )
|
for ( size_t i = 0; i < prefixes.Count(); )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue