[Libreoffice-commits] core.git: 2 commits - i18nlangtag/qa i18nlangtag/source i18npool/source include/i18nlangtag
Eike Rathke
erack at redhat.com
Fri Jan 22 12:52:50 PST 2016
i18nlangtag/qa/cppunit/test_languagetag.cxx | 1
i18nlangtag/source/isolang/isolang.cxx | 4
i18npool/source/localedata/data/eu.xml | 376 ----------------------------
i18npool/source/localedata/data/eu_ES.xml | 376 ++++++++++++++++++++++++++++
i18npool/source/localedata/localedata.cxx | 2
include/i18nlangtag/lang.h | 10
6 files changed, 390 insertions(+), 379 deletions(-)
New commits:
commit 72c5e230f9cda8e18f63f7bbc6567487b4c5a5e0
Author: Eike Rathke <erack at redhat.com>
Date: Fri Jan 22 21:46:30 2016 +0100
tdf#97315 add Basque [eu-ES] and map [eu] to [eu-ES]
Change-Id: I89641fa82f0d0129aeff0d86a10be26cdc721dfc
diff --git a/i18nlangtag/qa/cppunit/test_languagetag.cxx b/i18nlangtag/qa/cppunit/test_languagetag.cxx
index 76ef5a3..8696408 100644
--- a/i18nlangtag/qa/cppunit/test_languagetag.cxx
+++ b/i18nlangtag/qa/cppunit/test_languagetag.cxx
@@ -684,6 +684,7 @@ static bool checkMapping( const OUString& rStr1, const OUString& rStr2 )
if (rStr1 == "ku-SY" ) return rStr2 == "kmr-Latn-SY";
if (rStr1 == "ku-IQ" ) return rStr2 == "ckb-IQ";
if (rStr1 == "ku-IR" ) return rStr2 == "ckb-IR";
+ if (rStr1 == "eu" ) return rStr2 == "eu-ES";
return rStr1 == rStr2;
}
diff --git a/i18nlangtag/source/isolang/isolang.cxx b/i18nlangtag/source/isolang/isolang.cxx
index c005c19..2161f7a 100644
--- a/i18nlangtag/source/isolang/isolang.cxx
+++ b/i18nlangtag/source/isolang/isolang.cxx
@@ -239,7 +239,8 @@ static IsoLanguageCountryEntry const aImplIsoLangEntries[] =
{ LANGUAGE_USER_ARABIC_SOMALIA, "ar", "SO", 0 },
{ LANGUAGE_USER_ARABIC_SUDAN, "ar", "SD", 0 },
{ LANGUAGE_ARABIC_PRIMARY_ONLY, "ar", "" , 0 },
- { LANGUAGE_BASQUE, "eu", "" , 0 },
+ { LANGUAGE_BASQUE, "eu", "ES", 0 },
+ { LANGUAGE_BASQUE, "eu", "" , kSAME }, // our earlier definition
{ LANGUAGE_BULGARIAN, "bg", "BG", 0 },
{ LANGUAGE_CZECH, "cs", "CZ", 0 },
{ LANGUAGE_CZECH, "cz", "" , kSAME },
@@ -1114,7 +1115,6 @@ css::lang::Locale MsLangId::Conversion::lookupFallbackLocale(
switch (pEntry->mnLang)
{
// These are known to have no country assigned.
- case LANGUAGE_BASQUE:
case LANGUAGE_USER_ESPERANTO:
case LANGUAGE_USER_INTERLINGUA:
case LANGUAGE_USER_INTERLINGUE:
diff --git a/i18npool/source/localedata/data/eu.xml b/i18npool/source/localedata/data/eu_ES.xml
similarity index 99%
rename from i18npool/source/localedata/data/eu.xml
rename to i18npool/source/localedata/data/eu_ES.xml
index 8de7c60..cc7c6d5 100644
--- a/i18npool/source/localedata/data/eu.xml
+++ b/i18npool/source/localedata/data/eu_ES.xml
@@ -24,8 +24,8 @@
<DefaultName>Basque</DefaultName>
</Language>
<Country>
- <CountryID/>
- <DefaultName/>
+ <CountryID>ES</CountryID>
+ <DefaultName>Spain</DefaultName>
</Country>
</LC_INFO>
<LC_CTYPE>
diff --git a/i18npool/source/localedata/localedata.cxx b/i18npool/source/localedata/localedata.cxx
index e91ac3f3..d8f5ed0 100644
--- a/i18npool/source/localedata/localedata.cxx
+++ b/i18npool/source/localedata/localedata.cxx
@@ -152,7 +152,7 @@ static const struct {
{ "sr_CS", lcl_DATA_EURO },
{ "hr_HR", lcl_DATA_EURO },
{ "bs_BA", lcl_DATA_EURO },
- { "eu", lcl_DATA_EURO },
+ { "eu_ES", lcl_DATA_EURO },
{ "fo_FO", lcl_DATA_EURO },
{ "ga_IE", lcl_DATA_EURO },
{ "gd_GB", lcl_DATA_EURO },
commit 43507882386f5d576e4f6c49dfd578630167d893
Author: Eike Rathke <erack at redhat.com>
Date: Fri Jan 22 18:18:33 2016 +0100
document some naming conventions
Change-Id: Id73c7b56c58855fc5ae2304274b6da97272037b8
diff --git a/include/i18nlangtag/lang.h b/include/i18nlangtag/lang.h
index 51310f9..0144831 100644
--- a/include/i18nlangtag/lang.h
+++ b/include/i18nlangtag/lang.h
@@ -107,6 +107,16 @@ typedef unsigned short LanguageType;
/* NOTE: this is taken from the MS documentation! Not supported by OOo/SO! */
#define LANGUAGE_INVARIANT 0x007F
+/* Naming conventions:
+ * * ..._LSO suffix indicates a Language-Script-Only mapping, i.e. no country
+ * assignment in i18nlangtag/source/isolang/isolang.cxx.
+ * Used for backward compatibility or where MS assigned such values and they
+ * should be explicitly handled.
+ * * LANGUAGE_USER_... for our user-defined IDs.
+ * * LANGUAGE_OBSOLETE_USER_... for a user-defined ID that has been replaced by
+ * a value defined by MS.
+ */
+
#define LANGUAGE_AFRIKAANS 0x0436
#define LANGUAGE_ALBANIAN 0x041C
#define LANGUAGE_ALSATIAN_FRANCE 0x0484
More information about the Libreoffice-commits
mailing list