diff options
| author | LostDragonist <lost.dragonist@gmail.com> | 2019-04-13 21:17:27 -0500 |
|---|---|---|
| committer | LostDragonist <lost.dragonist@gmail.com> | 2019-04-13 21:17:27 -0500 |
| commit | 509def79c61f70799825f509473fe9fff1947dcd (patch) | |
| tree | 269c646f670c48c278d57860d6f38869630add72 /src | |
| parent | 379c60375c3be33cb102674550c7f7e4fa130277 (diff) | |
Improve ignoring of missing English translations
Why does the language code keep changing?!
Diffstat (limited to 'src')
| -rw-r--r-- | src/mainwindow.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 8066c59f..389e65ca 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -5048,9 +5048,9 @@ void MainWindow::installTranslator(const QString &name) QTranslator *translator = new QTranslator(this); QString fileName = name + "_" + m_CurrentLanguage; if (!translator->load(fileName, qApp->applicationDirPath() + "/translations")) { - if (m_CurrentLanguage.compare("en", Qt::CaseInsensitive)) { + if (m_CurrentLanguage.contains(QRegularExpression("^.*_(EN|en)(-.*)?$"))) { qDebug("localization file %s not found", qUtf8Printable(fileName)); - } // we don't actually expect localization files for English + } // we don't actually expect localization files for English (en, en-us, en-uk, and any variation thereof) } qApp->installTranslator(translator); |
