From 07c3e5ea737b86b2a0b2041ad33278e915ce0e34 Mon Sep 17 00:00:00 2001 From: Flavio Tordini Date: Sat, 18 Sep 2010 15:20:06 +0200 Subject: [PATCH] Prefer application dir translations to system ones --- src/main.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 6e87178..ddb24a8 100755 --- a/src/main.cpp +++ b/src/main.cpp @@ -37,12 +37,11 @@ int main(int argc, char **argv) { #else QString dataDir = ""; #endif - QString localeDir = dataDir + QDir::separator() + "locale"; - // if app was not "installed" use the app directory + QString localeDir = qApp->applicationDirPath() + QDir::separator() + "locale"; if (!QFile::exists(localeDir)) { - localeDir = qApp->applicationDirPath() + QDir::separator() + "locale"; - // qDebug() << "Using locale dir" << localeDir << locale; + localeDir = dataDir + QDir::separator() + "locale"; } + // qDebug() << "Using locale dir" << localeDir << locale; QTranslator translator; translator.load(locale, localeDir); app.installTranslator(&translator); -- 2.39.5