diff --git a/src/edapp.cpp b/src/edapp.cpp index 5627d70b9a..21d08fbff5 100644 --- a/src/edapp.cpp +++ b/src/edapp.cpp @@ -47,6 +47,7 @@ #include #include +#include #include #include #include @@ -656,6 +657,17 @@ void PoeditApp::SetupOTALanguageUpdate(wxTranslations *trans, const wxString& la else langMO.Replace("-", "_"); +#if defined(__UNIX__) && !defined(__WXOSX__) + // GetBestTranslation() can fall back to the locale there, so check if we ship this translation + auto avail = trans->GetAvailableTranslations("poedit"); + if (std::find(avail.begin(), avail.end(), lang) == avail.end()) + { + langMO = lang.BeforeFirst('_'); + if (std::find(avail.begin(), avail.end(), langMO) == avail.end()) + return; + } +#endif + auto version = str::to_utf8(GetMajorAppVersion()); // use downloaded OTA translations: