summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2023-01-05 18:12:59 +0100
committerEike Rathke <erack@redhat.com>2023-01-05 21:35:29 +0000
commit375630ae76f46c096421dfadee8d37b406bc10c5 (patch)
tree5ec5ceeb94123a3ede378ae362a0fe6178ac99a5 /include
parent2d1a0d86d2d0c00fcfee61c39f2221e786e4245b (diff)
Related: tdf#152781 Stab the 0xE40A {es} vs Latin America quirk
First, the LANGUAGE_SPANISH_LATIN_AMERICA 0xE40A is not a MS system LCID, it is Spanish 0x00a with sublanguage 0x39 => user defined (in the range 0x20 to 0x3f). Meanwhile MS reserved 0x580A for {es-419}, so obsolete the legacy 0xE40A definition and replace with 0x580A when encountered. Second, due to the legacy plain {es} mapping being present, an encountered 'es' (from our bundled dictionary extension) got mapped to 0xE40A instead of 0xA and thus was added to the character language listbox (that otherwise suppresses LCIDs without sublanguage), resulting in a "Spanish {es}" entry. Besides, it's currently not clear how to actually proceed with such dictionary situation when, for example, both 'es-ES' and 'es' dictionaries are present and the 'es' dictionary apparently is meant as base and contains entries the 'es-ES' does not or 'es-ES' overrides entries. It might be it's handled half-way in linguistics, but maybe not even that, I didn't investigate. Change-Id: Id859731ba5efa65d4a6de429b7f52027aa69327c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145093 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
Diffstat (limited to 'include')
-rw-r--r--include/i18nlangtag/lang.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/i18nlangtag/lang.h b/include/i18nlangtag/lang.h
index 158a7c7fe5be..59e20669cddd 100644
--- a/include/i18nlangtag/lang.h
+++ b/include/i18nlangtag/lang.h
@@ -389,7 +389,6 @@ namespace o3tl
#define LANGUAGE_SPANISH_EL_SALVADOR LanguageType(0x440A)
#define LANGUAGE_SPANISH_GUATEMALA LanguageType(0x100A)
#define LANGUAGE_SPANISH_HONDURAS LanguageType(0x480A)
-#define LANGUAGE_SPANISH_LATIN_AMERICA LanguageType(0xE40A) /* no locale possible */
#define LANGUAGE_SPANISH_MEXICAN LanguageType(0x080A)
#define LANGUAGE_SPANISH_MODERN LanguageType(0x0C0A)
#define LANGUAGE_SPANISH_NICARAGUA LanguageType(0x4C0A)
@@ -532,6 +531,8 @@ namespace o3tl
* that such a mapping exists in i18nlangtag/source/isolang/isolang.cxx, but
* mapping ISO back to LANGID will return the new value.
*/
+#define LANGUAGE_OBSOLETE_USER_SPANISH_LATIN_AMERICA LanguageType(0xE40A) /* no locale possible, legacy for es-419, makeLangID( 0x39, getPrimaryLanguage( LANGUAGE_SPANISH)) */
+#define LANGUAGE_SPANISH_LATIN_AMERICA LANGUAGE_es_419_reserved
#define LANGUAGE_OBSOLETE_USER_LATIN LanguageType(0x0610)
#define LANGUAGE_USER_LATIN LANGUAGE_LATIN
#define LANGUAGE_OBSOLETE_USER_LATIN_VATICAN LanguageType(0x8076) /* makeLangID( 0x20, getPrimaryLanguage( LANGUAGE_LATIN)) */