From: Flavio Tordini Date: Sat, 18 Sep 2010 13:20:06 +0000 (+0200) Subject: Prefer application dir translations to system ones X-Git-Tag: 1.2~15 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=07c3e5ea737b86b2a0b2041ad33278e915ce0e34;p=minitube Prefer application dir translations to system ones --- 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);