diff options
author | Eike Rathke <erack@redhat.com> | 2013-10-24 01:47:25 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2013-10-24 01:54:59 +0200 |
commit | 6b678c135da07f34da1bf7b19562366361e95085 (patch) | |
tree | 70661894df40cf42f1f0278d4e2fb9d1bea29c8f /i18nlangtag/source/languagetag/languagetag.cxx | |
parent | 315a0e277ab929ab77bb6ecd761abb24af0beb8b (diff) |
added/checked/aligned MS-LangIDs and mappings from new MS-LCID.pdf
... found at http://msdn.microsoft.com/library/cc233965.aspx (the 5th or
6th place I'm aware of where MS defines LCIDs, all different ...)
* a bunch of new definitions up to Windows 8.1
* lots of cross-checks done with SIL, Ethnologue, ...
Change-Id: Ifae8e676558c6712fe752856acca600d05d0a63f
Diffstat (limited to 'i18nlangtag/source/languagetag/languagetag.cxx')
-rw-r--r-- | i18nlangtag/source/languagetag/languagetag.cxx | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/i18nlangtag/source/languagetag/languagetag.cxx b/i18nlangtag/source/languagetag/languagetag.cxx index 4f8af9ade4bb..689a9854f3b4 100644 --- a/i18nlangtag/source/languagetag/languagetag.cxx +++ b/i18nlangtag/source/languagetag/languagetag.cxx @@ -1174,7 +1174,7 @@ bool LanguageTagImpl::canonicalize() return bChanged; // that's it } meIsLiblangtagNeeded = DECISION_YES; - SAL_INFO( "i18nlangtag", "LanguageTagImpl::canonicalize: using liblangtag for " << maBcp47); + SAL_INFO( "i18nlangtag", "LanguageTagImpl::canonicalize: using liblangtag for '" << maBcp47 << "'"); if (!mpImplLangtag) { @@ -1187,7 +1187,7 @@ bool LanguageTagImpl::canonicalize() if (lt_tag_parse( mpImplLangtag, OUStringToOString( maBcp47, RTL_TEXTENCODING_UTF8).getStr(), &aError.p)) { char* pTag = lt_tag_canonicalize( mpImplLangtag, &aError.p); - SAL_WARN_IF( !pTag, "i18nlangtag", "LanguageTagImpl::canonicalize: could not canonicalize " << maBcp47); + SAL_WARN_IF( !pTag, "i18nlangtag", "LanguageTagImpl::canonicalize: could not canonicalize '" << maBcp47 << "'"); if (pTag) { OUString aOld( maBcp47); @@ -1201,7 +1201,7 @@ bool LanguageTagImpl::canonicalize() meIsIsoODF = DECISION_DONTKNOW; if (!lt_tag_parse( mpImplLangtag, pTag, &aError.p)) { - SAL_WARN( "i18nlangtag", "LanguageTagImpl::canonicalize: could not reparse " << maBcp47); + SAL_WARN( "i18nlangtag", "LanguageTagImpl::canonicalize: could not reparse '" << maBcp47 << "'"); free( pTag); meIsValid = DECISION_NO; return bChanged; @@ -1214,7 +1214,7 @@ bool LanguageTagImpl::canonicalize() } else { - SAL_INFO( "i18nlangtag", "LanguageTagImpl::canonicalize: could not parse " << maBcp47); + SAL_INFO( "i18nlangtag", "LanguageTagImpl::canonicalize: could not parse '" << maBcp47 << "'"); } meIsValid = DECISION_NO; return bChanged; @@ -1536,11 +1536,13 @@ OUString LanguageTagImpl::getLanguageFromLangtag() if (mpImplLangtag) { const lt_lang_t* pLangT = lt_tag_get_language( mpImplLangtag); - SAL_WARN_IF( !pLangT, "i18nlangtag", "LanguageTag::getLanguageFromLangtag: pLangT==NULL"); + SAL_WARN_IF( !pLangT, "i18nlangtag", + "LanguageTag::getLanguageFromLangtag: pLangT==NULL for '" << maBcp47 << "'"); if (!pLangT) return aLanguage; const char* pLang = lt_lang_get_tag( pLangT); - SAL_WARN_IF( !pLang, "i18nlangtag", "LanguageTag::getLanguageFromLangtag: pLang==NULL"); + SAL_WARN_IF( !pLang, "i18nlangtag", + "LanguageTag::getLanguageFromLangtag: pLang==NULL for '" << maBcp47 << "'"); if (pLang) aLanguage = OUString::createFromAscii( pLang); } @@ -1595,11 +1597,12 @@ OUString LanguageTagImpl::getRegionFromLangtag() SAL_WARN_IF( !pRegionT && maBcp47.getLength() != 2 && maBcp47.getLength() != 3 && maBcp47.getLength() != 7 && maBcp47.getLength() != 8, - "i18nlangtag", "LanguageTag::getRegionFromLangtag: pRegionT==NULL"); + "i18nlangtag", "LanguageTag::getRegionFromLangtag: pRegionT==NULL for '" << maBcp47 << "'"); if (!pRegionT) return aRegion; const char* pRegion = lt_region_get_tag( pRegionT); - SAL_WARN_IF( !pRegion, "i18nlangtag", "LanguageTag::getRegionFromLangtag: pRegion==NULL"); + SAL_WARN_IF( !pRegion, "i18nlangtag", + "LanguageTag::getRegionFromLangtag: pRegion==NULL for'" << maBcp47 << "'"); if (pRegion) aRegion = OUString::createFromAscii( pRegion); } @@ -2399,7 +2402,10 @@ LanguageTagImpl::Extraction LanguageTagImpl::simpleExtract( const OUString& rBcp } } if (eRet == EXTRACTED_NONE) + { + SAL_INFO( "i18nlangtag", "LanguageTagImpl::simpleExtract: did not extract '" << rBcp47 << "'"); rLanguage = rScript = rCountry = rVariants = OUString(); + } return eRet; } |