diff options
author | Eike Rathke <erack@redhat.com> | 2017-09-05 15:30:03 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2017-09-05 15:41:01 +0200 |
commit | 750991d454f60d5718e17cbdcdeb4a438adfe6ab (patch) | |
tree | ab052ef3d7d8ad76081ab6e834583b510b128d03 /i18nlangtag/source | |
parent | 93f490887c837c8a81b035d4c404da186a9bc9a2 (diff) |
Map MS malformed es-ES_tradnl to proper BCP 47 es-ES-u-co-trad, tdf#83190
See
BCP 47 Extension U
https://tools.ietf.org/html/rfc6067
and
http://www.unicode.org/repos/cldr/tags/latest/common/bcp47/collation.xml
http://www.unicode.org/repos/cldr/trunk/common/bcp47/collation.xml
Change-Id: I2b946ab00c2efdc1a877a5e6ce91bc703bcd9db0
Diffstat (limited to 'i18nlangtag/source')
-rw-r--r-- | i18nlangtag/source/isolang/isolang.cxx | 3 | ||||
-rw-r--r-- | i18nlangtag/source/isolang/mslangid.cxx | 5 |
2 files changed, 2 insertions, 6 deletions
diff --git a/i18nlangtag/source/isolang/isolang.cxx b/i18nlangtag/source/isolang/isolang.cxx index 602ec4447bbd..cee528e5ebde 100644 --- a/i18nlangtag/source/isolang/isolang.cxx +++ b/i18nlangtag/source/isolang/isolang.cxx @@ -180,7 +180,6 @@ static IsoLanguageCountryEntry const aImplIsoLangEntries[] = { LANGUAGE_ITALIAN, "it", "IT", k0 }, { LANGUAGE_DUTCH, "nl", "NL", k0 }, { LANGUAGE_SPANISH_MODERN, "es", "ES", k0 }, - { LANGUAGE_SPANISH_DATED, "es", "ES", k0 }, { LANGUAGE_PORTUGUESE, "pt", "PT", k0 }, { LANGUAGE_PORTUGUESE_BRAZILIAN, "pt", "BR", k0 }, { LANGUAGE_DANISH, "da", "DK", k0 }, @@ -763,6 +762,8 @@ static Bcp47CountryEntry const aImplBcp47CountryEntries[] = { LANGUAGE_OBSOLETE_USER_CATALAN_VALENCIAN, "ca-ES-valencia", "ES", "", k0 }, // In case MS format files using the old value escaped into the wild, map them back. { LANGUAGE_USER_ENGLISH_UK_OXENDICT, "en-GB-oxendict", "GB", "", k0 }, { 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_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_DONTKNOW, "", "", "", k0 } // marks end of table }; diff --git a/i18nlangtag/source/isolang/mslangid.cxx b/i18nlangtag/source/isolang/mslangid.cxx index 41231f8a7e1b..25e5a4109e7d 100644 --- a/i18nlangtag/source/isolang/mslangid.cxx +++ b/i18nlangtag/source/isolang/mslangid.cxx @@ -539,11 +539,6 @@ LanguageType MsLangId::getReplacementForObsoleteLanguage( LanguageType nLang ) else if (nLang == LANGUAGE_NORWEGIAN) nLang = LANGUAGE_NORWEGIAN_BOKMAL; - // #i94435# A Spanish variant that differs only in collation details we - // do not support. - else if (nLang == LANGUAGE_SPANISH_DATED) - nLang = LANGUAGE_SPANISH_MODERN; - // The erroneous Tibetan vs. Dzongkha case, #i53497# // We (and MS) have stored LANGUAGE_TIBETAN_BHUTAN. This will need // special attention if MS one day decides to actually use |