mirror of
https://github.com/martinrotter/rssguard.git
synced 2025-01-24 14:41:23 +01:00
Better loggin when loading localizations.
This commit is contained in:
parent
1b4ea724c7
commit
bc089f615f
@ -41,13 +41,19 @@ void Localization::loadActiveLanguage() {
|
||||
QTranslator *app_translator = new QTranslator(qApp);
|
||||
QString desired_localization = desiredLanguage();
|
||||
|
||||
qDebug("Starting to load active localization. Desired localization is '%s'.", qPrintable(desired_localization));
|
||||
|
||||
if (app_translator->load(QLocale(desired_localization), "rssguard", QSL("-"), APP_LANG_PATH)) {
|
||||
Application::installTranslator(app_translator);
|
||||
qDebug("Application localization '%s' loaded successfully.", qPrintable(desired_localization));
|
||||
qDebug("Application localization '%s' loaded successfully, specifically sublocalization '%s' was loaded.",
|
||||
qPrintable(desired_localization),
|
||||
qPrintable(app_translator->translate("QObject", "LANG_ABBREV")));
|
||||
desired_localization = app_translator->translate("QObject", "LANG_ABBREV");
|
||||
}
|
||||
else {
|
||||
qWarning("Application localization '%s' was not loaded.", qPrintable(desired_localization));
|
||||
qWarning("Application localization '%s' was not loaded. Loading '%s' instead.",
|
||||
qPrintable(desired_localization),
|
||||
DEFAULT_LOCALE);
|
||||
desired_localization = DEFAULT_LOCALE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user