diff options
Diffstat (limited to 'src/kvilib/system')
| -rw-r--r-- | src/kvilib/system/kvi_locale.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/kvilib/system/kvi_locale.cpp b/src/kvilib/system/kvi_locale.cpp index 33c21c33..29794ac7 100644 --- a/src/kvilib/system/kvi_locale.cpp +++ b/src/kvilib/system/kvi_locale.cpp @@ -859,7 +859,8 @@ namespace KviLocale TQString szBuffer; - if(findCatalogue(szBuffer,name,szLocaleDir)) + TQString catalog_name = TQString("kvirc-" + name); + if(findCatalogue(szBuffer,catalog_name,szLocaleDir)) { KviMessageCatalogue * c = new KviMessageCatalogue(); if(c->load(szBuffer)) @@ -885,7 +886,7 @@ namespace KviLocale TQString szLocDir = szLocaleDir; KviTQString::ensureLastCharIs(szLocDir,KVI_PATH_SEPARATOR_CHAR); - KviTQString::sprintf(szBuffer,"%Q%Q_%s.mo",&szLocDir,&name,szLocale.ptr()); + KviTQString::sprintf(szBuffer,"%Q%s/LC_MESSAGES/%Q.mo",&szLocDir,szLocale.ptr(),&name); if(KviFileUtils::fileExists(szBuffer))return true; @@ -895,7 +896,7 @@ namespace KviLocale // kill them szLocale.cutFromFirst('.'); - KviTQString::sprintf(szBuffer,"%Q%Q_%s.mo",&szLocDir,&name,szLocale.ptr()); + KviTQString::sprintf(szBuffer,"%Q%s/LC_MESSAGES/%Q.mo",&szLocDir,szLocale.ptr(),&name); if(KviFileUtils::fileExists(szBuffer))return true; } @@ -904,7 +905,7 @@ namespace KviLocale // things like @euro ? // kill them szLocale.cutFromFirst('@'); - KviTQString::sprintf(szBuffer,"%Q%Q_%s.mo",&szLocDir,&name,szLocale.ptr()); + KviTQString::sprintf(szBuffer,"%Q%s/LC_MESSAGES/%Q.mo",&szLocDir,szLocale.ptr(),&name); if(KviFileUtils::fileExists(szBuffer))return true; } @@ -913,13 +914,13 @@ namespace KviLocale // things like en_GB // kill them szLocale.cutFromFirst('_'); - KviTQString::sprintf(szBuffer,"%Q%Q_%s.mo",&szLocDir,&name,szLocale.ptr()); + KviTQString::sprintf(szBuffer,"%Q%s/LC_MESSAGES/%Q.mo",&szLocDir,szLocale.ptr(),&name); if(KviFileUtils::fileExists(szBuffer))return true; } // try the lower case version too szLocale.toLower(); - KviTQString::sprintf(szBuffer,"%Q%Q_%s.mo",&szLocDir,&name,szLocale.ptr()); + KviTQString::sprintf(szBuffer,"%Q%s/LC_MESSAGES/%Q.mo",&szLocDir,szLocale.ptr(),&name); if(KviFileUtils::fileExists(szBuffer))return true; return false; @@ -928,11 +929,11 @@ namespace KviLocale // // This function attempts to determine the current locale // and then load the corresponding translation file - // from the KVIrc locale directory + // from the system locale directory // Returns true if the locale was correctly set // i.e. the locale is C or POSIX (no translation needed) // or the locale is correctly defined and the - // translation map was sucesfully loaded + // translation map was successfully loaded // void init(TQApplication * app,const TQString &localeDir) @@ -953,7 +954,6 @@ namespace KviLocale if(g_szLang.isEmpty())g_szLang = "en"; g_szLang.stripWhiteSpace(); - // the main catalogue is supposed to be kvirc_<language>.mo g_pMainCatalogue = new KviMessageCatalogue(); // the catalogue dict g_pCatalogueDict = new KviPointerHashTable<const char *,KviMessageCatalogue>; |
