[Libreoffice-commits] core.git: i18nlangtag/source i18npool/source include/i18nlangtag l10ntools/source svtools/source

Eike Rathke erack at redhat.com
Fri Aug 21 15:50:39 PDT 2015


 i18nlangtag/source/isolang/isolang.cxx         |    5 +++--
 i18nlangtag/source/isolang/mslangid.cxx        |   10 ++++++++++
 i18nlangtag/source/languagetag/languagetag.cxx |    2 +-
 i18npool/source/localedata/data/dz_BT.xml      |    2 +-
 include/i18nlangtag/lang.h                     |    6 +++---
 l10ntools/source/ulfconv/msi-encodinglist.txt  |    2 +-
 svtools/source/misc/langtab.src                |    2 +-
 7 files changed, 20 insertions(+), 9 deletions(-)

New commits:
commit 395e67764c412acbefeb92d1d2a8cb097c18b7fd
Author: Eike Rathke <erack at redhat.com>
Date:   Sat Aug 22 00:48:41 2015 +0200

    disentangle the Dzongkha mess a little
    
    As per [MS-LCID] rev. 7.0 2015-06-30
    
    Change-Id: If4980d2b1149d93b39e5b57f5741bbdfb5680516

diff --git a/i18nlangtag/source/isolang/isolang.cxx b/i18nlangtag/source/isolang/isolang.cxx
index 02b6fb0..bbfb34c 100644
--- a/i18nlangtag/source/isolang/isolang.cxx
+++ b/i18nlangtag/source/isolang/isolang.cxx
@@ -394,8 +394,9 @@ static IsoLanguageCountryEntry const aImplIsoLangEntries[] =
     { LANGUAGE_TAJIK_LSO,                   "tg", ""  , 0     },
     { LANGUAGE_TIBETAN,                     "bo", "CN", 0     },    // CN politically correct?
     { LANGUAGE_USER_TIBETAN_INDIA,          "bo", "IN", 0     },
-    { LANGUAGE_USER_TIBETAN_BHUTAN,         "bo", "BT", 0     },    // MS reserved, but with the ID error instead
-    { LANGUAGE_DZONGKHA,                    "dz", "BT", 0     },
+    { LANGUAGE_USER_TIBETAN_BHUTAN,         "bo", "BT", 0     },
+    { LANGUAGE_DZONGKHA_BHUTAN,             "dz", "BT", 0     },
+    { LANGUAGE_TIBETAN_BHUTAN,              "dz", "BT", 0     },    // MS reserved for bo-BT, but LCID was used as Dzongkha, see #i53497#
     { LANGUAGE_USER_DZONGKHA_MAP_LONLY,     "dz", ""  , 0     },    // because of the MS error, see lang.h
     { LANGUAGE_TURKMEN,                     "tk", "TM", 0     },
     { LANGUAGE_WELSH,                       "cy", "GB", 0     },
diff --git a/i18nlangtag/source/isolang/mslangid.cxx b/i18nlangtag/source/isolang/mslangid.cxx
index 3cc456d..2b3ef35 100644
--- a/i18nlangtag/source/isolang/mslangid.cxx
+++ b/i18nlangtag/source/isolang/mslangid.cxx
@@ -569,6 +569,16 @@ LanguageType MsLangId::getReplacementForObsoleteLanguage( LanguageType nLang, bo
         case LANGUAGE_SPANISH_DATED:
             nLang = LANGUAGE_SPANISH_MODERN;
             break;
+
+        // 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
+        // LANGUAGE_TIBETAN_BHUTAN for bo-BT instead of having it reserved;
+        // then remove the mapping and hope every dz-BT user used ODF to store
+        // documents ;-)
+        case LANGUAGE_TIBETAN_BHUTAN:
+            nLang = LANGUAGE_DZONGKHA_BHUTAN;
+            break;
     }
     return nLang;
 }
diff --git a/i18nlangtag/source/languagetag/languagetag.cxx b/i18nlangtag/source/languagetag/languagetag.cxx
index 34eaeb8..de31afe 100644
--- a/i18nlangtag/source/languagetag/languagetag.cxx
+++ b/i18nlangtag/source/languagetag/languagetag.cxx
@@ -3072,7 +3072,7 @@ LanguageTag makeLanguageTagFromAppleLanguageId(AppleLanguageId nLanguage)
             nLang = LANGUAGE_UIGHUR_CHINA;
             break;
         case AppleLanguageId::DZONGKHA:
-            nLang = LANGUAGE_DZONGKHA;
+            nLang = LANGUAGE_DZONGKHA_BHUTAN;
             break;
         case AppleLanguageId::JAVANESE_LATIN:
             return LanguageTag("jv-Latn");
diff --git a/i18npool/source/localedata/data/dz_BT.xml b/i18npool/source/localedata/data/dz_BT.xml
index 54ff17d..d85b1ae4 100644
--- a/i18npool/source/localedata/data/dz_BT.xml
+++ b/i18npool/source/localedata/data/dz_BT.xml
@@ -51,7 +51,7 @@
     <TimePM>ཕྱི་ཆ</TimePM>
     <MeasurementSystem>UK</MeasurementSystem>
   </LC_CTYPE>
