diff options
author | Eike Rathke <erack@redhat.com> | 2014-08-04 14:05:37 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2014-08-04 14:24:17 +0200 |
commit | 4189b715999bf9ebb0cd04a0c610a7b514e28d1b (patch) | |
tree | fbdaa057a52553df749e3a260312bf530a5f84fc /i18nlangtag | |
parent | 955c5539a1ea5e971f111989d6c5bec11d936416 (diff) |
suppress legacy locales, fdo#44112 related
With MsLangId::isLegacy() locales can be suppressed in language lists
and are not offered unless actually used at the current position of the
document. Language attribution now handles adding a language/locale to
the list on the fly.
For example, Serbian (Latin or Cyrillic) for "Serbia and Montenegro" are
legacy locales, the confederation doesn't exist anymore. A further
candidate would be pap-AN as the Netherlands Antilles ceased to exist,
see fdo#44112.
Suppressing "Serbian Cyrillic (Serbia and Montenegro)" also has the nice
benefit of narrowing the language list box width a little ...
Change-Id: Id05cce328622465016901524b759369c18bc4dbd
Diffstat (limited to 'i18nlangtag')
-rw-r--r-- | i18nlangtag/source/isolang/mslangid.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/i18nlangtag/source/isolang/mslangid.cxx b/i18nlangtag/source/isolang/mslangid.cxx index 6bb92bbeba0d..7f6c42f5353e 100644 --- a/i18nlangtag/source/isolang/mslangid.cxx +++ b/i18nlangtag/source/isolang/mslangid.cxx @@ -473,6 +473,22 @@ bool MsLangId::isNonLatinWestern( LanguageType nLang ) // static +bool MsLangId::isLegacy( LanguageType nLang ) +{ + switch (nLang) + { + case LANGUAGE_SERBIAN_CYRILLIC_SAM: + case LANGUAGE_SERBIAN_LATIN_SAM: + /* TODO: activate once dictionary was renamed from pap-AN to + * pap-CW, or the pap-CW one supports also pap-AN, see fdo#44112 */ + //case LANGUAGE_PAPIAMENTU: + return true; + } + return false; +} + + +// static LanguageType MsLangId::getReplacementForObsoleteLanguage( LanguageType nLang, bool /*bUserInterfaceSelection*/ ) { switch (nLang) |