Related: tdf#147390 Accept oc-FR-lengadoc and oc-ES-aranes for oc-FR and oc-ES
... as aliases for forward compatibility with the change in LO 7.4
Change-Id: I13848f982a0c76abd8e2186d81bbfc9770c89a7d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135473
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
diff --git a/i18nlangtag/qa/cppunit/test_languagetag.cxx b/i18nlangtag/qa/cppunit/test_languagetag.cxx
index 84e363d..7b875c5 100644
--- a/i18nlangtag/qa/cppunit/test_languagetag.cxx
+++ b/i18nlangtag/qa/cppunit/test_languagetag.cxx
@@ -749,6 +749,8 @@ bool checkMapping( std::u16string_view rStr1, std::u16string_view rStr2 )
if (rStr1 == u"cmn-CN" ) return rStr2 == u"zh-CN";
if (rStr1 == u"cmn-TW" ) return rStr2 == u"zh-TW";
if (rStr1 == u"kw-UK" ) return rStr2 == u"kw-GB";
if (rStr1 == u"oc-FR-lengadoc" ) return rStr2 == u"oc-FR";
if (rStr1 == u"oc-ES-aranes" ) return rStr2 == u"oc-ES";
return rStr1 == rStr2;
}
diff --git a/i18nlangtag/source/isolang/isolang.cxx b/i18nlangtag/source/isolang/isolang.cxx
index 5d0a23c..2a7a467 100644
--- a/i18nlangtag/source/isolang/isolang.cxx
+++ b/i18nlangtag/source/isolang/isolang.cxx
@@ -778,6 +778,8 @@ Bcp47CountryEntry const aImplBcp47CountryEntries[] =
{ LANGUAGE_USER_ENGLISH_UK_OED, "en-GB-oed", "GB", "", LANGUAGE_USER_ENGLISH_UK_OXENDICT }, // grandfathered, deprecated, prefer en-GB-oxendict
{ LANGUAGE_SPANISH_DATED, "es-ES-u-co-trad", "ES", "es-u-co-trad", k0 }, // RFC6067/CLDR
{ LANGUAGE_SPANISH_DATED, "es-ES_tradnl", "ES", "", kSAME }, // MS malformed
{ LANGUAGE_OCCITAN_FRANCE, "oc-FR-lengadoc", "FR", "oc-lengadoc", kSAME }, // forward compatibility
{ LANGUAGE_USER_OCCITAN_ARANESE, "oc-ES-aranes", "ES", "oc-aranes", kSAME }, // forward compatibility
// { LANGUAGE_YUE_CHINESE_HONGKONG, "zh-yue-HK", "HK", "", 0 }, // MS reserved, prefer yue-HK; do not add unless LanguageTag::simpleExtract() can handle it to not call liblangtag for rsc!
{ LANGUAGE_YIDDISH, "yi-001", "", "", k0 }, // MS since rev.15, was "yi-Hebr" reserved, "001"="World"
{ LANGUAGE_FRENCH_WEST_INDIES, "fr-029", "", "", k0 }, // MS since rev.15, was "Neither defined nor reserved", "029"="Caribbean"