# HG changeset patch # User Wuzzy # Date 1491522649 -7200 # Node ID 7df59356471e5813aa88edda565fadb2d574f0b9 # Parent 1eeb9a5b5b73282eb79fedc7c9c15cea51bc7e5d Fix name Scottish Gaelic being incorrectly displayed in language dropdown diff -r 1eeb9a5b5b73 -r 7df59356471e QTfrontend/ui/page/pageoptions.cpp --- a/QTfrontend/ui/page/pageoptions.cpp Fri Apr 07 01:41:30 2017 +0200 +++ b/QTfrontend/ui/page/pageoptions.cpp Fri Apr 07 01:50:49 2017 +0200 @@ -645,10 +645,20 @@ // Usually, we just print the language name entryName = loc.nativeLanguageName(); } - // Fallback code: If language name is empty for some reason, print locale identifier. This should normally not happen + // Fallback code, if language name is empty for some reason. This should normally not happen if(entryName.isEmpty()) { - entryName = tr("MISSING LANGUAGE NAME [%1]").arg(lname); + if(lname == "gd") + { + /* Workaround for Qt4: nativeLanguageName does not return correct name for Scottish Gaelic (QTBUG-59929), + so we have to add it ourselves :-/ */ + entryName = QString::fromUtf8("GĂ idhlig"); + } + else + { + // If all else fails, show error and the locale identifier + entryName = tr("MISSING LANGUAGE NAME [%1]").arg(lname); + } } CBLanguage->addItem(entryName, lname); }