refactor: Fix style in initTranslations() function

This commit is contained in:
Hennadii Stepanov 2022-06-21 13:40:45 +02:00
parent ad73447dc2
commit 8927bb8f06
No known key found for this signature in database
GPG key ID: 410108112E7EA81F

View file

@ -145,20 +145,24 @@ static void initTranslations(QTranslator &qtTranslatorBase, QTranslator &qtTrans
const QString translation_path{QLibraryInfo::path(QLibraryInfo::TranslationsPath)};
#endif
// Load e.g. qt_de.qm
if (qtTranslatorBase.load("qt_" + lang, translation_path))
if (qtTranslatorBase.load("qt_" + lang, translation_path)) {
QApplication::installTranslator(&qtTranslatorBase);
}
// Load e.g. qt_de_DE.qm
if (qtTranslator.load("qt_" + lang_territory, translation_path))
if (qtTranslator.load("qt_" + lang_territory, translation_path)) {
QApplication::installTranslator(&qtTranslator);
}
// Load e.g. bitcoin_de.qm (shortcut "de" needs to be defined in bitcoin.qrc)
if (translatorBase.load(lang, ":/translations/"))
if (translatorBase.load(lang, ":/translations/")) {
QApplication::installTranslator(&translatorBase);
}
// Load e.g. bitcoin_de_DE.qm (shortcut "de_DE" needs to be defined in bitcoin.qrc)
if (translator.load(lang_territory, ":/translations/"))
if (translator.load(lang_territory, ":/translations/")) {
QApplication::installTranslator(&translator);
}
}
static bool InitSettings()