Commit c8d9f0ba authored by Alexandre Lision's avatar Alexandre Lision Committed by gerrit2

translations: fix wrong translations

Qt was nos taking into account english if another translated language was in
the system preferences list. We now check if english is defined as Primary
language.

Change-Id: Ia952778293a3942ea3aae9eae7c9da208d5e149e
Tuleap: #59
parent bf0385ee
......@@ -49,9 +49,16 @@ int main(int argc, const char *argv[]) {
app->setAttribute(Qt::AA_MacPluginApplication);
dir.cdUp();
//We need to check if primary language is an English variant (en, en-CA etc...) before installing a translator
NSString* lang = [[NSLocale preferredLanguages] objectAtIndex:0];
if (![lang containsString:@"en"]) {
QTranslator translator;
if (translator.load(QLocale::system(), "lrc", "_", dir.absolutePath()+"/Resources/QtTranslations")) {
app->installTranslator(&translator);
} else {
NSLog(@"Couldn't load qt translator");
}
}
CategorizedHistoryModel::instance()->addCollection<LocalHistoryCollection>(LoadOptions::FORCE_ENABLED);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment