Skip to content

Commit

Permalink
when loading translation catalog, do not ignore the return value
Browse files Browse the repository at this point in the history
Signed-off-by: Matthieu Gallien <[email protected]>
  • Loading branch information
mgallien committed Apr 5, 2024
1 parent e6f72d2 commit 003b40e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/gui/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1019,13 +1019,17 @@ void Application::setupTranslations()
if (!qtTranslator->load(qtTrFile, qtTrPath)) {
if (!qtTranslator->load(qtTrFile, trPath)) {
if (!qtTranslator->load(qtBaseTrFile, qtTrPath)) {
qtTranslator->load(qtBaseTrFile, trPath);
if (!qtTranslator->load(qtBaseTrFile, trPath)) {
qCDebug(lcApplication()) << "impossible to load Qt translation catalog" << qtBaseTrFile;
}
}
}
}
const QString qtkeychainTrFile = QLatin1String("qtkeychain_") + lang;
if (!qtkeychainTranslator->load(qtkeychainTrFile, qtTrPath)) {
qtkeychainTranslator->load(qtkeychainTrFile, trPath);
if (!qtkeychainTranslator->load(qtkeychainTrFile, trPath)) {
qCDebug(lcApplication()) << "impossible to load QtKeychain translation catalog" << qtkeychainTrFile;
}
}
if (!translator->isEmpty())
installTranslator(translator);
Expand Down

0 comments on commit 003b40e

Please sign in to comment.