[Libreoffice-commits] core.git: 2 commits - i18nlangtag/source lingucomponent/source
Eike Rathke
erack at redhat.com
Thu Sep 12 09:44:51 PDT 2013
i18nlangtag/source/isolang/isolang.cxx | 4 ++--
i18nlangtag/source/languagetag/languagetag.cxx | 8 ++++++++
lingucomponent/source/lingutil/lingutil.cxx | 4 +---
3 files changed, 11 insertions(+), 5 deletions(-)
New commits:
commit 08e4d51f04734b952f42e3c334920dfd859bba02
Author: Eike Rathke <erack at redhat.com>
Date: Thu Sep 12 18:38:12 2013 +0200
if valid accept whatever the dictionary's name might comprise
Change-Id: Ia6ea53f1a9e1c575606901e173bc952449135522
diff --git a/lingucomponent/source/lingutil/lingutil.cxx b/lingucomponent/source/lingutil/lingutil.cxx
index b6db0b9..590206c 100644
--- a/lingucomponent/source/lingutil/lingutil.cxx
+++ b/lingucomponent/source/lingutil/lingutil.cxx
@@ -152,9 +152,7 @@ std::vector< SvtLinguConfigDictionaryEntry > GetOldStyleDics( const char *pDicTy
// ctor as that triggers use of liblangtag and initializes its
// database which we do not want during startup. Convert
// instead.
- sal_Int32 nPos;
- if (sChunk.indexOf('-') < 0 && ((nPos = sChunk.indexOf('_')) > 0))
- sChunk = sChunk.replaceAt( nPos, 1, OUString('-'));
+ sChunk = sChunk.replace( '_', '-');
LanguageTag aLangTag(sChunk, true);
if (!aLangTag.isValidBcp47())
continue;
commit fa031ec8eb216978b1646ab2459cf5900891d98c
Author: Eike Rathke <erack at redhat.com>
Date: Thu Sep 12 18:33:48 2013 +0200
special case for Pali 'pi-Latn' vs 'pli', fdo#41599 related
Change-Id: I924c87bbbbdd7c58d9e1aca440c6f2aea7bbbcf9
diff --git a/i18nlangtag/source/isolang/isolang.cxx b/i18nlangtag/source/isolang/isolang.cxx
index 1abf020..fc412e4 100644
--- a/i18nlangtag/source/isolang/isolang.cxx
+++ b/i18nlangtag/source/isolang/isolang.cxx
@@ -522,8 +522,7 @@ static IsoLanguageCountryEntry const aImplIsoLangEntries[] =
{ LANGUAGE_USER_MANX, "gv", "GB", false },
{ LANGUAGE_USER_ARAGONESE, "an", "ES", false },
{ LANGUAGE_USER_KEYID, "qtz", "" , false }, // key id pseudolanguage used for UI testing
- { LANGUAGE_USER_PALI_LATIN, "pi", "" , false }, // Pali with Latin script, ISO 639-1
- { LANGUAGE_USER_PALI_LATIN, "pli", "" , true }, // Pali with Latin script, ISO 639-3 (sigh..) back-compat
+ { LANGUAGE_USER_PALI_LATIN, "pli", "" , true }, // Pali with Latin script, ISO 639-3 (sigh..) back-compat, Latin is not a default script though..
{ LANGUAGE_USER_KYRGYZ_CHINA, "ky", "CN", false },
{ LANGUAGE_USER_KOMI_ZYRIAN, "kpv", "RU", false },
{ LANGUAGE_USER_KOMI_PERMYAK, "koi", "RU", false },
@@ -582,6 +581,7 @@ static IsoLanguageScriptCountryEntry const aImplIsoLangScriptEntries[] =
{ LANGUAGE_BOSNIAN_CYRILLIC_BOSNIA_HERZEGOVINA, "bs-Cyrl", "BA" },
{ LANGUAGE_AZERI_CYRILLIC, "az-Cyrl", "AZ" }, // macrolanguage code
{ LANGUAGE_UZBEK_CYRILLIC, "uz-Cyrl", "UZ" }, // macrolanguage code
+ { LANGUAGE_USER_PALI_LATIN, "pi-Latn", "" },
{ LANGUAGE_DONTKNOW, "", "" } // marks end of table
};
diff --git a/i18nlangtag/source/languagetag/languagetag.cxx b/i18nlangtag/source/languagetag/languagetag.cxx
index 504d90a..e2f714c 100644
--- a/i18nlangtag/source/languagetag/languagetag.cxx
+++ b/i18nlangtag/source/languagetag/languagetag.cxx
@@ -1268,6 +1268,12 @@ LanguageTag & LanguageTag::makeFallback()
aVec.push_back( "sr-Latn");
aVec.push_back( "sr");
}
+ else if (aLanguage == "pli")
+ {
+ // a special case for Pali dictionary, see fdo#41599
+ aVec.push_back( "pi-Latn");
+ aVec.push_back( "pi");
+ }
}
return aVec;
}
@@ -1311,6 +1317,8 @@ LanguageTag & LanguageTag::makeFallback()
else
aVec.push_back( "sh-" + aCountry);
}
+ else if (aLanguage == "pi" && aScript == "Latn")
+ aVec.push_back( "pli"); // a special case for Pali dictionary, see fdo#41599
}
if (!aVariants.isEmpty() && !bHaveLanguageScriptVariant)
{
More information about the Libreoffice-commits
mailing list