-  <LC_FORMAT replaceFrom="[CURRENCY]" replaceTo="[$Nu-851]">
+  <LC_FORMAT replaceFrom="[CURRENCY]" replaceTo="[$Nu-C51]">
     <DateAcceptancePattern>M-D</DateAcceptancePattern>
     <FormatElement msgid="DateFormatskey1" default="true" type="short" usage="DATE" formatindex="18">
       <FormatCode>[NatNum1]YY-MM-DD</FormatCode>
diff --git a/include/i18nlangtag/lang.h b/include/i18nlangtag/lang.h
index a8a0cab..a79d2db 100644
--- a/include/i18nlangtag/lang.h
+++ b/include/i18nlangtag/lang.h
@@ -401,8 +401,8 @@ typedef unsigned short LanguageType;
 #define LANGUAGE_TELUGU                     0x044A
 #define LANGUAGE_THAI                       0x041E
 #define LANGUAGE_TIBETAN                    0x0451
-#define LANGUAGE_DZONGKHA                   0x0851
-#define LANGUAGE_TIBETAN_BHUTAN             LANGUAGE_DZONGKHA   /* a MS error, see #i53497# */
+#define LANGUAGE_TIBETAN_BHUTAN             0x0851  /* was used as Dzongkha, a MS error, see #i53497# */
+#define LANGUAGE_DZONGKHA_BHUTAN            0x0C51  /* they finally got it ... ([MS-LCID] rev. 7.0 2015-06-30) */
 #define LANGUAGE_TIGRIGNA_ERITREA           0x0873
 #define LANGUAGE_TIGRIGNA_ETHIOPIA          0x0473
 #define LANGUAGE_TSONGA                     0x0431
@@ -527,7 +527,7 @@ typedef unsigned short LanguageType;
 #define LANGUAGE_USER_KURDISH_SOUTHERN_IRAQ 0x8092  /* makeLangID( 0x20, getPrimaryLanguage( LANGUAGE_KURDISH_ARABIC_LSO)) */
 #define LANGUAGE_USER_KURDISH_SOUTHERN_IRAN 0x8492  /* makeLangID( 0x21, getPrimaryLanguage( LANGUAGE_KURDISH_ARABIC_LSO)) */
 #define LANGUAGE_USER_SARDINIAN             0x0627
-/* was reserved for Dzongkha but turned down with #i53497#: 0x0628 */  /* obsoleted by LANGUAGE_DZONGKHA */
+/* was reserved for Dzongkha but turned down with #i53497#: 0x0628 */  /* obsoleted by LANGUAGE_DZONGKHA_BHUTAN */
 #define LANGUAGE_USER_DZONGKHA_MAP_LONLY    0xF851  /* to map "dz" only, because of the MS error, and preserve CTL information, sub 0x3e */
 #define LANGUAGE_USER_SWAHILI_TANZANIA      0x8041  /* makeLangID( 0x20, getPrimaryLanguage( LANGUAGE_SWAHILI)) */
 #define LANGUAGE_OBSOLETE_USER_BRETON       0x0629
diff --git a/l10ntools/source/ulfconv/msi-encodinglist.txt b/l10ntools/source/ulfconv/msi-encodinglist.txt
index 86c9b54..bddd659 100644
--- a/l10ntools/source/ulfconv/msi-encodinglist.txt
+++ b/l10ntools/source/ulfconv/msi-encodinglist.txt
@@ -44,7 +44,7 @@ cy       0  1106   # Welsh
 da       0  1030
 de       0  1031
 dgo      0  1604   # Dogri (India)
-dz       0  2129   # Dzongkha (same ID as tibetan bhutan (s. i40713))
+dz       0  3153   # Dzongkha
 el       0  1032
 en-GB    0  2057
 en-US    0  1033
diff --git a/svtools/source/misc/langtab.src b/svtools/source/misc/langtab.src
index dfe85df..c03ee9c 100644
--- a/svtools/source/misc/langtab.src
+++ b/svtools/source/misc/langtab.src
@@ -219,7 +219,7 @@ StringArray STR_ARR_SVT_LANGUAGE_TABLE
         < "Kurdish, Southern (Iran)" ; LANGUAGE_USER_KURDISH_SOUTHERN_IRAN ; > ;
         < "Kurdish, Southern (Iraq)" ; LANGUAGE_USER_KURDISH_SOUTHERN_IRAQ ; > ;
         < "Sardinian" ; LANGUAGE_USER_SARDINIAN ; > ;
-        < "Dzongkha" ; LANGUAGE_DZONGKHA ; > ;
+        < "Dzongkha" ; LANGUAGE_DZONGKHA_BHUTAN ; > ;
         < "Swahili (Tanzania)" ; LANGUAGE_USER_SWAHILI_TANZANIA ; > ;
         < "Lao" ; LANGUAGE_LAO ; > ;
         < "Irish" ; LANGUAGE_GAELIC_IRELAND ; > ;


More information about the Libreoffice-commits mailing list