Created attachment 46895 [details] Dialog that shows two Catalan entries The dialog should show Catalan and Catalan (Valencian).
Catalan (Valencian) (ca-xv) works fine. But there is something annoying: on the language selection menu on the options windows, shows «Catalan» twice, there is no difference for the «Catalan (Valencian)» and «Catalan», both are shown as «Catalan».
Assigned to myself.
Unfortunately this is not trivial to fix. It would be trivial to add Catalan (Valencian) to the language list: --- a/svtools/source/misc/langtab.src +++ b/svtools/source/misc/langtab.src @@ -78,6 +78,7 @@ StringArray STR_ARR_SVT_LANGUAGE_TABLE < "Bulgarian" ; LANGUAGE_BULGARIAN ; > ; < "Belarusian" ; LANGUAGE_BELARUSIAN ; > ; < "Catalan" ; LANGUAGE_CATALAN ; > ; + < "Catalan (Valencian)" ; LANGUAGE_USER_CATALAN_VALENCIAN ; > ; < "Chinese (traditional)" ; LANGUAGE_CHINESE_TRADITIONAL ; > ; < "Chinese (simplified)" ; LANGUAGE_CHINESE_SIMPLIFIED ; > ; < "Chinese (Hong Kong)" ; LANGUAGE_CHINESE_HONGKONG ; > ; But this string would never be called in, because in cui/source/options/optgdlg.cxx where the UI language selection listbox is implemented, there is a call to SvtLanguageTable::GetString (http://opengrok.libreoffice.org/xref/libs-gui/svtools/source/misc/langtab.cxx#141) which eventually calls MsLangId::getReplacementForObsoleteLanguage and it changes Catalan (Valencian) back to Catalan (http://opengrok.libreoffice.org/xref/libs-gui/i18npool/source/isolang/mslangid.cxx#463). It is because of the non-standard language code: ca-XV.
Thanks, Andras. I guess that an specific condition for ca-xv is somewhat we should not do. ISO-639 codes are just... :(
Been talking about spreading bcp47 strings etc around the place for quite a while now, maybe I'll get around to that this year.
*** Bug 43572 has been marked as a duplicate of this bug. ***
@András: Is the "BTW translation issue" visible in attachment for Bug 43572 part of the problem proceeded here or should I submit an additional bug for that?
Indeed internally ca-XV is mapped to ca-ES to not make it escape into document content where XV of the user-assigned ISO 3166 range would be invalid. For the UI localization to be distinguishable under Tools->Options->LanguageSettings->UserInterface this needed a special handling. Fixed on master http://cgit.freedesktop.org/libreoffice/core/commit/?id=8c736b8543ca3d36612270cb4ceb2ae0a7abe2e7 and 3-5 http://cgit.freedesktop.org/libreoffice/core/commit/?h=libreoffice-3-5&id=eea858f6c7696becab4e67ca00f5ee0293e63718