https://bugs.kde.org/show_bug.cgi?id=509902
--- Comment #16 from Marcus Gama <[email protected]> --- (In reply to hanyoung from comment #15) > I think I have figured out what happened in kxmlgui. Specifically, this > block of code: > ``` > for (int i = 0; i < languagesList.count();) { > QString languageCode = languagesList[i]; > if (!KLocalizedString::isApplicationTranslatedInto(languageCode)) { > if (stripCountryCode(&languageCode)) { > if > (KLocalizedString::isApplicationTranslatedInto(languageCode)) { > languagesList[i] = languageCode; > ++i; > continue; > } > } > languagesList.removeAt(i); > } else { > ++i; > } > } > ``` > The languagesList is QList("pt_Latn_BR", "pt_BR", "pt_Latn", "pt"), we check > if the application has the translation for each language. > > I'm pretty sure we only have translations for "pt_BR" and "pt_PT". > Now, for the first language we check -- "pt_Latn_BR", we don't have > translation for that, so the function "stripCountryCode" is executed. > After stripping country code, the language becomes "pt", and we have > translation for "pt", so the first language in the list is "pt", the first > item in the list is used as primary language. > > The fault is in "stripCountryCode", this essentially turns "pt_Latn_BR" into > "pt". > > I'll come up with a fix tomorrow after work, since it's midnight here. Once again, thank you very much! -- You are receiving this mail because: You are watching all bug changes.
