i18nlangtag/source/isolang/isolang.cxx | 2 +- i18npool/source/localedata/LocaleNode.cxx | 22 +++++++++++++++++----- i18npool/source/localedata/data/de_CH.xml | 3 --- i18npool/source/localedata/data/es_AR.xml | 3 --- i18npool/source/localedata/data/es_BO.xml | 3 --- i18npool/source/localedata/data/es_CL.xml | 3 --- i18npool/source/localedata/data/es_CO.xml | 3 --- i18npool/source/localedata/data/es_DO.xml | 3 --- i18npool/source/localedata/data/es_EC.xml | 3 --- i18npool/source/localedata/data/es_GT.xml | 3 --- i18npool/source/localedata/data/es_HN.xml | 3 --- i18npool/source/localedata/data/es_MX.xml | 3 --- i18npool/source/localedata/data/es_NI.xml | 3 --- i18npool/source/localedata/data/es_PA.xml | 3 --- i18npool/source/localedata/data/es_PE.xml | 3 --- i18npool/source/localedata/data/es_PR.xml | 3 --- i18npool/source/localedata/data/es_PY.xml | 3 --- i18npool/source/localedata/data/es_SV.xml | 3 --- i18npool/source/localedata/data/es_UY.xml | 3 --- i18npool/source/localedata/data/es_VE.xml | 3 --- i18npool/source/localedata/data/fr_BE.xml | 3 --- i18npool/source/localedata/data/fr_CA.xml | 3 --- i18npool/source/localedata/data/fr_CH.xml | 3 --- i18npool/source/localedata/data/lt_LT.xml | 3 --- i18npool/source/localedata/data/rw_RW.xml | 3 --- i18npool/source/localedata/data/sk_SK.xml | 3 --- i18npool/source/localedata/data/uk_UA.xml | 3 --- include/i18nlangtag/lang.h | 1 - 28 files changed, 18 insertions(+), 82 deletions(-)
New commits: commit 77682c94993193604699079a9325a6dcb32bf965 Author: Eike Rathke <er...@redhat.com> Date: Wed Sep 4 19:17:41 2013 +0200 better error-checking for Language,Country,Variant Change-Id: I4e4f896ca9af8be7118fc868d57f9e2fa6102d74 diff --git a/i18npool/source/localedata/LocaleNode.cxx b/i18npool/source/localedata/LocaleNode.cxx index 4c49121..1c654b0 100644 --- a/i18npool/source/localedata/LocaleNode.cxx +++ b/i18npool/source/localedata/LocaleNode.cxx @@ -340,25 +340,37 @@ void LCInfoNode::generateCode (const OFileWriter &of) const const LocaleNode * countryNode = findNode("Country"); const LocaleNode * variantNode = findNode("Variant"); + OUString aLanguage; + if (languageNode) { - writeParameterCheckLen( of, "langID", languageNode->getChildAt(0), 2, -1); + aLanguage = languageNode->getChildAt(0)->getValue(); + if (!(aLanguage.getLength() == 2 || aLanguage.getLength() == 3)) + incErrorStr( "langID not 2-3 characters", aLanguage); + of.writeParameter("langID", aLanguage); of.writeParameter("langDefaultName", languageNode->getChildAt(1)->getValue()); } else incError( "No Language node."); if (countryNode) { - of.writeParameter("countryID", countryNode->getChildAt(0)->getValue()); + OUString aCountry( countryNode->getChildAt(0)->getValue()); + if (!(aCountry.isEmpty() || aCountry.getLength() == 2)) + incErrorStr( "countryID not empty or more than 2 characters", aCountry); + of.writeParameter("countryID", aCountry); of.writeParameter("countryDefaultName", countryNode->getChildAt(1)->getValue()); } else incError( "No Country node."); if (variantNode) { - of.writeParameter("Variant", variantNode->getValue()); - fprintf( stderr, "Warning: %s\n", - "Variants are not supported by application."); + // If given Variant must be at least ll-Ssss and language must be 'qlt' + OUString aVariant( variantNode->getValue()); + if (!(aVariant.isEmpty() || (aVariant.getLength() >= 7 && aVariant.indexOf('-')))) + incErrorStr( "invalid Variant", aVariant); + if (!(aVariant.isEmpty() || aLanguage == "qlt")) + incErrorStrStr( "Variant '%s' given but Language '%s' is not 'qlt'", aVariant, aLanguage); + of.writeParameter("Variant", aVariant); } else of.writeParameter("Variant", OUString()); commit e2da56a909ec435e3293da910ec605923a7206ee Author: Eike Rathke <er...@redhat.com> Date: Wed Sep 4 18:30:10 2013 +0200 removed unused Platform element Change-Id: If1bb51a69e099e112cce32b8219688b17befa3a3 diff --git a/i18npool/source/localedata/data/de_CH.xml b/i18npool/source/localedata/data/de_CH.xml index 245e57b..d88a407 100644 --- a/i18npool/source/localedata/data/de_CH.xml +++ b/i18npool/source/localedata/data/de_CH.xml @@ -27,9 +27,6 @@ <CountryID>CH</CountryID> <DefaultName>Switzerland</DefaultName> </Country> - <Platform> - <PlatformID>generic</PlatformID> - </Platform> </LC_INFO> <LC_CTYPE> <Separators> diff --git a/i18npool/source/localedata/data/es_AR.xml b/i18npool/source/localedata/data/es_AR.xml index cca8279..f376cc0 100644 --- a/i18npool/source/localedata/data/es_AR.xml +++ b/i18npool/source/localedata/data/es_AR.xml @@ -27,9 +27,6 @@ <CountryID>AR</CountryID> <DefaultName>Argentina</DefaultName> </Country> - <Platform> - <PlatformID>generic</PlatformID> - </Platform> </LC_INFO> <LC_CTYPE> <Separators> diff --git a/i18npool/source/localedata/data/es_BO.xml b/i18npool/source/localedata/data/es_BO.xml index f4e13b3..08f14f8 100644 --- a/i18npool/source/localedata/data/es_BO.xml +++ b/i18npool/source/localedata/data/es_BO.xml @@ -27,9 +27,6 @@ <CountryID>BO</CountryID> <DefaultName>Bolivia</DefaultName> </Country> - <Platform> - <PlatformID>generic</PlatformID> - </Platform> </LC_INFO> <LC_CTYPE> <Separators> diff --git a/i18npool/source/localedata/data/es_CL.xml b/i18npool/source/localedata/data/es_CL.xml index d3593d8..fd48b5b 100644 --- a/i18npool/source/localedata/data/es_CL.xml +++ b/i18npool/source/localedata/data/es_CL.xml @@ -27,9 +27,6 @@ <CountryID>CL</CountryID> <DefaultName>Chile</DefaultName> </Country> - <Platform> - <PlatformID>generic</PlatformID> - </Platform> </LC_INFO> <LC_CTYPE> <Separators> diff --git a/i18npool/source/localedata/data/es_CO.xml b/i18npool/source/localedata/data/es_CO.xml index 4817607..c5df7d2 100644 --- a/i18npool/source/localedata/data/es_CO.xml +++ b/i18npool/source/localedata/data/es_CO.xml @@ -27,9 +27,6 @@ <CountryID>CO</CountryID> <DefaultName>Colombia</DefaultName> </Country> - <Platform> - <PlatformID>generic</PlatformID> - </Platform> </LC_INFO> <LC_CTYPE> <Separators> diff --git a/i18npool/source/localedata/data/es_DO.xml b/i18npool/source/localedata/data/es_DO.xml index cd3fa86..4f29820 100644 --- a/i18npool/source/localedata/data/es_DO.xml +++ b/i18npool/source/localedata/data/es_DO.xml @@ -27,9 +27,6 @@ <CountryID>DO</CountryID> <DefaultName>Dominican Republic</DefaultName> </Country> - <Platform> - <PlatformID>generic</PlatformID> - </Platform> </LC_INFO> <LC_CTYPE unoid="generic"> <Separators> diff --git a/i18npool/source/localedata/data/es_EC.xml b/i18npool/source/localedata/data/es_EC.xml index 98927d4..a15d08d 100644 --- a/i18npool/source/localedata/data/es_EC.xml +++ b/i18npool/source/localedata/data/es_EC.xml @@ -27,9 +27,6 @@ <CountryID>EC</CountryID> <DefaultName>Ecuador</DefaultName> </Country> - <Platform> - <PlatformID>generic</PlatformID> - </Platform> </LC_INFO> <LC_CTYPE> <Separators> diff --git a/i18npool/source/localedata/data/es_GT.xml b/i18npool/source/localedata/data/es_GT.xml index 6106237..380f55f 100644 --- a/i18npool/source/localedata/data/es_GT.xml +++ b/i18npool/source/localedata/data/es_GT.xml @@ -27,9 +27,6 @@ <CountryID>GT</CountryID> <DefaultName>Guatemala</DefaultName> </Country> - <Platform> - <PlatformID>generic</PlatformID> - </Platform> </LC_INFO> <LC_CTYPE unoid="generic"> <Separators> diff --git a/i18npool/source/localedata/data/es_HN.xml b/i18npool/source/localedata/data/es_HN.xml index 8e20800..38e3040 100644 --- a/i18npool/source/localedata/data/es_HN.xml +++ b/i18npool/source/localedata/data/es_HN.xml @@ -27,9 +27,6 @@ <CountryID>HN</CountryID> <DefaultName>Honduras</DefaultName> </Country> - <Platform> - <PlatformID>generic</PlatformID> - </Platform> </LC_INFO> <LC_CTYPE ref="es_NI"/> <LC_FORMAT ref="es_DO" replaceTo="[$L-480A]"/> diff --git a/i18npool/source/localedata/data/es_MX.xml b/i18npool/source/localedata/data/es_MX.xml index a3a2ff6..a024cfe 100644 --- a/i18npool/source/localedata/data/es_MX.xml +++ b/i18npool/source/localedata/data/es_MX.xml @@ -27,9 +27,6 @@ <CountryID>MX</CountryID> <DefaultName>Mexico</DefaultName> </Country> - <Platform> - <PlatformID>generic</PlatformID> - </Platform> </LC_INFO> <LC_CTYPE ref="es_DO"/> <LC_FORMAT ref="es_DO" replaceTo="[$$-80A]"/> diff --git a/i18npool/source/localedata/data/es_NI.xml b/i18npool/source/localedata/data/es_NI.xml index e385b87..bbf16292 100644 --- a/i18npool/source/localedata/data/es_NI.xml +++ b/i18npool/source/localedata/data/es_NI.xml @@ -27,9 +27,6 @@ <CountryID>NI</CountryID> <DefaultName>Nicaragua</DefaultName> </Country> - <Platform> - <PlatformID>generic</PlatformID> - </Platform> </LC_INFO> <LC_CTYPE unoid="generic"> <Separators> diff --git a/i18npool/source/localedata/data/es_PA.xml b/i18npool/source/localedata/data/es_PA.xml index 431e920..bec5962 100644 --- a/i18npool/source/localedata/data/es_PA.xml +++ b/i18npool/source/localedata/data/es_PA.xml @@ -27,9 +27,6 @@ <CountryID>PA</CountryID> <DefaultName>Panama</DefaultName> </Country> - <Platform> - <PlatformID>generic</PlatformID> - </Platform> </LC_INFO> <LC_CTYPE ref="es_DO"/> <LC_FORMAT ref="es_GT" replaceTo="[$B/.-180A]"/> diff --git a/i18npool/source/localedata/data/es_PE.xml b/i18npool/source/localedata/data/es_PE.xml index a0a9bc4..e2a60d7 100644 --- a/i18npool/source/localedata/data/es_PE.xml +++ b/i18npool/source/localedata/data/es_PE.xml @@ -27,9 +27,6 @@ <CountryID>PE</CountryID> <DefaultName>Peru</DefaultName> </Country> - <Platform> - <PlatformID>generic</PlatformID> - </Platform> </LC_INFO> <LC_CTYPE unoid="generic"> <Separators> diff --git a/i18npool/source/localedata/data/es_PR.xml b/i18npool/source/localedata/data/es_PR.xml index a77073e..a1e29c4 100644 --- a/i18npool/source/localedata/data/es_PR.xml +++ b/i18npool/source/localedata/data/es_PR.xml @@ -27,9 +27,6 @@ <CountryID>PR</CountryID> <DefaultName>Puerto Rico</DefaultName> </Country> - <Platform> - <PlatformID>generic</PlatformID> - </Platform> </LC_INFO> <LC_CTYPE ref="es_NI"/> <LC_FORMAT ref="es_GT" replaceTo="[$$-500A] "/> diff --git a/i18npool/source/localedata/data/es_PY.xml b/i18npool/source/localedata/data/es_PY.xml index acbc1ec..2121d6b 100644 --- a/i18npool/source/localedata/data/es_PY.xml +++ b/i18npool/source/localedata/data/es_PY.xml @@ -27,9 +27,6 @@ <CountryID>PY</CountryID> <DefaultName>Paraguay</DefaultName> </Country> - <Platform> - <PlatformID>generic</PlatformID> - </Platform> </LC_INFO> <LC_CTYPE ref="es_AR"/> <LC_FORMAT ref="es_AR" replaceTo="[$G-3C0A]"/> diff --git a/i18npool/source/localedata/data/es_SV.xml b/i18npool/source/localedata/data/es_SV.xml index 4740930..c8ba2d2 100644 --- a/i18npool/source/localedata/data/es_SV.xml +++ b/i18npool/source/localedata/data/es_SV.xml @@ -27,9 +27,6 @@ <CountryID>SV</CountryID> <DefaultName>El Salvador</DefaultName> </Country> - <Platform> - <PlatformID>generic</PlatformID> - </Platform> </LC_INFO> <LC_CTYPE ref="es_NI"/> <LC_FORMAT ref="es_BO" replaceTo="[$C-440A]"/> diff --git a/i18npool/source/localedata/data/es_UY.xml b/i18npool/source/localedata/data/es_UY.xml index faf31e3..b993c32 100644 --- a/i18npool/source/localedata/data/es_UY.xml +++ b/i18npool/source/localedata/data/es_UY.xml @@ -27,9 +27,6 @@ <CountryID>UY</CountryID> <DefaultName>Uruguay</DefaultName> </Country> - <Platform> - <PlatformID>generic</PlatformID> - </Platform> </LC_INFO> <LC_CTYPE unoid="generic"> <Separators> diff --git a/i18npool/source/localedata/data/es_VE.xml b/i18npool/source/localedata/data/es_VE.xml index 532a3d8..8ec69d9 100644 --- a/i18npool/source/localedata/data/es_VE.xml +++ b/i18npool/source/localedata/data/es_VE.xml @@ -27,9 +27,6 @@ <CountryID>VE</CountryID> <DefaultName>Venezuela</DefaultName> </Country> - <Platform> - <PlatformID>generic</PlatformID> - </Platform> </LC_INFO> <LC_CTYPE ref="es_AR"/> <LC_FORMAT ref="es_AR" replaceTo="[$Bs-200A]"/> diff --git a/i18npool/source/localedata/data/fr_BE.xml b/i18npool/source/localedata/data/fr_BE.xml index 8b23d93..0c8de19 100644 --- a/i18npool/source/localedata/data/fr_BE.xml +++ b/i18npool/source/localedata/data/fr_BE.xml @@ -27,9 +27,6 @@ <CountryID>BE</CountryID> <DefaultName>Belgium</DefaultName> </Country> - <Platform> - <PlatformID>generic</PlatformID> - </Platform> </LC_INFO> <LC_CTYPE> <Separators> diff --git a/i18npool/source/localedata/data/fr_CA.xml b/i18npool/source/localedata/data/fr_CA.xml index b76c6e9..cb31be9 100644 --- a/i18npool/source/localedata/data/fr_CA.xml +++ b/i18npool/source/localedata/data/fr_CA.xml @@ -27,9 +27,6 @@ <CountryID>CA</CountryID> <DefaultName>Canada</DefaultName> </Country> - <Platform> - <PlatformID>generic</PlatformID> - </Platform> </LC_INFO> <LC_CTYPE> <Separators> diff --git a/i18npool/source/localedata/data/fr_CH.xml b/i18npool/source/localedata/data/fr_CH.xml index 0a2ccc6..1c3611d 100644 --- a/i18npool/source/localedata/data/fr_CH.xml +++ b/i18npool/source/localedata/data/fr_CH.xml @@ -27,9 +27,6 @@ <CountryID>CH</CountryID> <DefaultName>Switzerland</DefaultName> </Country> - <Platform> - <PlatformID>generic</PlatformID> - </Platform> </LC_INFO> <LC_CTYPE> <Separators> diff --git a/i18npool/source/localedata/data/lt_LT.xml b/i18npool/source/localedata/data/lt_LT.xml index 2389104..a7f8717 100644 --- a/i18npool/source/localedata/data/lt_LT.xml +++ b/i18npool/source/localedata/data/lt_LT.xml @@ -27,9 +27,6 @@ <CountryID>LT</CountryID> <DefaultName>Lithuania</DefaultName> </Country> - <Platform> - <PlatformID>generic</PlatformID> - </Platform> </LC_INFO> <LC_CTYPE> <Separators> diff --git a/i18npool/source/localedata/data/rw_RW.xml b/i18npool/source/localedata/data/rw_RW.xml index 700746b..bddd4c6 100644 --- a/i18npool/source/localedata/data/rw_RW.xml +++ b/i18npool/source/localedata/data/rw_RW.xml @@ -27,9 +27,6 @@ <CountryID>RW</CountryID> <DefaultName>Rwanda</DefaultName> </Country> - <Platform> - <PlatformID>generic</PlatformID> - </Platform> </LC_INFO> <LC_CTYPE unoid="generic"> <Separators> diff --git a/i18npool/source/localedata/data/sk_SK.xml b/i18npool/source/localedata/data/sk_SK.xml index 21ecbea..20b7cc0 100644 --- a/i18npool/source/localedata/data/sk_SK.xml +++ b/i18npool/source/localedata/data/sk_SK.xml @@ -27,9 +27,6 @@ <CountryID>SK</CountryID> <DefaultName>Slovak Republic</DefaultName> </Country> - <Platform> - <PlatformID>generic</PlatformID> - </Platform> </LC_INFO> <LC_CTYPE unoid="generic"> <Separators> diff --git a/i18npool/source/localedata/data/uk_UA.xml b/i18npool/source/localedata/data/uk_UA.xml index 6b6951b..cdf01a6 100644 --- a/i18npool/source/localedata/data/uk_UA.xml +++ b/i18npool/source/localedata/data/uk_UA.xml @@ -27,9 +27,6 @@ <CountryID>UA</CountryID> <DefaultName>Ukraine</DefaultName> </Country> - <Platform> - <PlatformID>generic</PlatformID> - </Platform> </LC_INFO> <LC_CTYPE unoid="generic"> <Separators> commit 82254f22827cffd502b6f12be038d48ed8da10c7 Author: Eike Rathke <er...@redhat.com> Date: Wed Sep 4 17:41:32 2013 +0200 added comment about ca-ES-valencia precedence Change-Id: I61b9dc4dc21a1688d4f3fc71b6ad394dcdbab2b7 diff --git a/i18nlangtag/source/isolang/isolang.cxx b/i18nlangtag/source/isolang/isolang.cxx index a8dde16..4e9a343 100644 --- a/i18nlangtag/source/isolang/isolang.cxx +++ b/i18nlangtag/source/isolang/isolang.cxx @@ -322,6 +322,7 @@ static IsoLanguageCountryEntry const aImplIsoLangEntries[] = { LANGUAGE_BELARUSIAN, "be", "BY" }, { LANGUAGE_CATALAN, "ca", "ES" }, // Spain (default) { LANGUAGE_CATALAN, "ca", "AD" }, // Andorra + //LANGUAGE_CATALAN_VALENCIAN ca-ES-valencia Bcp47CountryEntry takes precedence { LANGUAGE_CATALAN_VALENCIAN, "ca", "XV" }, // XV: ISO 3166 user-assigned; old workaround for UI localization only, in case it escaped to document content { LANGUAGE_CATALAN_VALENCIAN, "qcv", "ES" }, // qcv: ISO 639-3 reserved-for-local-use; old UI localization quirk only, in case it escaped to document content { LANGUAGE_FRENCH_CAMEROON, "fr", "CM" }, commit 6cd33c4adf4e7213abbfd2fe5876914ce54ad0ad Author: Eike Rathke <er...@redhat.com> Date: Wed Sep 4 16:58:32 2013 +0200 ditched LANGUAGE_SERBIAN 'sr' primary-only Change-Id: Iac72f57815068767e25c3f7bb95ee402745ba579 diff --git a/i18nlangtag/source/isolang/isolang.cxx b/i18nlangtag/source/isolang/isolang.cxx index 53e6126..a8dde16 100644 --- a/i18nlangtag/source/isolang/isolang.cxx +++ b/i18nlangtag/source/isolang/isolang.cxx @@ -280,7 +280,6 @@ static IsoLanguageCountryEntry const aImplIsoLangEntries[] = { LANGUAGE_SERBIAN_CYRILLIC, "sr", "CS" }, // alias to be able to integrate localizations, rsc needs it { LANGUAGE_USER_SERBIAN_CYRILLIC_MONTENEGRO, "sr", "ME" }, { LANGUAGE_SERBIAN_CYRILLIC_BOSNIA_HERZEGOVINA, "sr", "BA" }, - { LANGUAGE_SERBIAN, "sr", "" }, // SERBIAN is only LID, MS-LCID not defined (was dupe of CROATIAN) { LANGUAGE_USER_SERBIAN_LATIN_SERBIA, "sh", "RS" }, // Serbian Latin in Serbia; kludge, needed to be sr_Latn_RS instead, script codes not supported yet { LANGUAGE_SERBIAN_LATIN, "sh", "YU" }, // legacy Serbian Latin in Serbia and Montenegro (former Yugoslavia); kludge, needed to be sr_Latn_CS instead, script codes not supported yet { LANGUAGE_SERBIAN_LATIN, "sh", "CS" }, // Serbian Latin in Serbia and Montenegro; kludge, needed to be sr_Latn_CS instead, script codes not supported yet diff --git a/include/i18nlangtag/lang.h b/include/i18nlangtag/lang.h index 555e508..5a968c2 100644 --- a/include/i18nlangtag/lang.h +++ b/include/i18nlangtag/lang.h @@ -296,7 +296,6 @@ typedef unsigned short LanguageType; #define LANGUAGE_SANSKRIT 0x044F #define LANGUAGE_SEPEDI 0x046C #define LANGUAGE_NORTHERNSOTHO LANGUAGE_SEPEDI /* just an alias for the already existing localization */ -#define LANGUAGE_SERBIAN 0x001A /* primary only, not a locale! */ #define LANGUAGE_SERBIAN_CYRILLIC 0x0C1A /* MS lists this as Serbian (Cyrillic, Serbia) 'sr-Cyrl-SP', but they use 'SP' since at least Windows2003 where it was Serbia and Montenegro! */ #define LANGUAGE_SERBIAN_CYRILLIC_BOSNIA_HERZEGOVINA 0x1C1A #define LANGUAGE_SERBIAN_LATIN 0x081A /* MS lists this as Serbian (Latin, Serbia) 'sr-Latn-SP', but they use 'SP' since at least Windows2003 where it was Serbia and Montenegro! */ _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits