summaryrefslogtreecommitdiffstats
path: root/kdecore/klocale.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-12-11 03:46:01 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-12-11 03:46:01 +0000
commit865f314dd5ed55508f45a32973b709b79a541e36 (patch)
treedc1a3a884bb2fc10a89a3c46313897d22c5771eb /kdecore/klocale.cpp
parentce4a32fe52ef09d8f5ff1dd22c001110902b60a2 (diff)
downloadtdelibs-865f314dd5ed55508f45a32973b709b79a541e36.tar.gz
tdelibs-865f314dd5ed55508f45a32973b709b79a541e36.zip
kdelibs update to Trinity v3.5.11
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1061230 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdecore/klocale.cpp')
-rw-r--r--kdecore/klocale.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/kdecore/klocale.cpp b/kdecore/klocale.cpp
index 1ca1f035e..59981d4b1 100644
--- a/kdecore/klocale.cpp
+++ b/kdecore/klocale.cpp
@@ -76,6 +76,7 @@ public:
#ifdef Q_WS_WIN
char win32SystemEncoding[3+7]; //"cp " + lang ID
#endif
+ bool useMainCatalogue;
};
static KLocale *this_klocale = 0;
@@ -118,8 +119,13 @@ void KLocale::initMainCatalogues(const QString & catalog)
{
// Use the first non-null string.
QString mainCatalogue = catalog;
- if (maincatalogue)
- mainCatalogue = QString::fromLatin1(maincatalogue);
+
+ // don't use main catalogue if we're looking up .desktop translations
+ if (mainCatalogue.contains("desktop") == 0 || mainCatalogue.contains("kdesktop") == 1) {
+ if (maincatalogue) {
+ mainCatalogue = QString::fromLatin1(maincatalogue);
+ }
+ }
if (mainCatalogue.isEmpty()) {
kdDebug(173) << "KLocale instance created called without valid "
@@ -129,8 +135,11 @@ void KLocale::initMainCatalogues(const QString & catalog)
else {
// do not use insertCatalogue here, that would already trigger updateCatalogs
d->catalogNames.append( mainCatalogue ); // application catalog
- d->catalogNames.append( SYSTEM_MESSAGES ); // always include kdelibs.mo
- d->catalogNames.append( "kio" ); // always include kio.mo
+ if (mainCatalogue.contains("desktop") == 0 || mainCatalogue.contains("kdesktop") == 1) { //don't bother if we're looking up desktop translations
+ d->catalogNames.append( SYSTEM_MESSAGES ); // always include kdelibs.mo
+ d->catalogNames.append( "kio" ); // always include kio.mo
+ d->catalogNames.append( "xdg-user-dirs" );
+ }
updateCatalogues(); // evaluate this for all languages
}
}