From 509def79c61f70799825f509473fe9fff1947dcd Mon Sep 17 00:00:00 2001 From: LostDragonist Date: Sat, 13 Apr 2019 21:17:27 -0500 Subject: Improve ignoring of missing English translations Why does the language code keep changing?! --- src/mainwindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mainwindow.cpp') 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); -- cgit v1.3.1