[Libreoffice-commits] core.git: i18nlangtag/qa

Eike Rathke erack at redhat.com
Sat Apr 5 13:12:50 PDT 2014


 i18nlangtag/qa/cppunit/test_languagetag.cxx |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

New commits:
commit 2803e5c1e7112882003c3e2301f8e28f3dc2b6b7
Author: Eike Rathke <erack at redhat.com>
Date:   Sat Apr 5 22:11:55 2014 +0200

    document why the test fails and is disabled
    
    Change-Id: I17bb169f14d225b970014ab26a7f1d9d0d1b0af8

diff --git a/i18nlangtag/qa/cppunit/test_languagetag.cxx b/i18nlangtag/qa/cppunit/test_languagetag.cxx
index 03c2665..93506fb 100644
--- a/i18nlangtag/qa/cppunit/test_languagetag.cxx
+++ b/i18nlangtag/qa/cppunit/test_languagetag.cxx
@@ -444,9 +444,15 @@ void TestLanguageTag::testAllTags()
     }
 
 #if USE_LIBLANGTAG
-    // 'zh-yue-HK' uses extlang and should be preferred 'yue-HK'
-    // Disable until internal vs liblangtag is sorted out.
+    // 'zh-yue-HK' uses redundant 'zh-yue' and should be preferred 'yue-HK'
 #if 0
+    /* XXX Disabled because liblangtag in lt_tag_canonicalize() after replacing
+     * 'zh-yue' with the preferred 'yue' does:
+     * "If the language tag starts with a primary language subtag that is also
+     * an extlang subtag, then the language tag is prepended with the extlang's
+     * 'Prefix'."
+     * Primary language 'yue' is also extlang 'yue' for which the prefix
+     * happens to be 'zh' ... so the result is 'zh-yue-HK' again. */
     {
         OUString s_zh_yue_HK( "zh-yue-HK" );
         LanguageTag zh_yue_HK( s_zh_yue_HK );


More information about the Libreoffice-commits mailing list