diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2009-01-06 12:54:16 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2009-01-06 12:54:16 +0000 |
commit | 4e1fd2fa161708049f1c3b6039659d0bf4f4539e (patch) | |
tree | 860f7ec49a96dbb04a3161d44dd1598ce26da2a4 /i18npool/source/isolang | |
parent | CWS-TOOLING: integrate CWS ooxml02 (diff) | |
download | core-4e1fd2fa161708049f1c3b6039659d0bf4f4539e.tar.gz core-4e1fd2fa161708049f1c3b6039659d0bf4f4539e.zip |
CWS-TOOLING: integrate CWS locales31
2008-12-10 14:56:44 +0100 er r265193 : calling convention mismatch
2008-12-08 12:04:56 +0100 er r264984 : #i96840# classify some extra languages as CTL
2008-12-05 19:54:02 +0100 erack r264916 : ImpSvNumberformatScan::ScanType: do not miscategorize as automtic currency if currency symbol in General string, such as R in Standard
2008-12-04 12:07:05 +0100 erack r264831 : CWS-TOOLING: rebase CWS locales31 to trunk@264807 (milestone: DEV300:m37)
2008-12-03 16:14:17 +0100 erack r264797 : #i93694# update script+language -> unicode digit mapping; patch from <hdu>
2008-11-25 02:01:18 +0100 erack r264270 : #i83349# apply remaining parts of the patch, now that we use ICU 4.0; contributed by <kstribley>
2008-11-25 01:38:20 +0100 erack r264269 : #i93694# test the bit, not the constant ...
2008-11-24 10:34:58 +0100 erack r264211 : #i93694# LANGUAGE_ARABIC is gone
2008-11-24 01:39:25 +0100 erack r264192 : #i94435# LANGUAGE_SPANISH now is an alias of LANGUAGE_SPANISH_MODERN, need LANGUAGE_SPANISH_DATED in switch case if both are to be used
2008-11-23 22:54:17 +0100 erack r264190 : CWS-TOOLING: rebase CWS locales31 to trunk@263288 (milestone: DEV300:m35)
2008-11-23 20:23:28 +0100 erack r264189 : migrate CWS locales31 to SVN
Diffstat (limited to 'i18npool/source/isolang')
-rw-r--r-- | i18npool/source/isolang/isolang.cxx | 40 | ||||
-rw-r--r-- | i18npool/source/isolang/mslangid.cxx | 63 |
2 files changed, 73 insertions, 30 deletions
diff --git a/i18npool/source/isolang/isolang.cxx b/i18npool/source/isolang/isolang.cxx index 686478fb7651..74416df665a0 100644 --- a/i18npool/source/isolang/isolang.cxx +++ b/i18npool/source/isolang/isolang.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: isolang.cxx,v $ - * $Revision: 1.16 $ + * $Revision: 1.16.24.7 $ * * This file is part of OpenOffice.org. * @@ -97,8 +97,8 @@ struct IsoLangOtherEntry * only" usage and locale fall back should be cleaned up and made consistent. I * strongly doubt that most callers exactly expect the behavior described. * Currently these primary LangIDs are used literally in OOo code: - * LANGUAGE_ENGLISH LANGUAGE_CHINESE LANGUAGE_ARABIC LANGUAGE_MALAY - * LANGUAGE_AZERI LANGUAGE_UZBEK LANGUAGE_URDU LANGUAGE_KASHMIRI + * LANGUAGE_ENGLISH LANGUAGE_CHINESE LANGUAGE_MALAY + * LANGUAGE_AZERI LANGUAGE_URDU LANGUAGE_KASHMIRI */ static MsLangId::IsoLangEntry const aImplIsoLangEntries[] = @@ -114,9 +114,8 @@ static MsLangId::IsoLangEntry const aImplIsoLangEntries[] = { LANGUAGE_GERMAN, "de", "DE" }, { LANGUAGE_ITALIAN, "it", "IT" }, { LANGUAGE_DUTCH, "nl", "NL" }, - { LANGUAGE_SPANISH, "es", "ES" }, - { LANGUAGE_SPANISH, "es", "" }, { LANGUAGE_SPANISH_MODERN, "es", "ES" }, + { LANGUAGE_SPANISH_DATED, "es", "ES" }, { LANGUAGE_PORTUGUESE, "pt", "PT" }, { LANGUAGE_PORTUGUESE_BRAZILIAN, "pt", "BR" }, { LANGUAGE_DANISH, "da", "DK" }, @@ -147,19 +146,8 @@ static MsLangId::IsoLangEntry const aImplIsoLangEntries[] = { LANGUAGE_GERMAN_AUSTRIAN, "de", "AT" }, { LANGUAGE_ITALIAN_SWISS, "it", "CH" }, { LANGUAGE_ALBANIAN, "sq", "AL" }, - // #i93555# moved entry below { LANGUAGE_ARABIC, "ar", "" }, - { LANGUAGE_ARABIC_EGYPT, "ar", "EG" }, - // #i93555# HACK: language-only entry moved here to have a match on locale - // present in language list box to not display "Unknown" for an Arabic 'ar' - // language pack. This may have some side effect on code dealing with - // LANGUAGE_ARABIC if it converts to/from strings. On the other hand, usage - // of language-only usually is done wrong anyway.. - /* FIXME: fix all "primary language only" usage, see also comment above - * this table, and then add a few language-only entries to the language - * list box if really necessary, but do not make them available for - * language attribution and so on, only for UI language selection! */ - { LANGUAGE_ARABIC, "ar", "" }, { LANGUAGE_ARABIC_SAUDI_ARABIA, "ar", "SA" }, + { LANGUAGE_ARABIC_EGYPT, "ar", "EG" }, { LANGUAGE_ARABIC_UAE, "ar", "AE" }, { LANGUAGE_ARABIC_IRAQ, "ar", "IQ" }, { LANGUAGE_ARABIC_LIBYA, "ar", "LY" }, @@ -174,6 +162,16 @@ static MsLangId::IsoLangEntry const aImplIsoLangEntries[] = { LANGUAGE_ARABIC_KUWAIT, "ar", "KW" }, { LANGUAGE_ARABIC_BAHRAIN, "ar", "BH" }, { LANGUAGE_ARABIC_QATAR, "ar", "QA" }, + { LANGUAGE_USER_ARABIC_CHAD, "ar", "TD" }, + { LANGUAGE_USER_ARABIC_COMOROS, "ar", "KM" }, + { LANGUAGE_USER_ARABIC_DJIBOUTI, "ar", "DJ" }, + { LANGUAGE_USER_ARABIC_ERITREA, "ar", "ER" }, + { LANGUAGE_USER_ARABIC_ISRAEL, "ar", "IL" }, + { LANGUAGE_USER_ARABIC_MAURITANIA, "ar", "MR" }, + { LANGUAGE_USER_ARABIC_PALESTINE, "ar", "PS" }, + { LANGUAGE_USER_ARABIC_SOMALIA, "ar", "SO" }, + { LANGUAGE_USER_ARABIC_SUDAN, "ar", "SD" }, + { LANGUAGE_ARABIC_PRIMARY_ONLY, "ar", "" }, { LANGUAGE_BASQUE, "eu", "" }, { LANGUAGE_BULGARIAN, "bg", "BG" }, { LANGUAGE_CZECH, "cs", "CZ" }, @@ -201,7 +199,7 @@ static MsLangId::IsoLangEntry const aImplIsoLangEntries[] = { LANGUAGE_NORWEGIAN_BOKMAL, "nb", "NO" }, { LANGUAGE_NORWEGIAN_NYNORSK, "nn", "NO" }, { LANGUAGE_POLISH, "pl", "PL" }, - { LANGUAGE_RHAETO_ROMAN, "rm", "" }, + { LANGUAGE_RHAETO_ROMAN, "rm", "CH" }, { LANGUAGE_ROMANIAN, "ro", "RO" }, { LANGUAGE_ROMANIAN_MOLDOVA, "ro", "MD" }, { LANGUAGE_SLOVAK, "sk", "SK" }, @@ -258,7 +256,6 @@ static MsLangId::IsoLangEntry const aImplIsoLangEntries[] = { LANGUAGE_AZERI, "az", "" }, { LANGUAGE_AZERI_LATIN, "az", "AZ" }, // { LANGUAGE_AZERI_CYRILLIC, "az", "AZ" }, // script codes not supported yet - { LANGUAGE_UZBEK, "uz", "" }, { LANGUAGE_UZBEK_LATIN, "uz", "UZ" }, // { LANGUAGE_UZBEK_CYRILLIC, "uz", "UZ" }, // script codes not supported yet { LANGUAGE_BENGALI_BANGLADESH, "bn", "BD" }, @@ -363,7 +360,6 @@ static MsLangId::IsoLangEntry const aImplIsoLangEntries[] = { LANGUAGE_CHEROKEE_UNITED_STATES, "chr", "US" }, { LANGUAGE_INUKTITUT_LATIN_CANADA, "iu", "CA" }, // { LANGUAGE_INUKTITUT_SYLLABICS_CANADA, "iu", "CA" }, // script codes not supported yet -// { LANGUAGE_ARABIC_SUDAN, "ar", "SD" }, // unknown MS-LCID { LANGUAGE_SAMI_NORTHERN_NORWAY, "se", "NO" }, { LANGUAGE_SAMI_INARI, "smn", "FI" }, { LANGUAGE_SAMI_LULE_NORWAY, "smj", "NO" }, @@ -448,6 +444,8 @@ static MsLangId::IsoLangEntry const aImplIsoLangEntries[] = { LANGUAGE_USER_SANTALI_INDIA, "sat", "IN" }, { LANGUAGE_USER_TETUN, "tet", "ID" }, { LANGUAGE_USER_TETUN_TIMOR_LESTE, "tet", "TL" }, + { LANGUAGE_USER_TOK_PISIN, "tpi", "PG" }, + { LANGUAGE_USER_SHUSWAP, "shs", "CA" }, { LANGUAGE_NONE, "zxx", "" }, // added to ISO 639-2 on 2006-01-11: Used to declare the absence of linguistic information { LANGUAGE_DONTKNOW, "", "" } // marks end of table }; @@ -670,7 +668,6 @@ static const MsLangId::IsoLangEntry & lcl_lookupFallbackEntry( LanguageType nLan { // These are known to have no country assigned. case LANGUAGE_BASQUE: - case LANGUAGE_RHAETO_ROMAN: case LANGUAGE_USER_ESPERANTO: case LANGUAGE_USER_INTERLINGUA: return *pEntry; @@ -751,7 +748,6 @@ static const MsLangId::IsoLangEntry & lcl_lookupFallbackEntry( { // These are known to have no country assigned. case LANGUAGE_BASQUE: - case LANGUAGE_RHAETO_ROMAN: case LANGUAGE_USER_ESPERANTO: case LANGUAGE_USER_INTERLINGUA: return *pEntry; diff --git a/i18npool/source/isolang/mslangid.cxx b/i18npool/source/isolang/mslangid.cxx index 7ea7e39f57fb..070ddb9dc562 100644 --- a/i18npool/source/isolang/mslangid.cxx +++ b/i18npool/source/isolang/mslangid.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: mslangid.cxx,v $ - * $Revision: 1.10 $ + * $Revision: 1.10.24.4 $ * * This file is part of OpenOffice.org. * @@ -209,10 +209,12 @@ bool MsLangId::isRightToLeft( LanguageType nLang ) { switch( nLang & LANGUAGE_MASK_PRIMARY ) { - case LANGUAGE_ARABIC & LANGUAGE_MASK_PRIMARY : - case LANGUAGE_HEBREW & LANGUAGE_MASK_PRIMARY : - case LANGUAGE_URDU & LANGUAGE_MASK_PRIMARY : - case LANGUAGE_FARSI & LANGUAGE_MASK_PRIMARY : + case LANGUAGE_ARABIC_SAUDI_ARABIA & LANGUAGE_MASK_PRIMARY : + case LANGUAGE_HEBREW & LANGUAGE_MASK_PRIMARY : + case LANGUAGE_URDU & LANGUAGE_MASK_PRIMARY : + case LANGUAGE_FARSI & LANGUAGE_MASK_PRIMARY : + case LANGUAGE_KASHMIRI & LANGUAGE_MASK_PRIMARY : + case LANGUAGE_SINDHI & LANGUAGE_MASK_PRIMARY : return true; default: @@ -239,6 +241,23 @@ bool MsLangId::hasForbiddenCharacters( LanguageType nLang ) // static +bool MsLangId::needsSequenceChecking( LanguageType nLang ) +{ + switch (nLang & LANGUAGE_MASK_PRIMARY) + { + case LANGUAGE_BURMESE & LANGUAGE_MASK_PRIMARY: + case LANGUAGE_KHMER & LANGUAGE_MASK_PRIMARY: + case LANGUAGE_LAO & LANGUAGE_MASK_PRIMARY: + case LANGUAGE_THAI & LANGUAGE_MASK_PRIMARY: + return true; + default: + break; + } + return false; +} + + +// static sal_Int16 MsLangId::getScriptType( LanguageType nLang ) { sal_Int16 nScript; @@ -259,6 +278,7 @@ sal_Int16 MsLangId::getScriptType( LanguageType nLang ) case LANGUAGE_ASSAMESE: case LANGUAGE_BENGALI: case LANGUAGE_BENGALI_BANGLADESH: + case LANGUAGE_BURMESE: case LANGUAGE_FARSI: case LANGUAGE_HEBREW: case LANGUAGE_MARATHI: @@ -291,6 +311,10 @@ sal_Int16 MsLangId::getScriptType( LanguageType nLang ) case LANGUAGE_URDU_INDIA: case LANGUAGE_USER_KURDISH_IRAQ: case LANGUAGE_USER_KURDISH_IRAN: + case LANGUAGE_DHIVEHI: + case LANGUAGE_USER_BODO_INDIA: + case LANGUAGE_USER_DOGRI_INDIA: + case LANGUAGE_USER_MAITHILI_INDIA: nScript = ::com::sun::star::i18n::ScriptType::COMPLEX; break; @@ -312,7 +336,7 @@ sal_Int16 MsLangId::getScriptType( LanguageType nLang ) nScript = ::com::sun::star::i18n::ScriptType::ASIAN; break; // CTL catcher - case LANGUAGE_ARABIC & LANGUAGE_MASK_PRIMARY: + case LANGUAGE_ARABIC_SAUDI_ARABIA & LANGUAGE_MASK_PRIMARY: nScript = ::com::sun::star::i18n::ScriptType::COMPLEX; break; // Western (actually not necessarily Latin but also Cyrillic, for example) @@ -330,26 +354,49 @@ LanguageType MsLangId::getReplacementForObsoleteLanguage( LanguageType nLang ) { switch (nLang) { + default: + break; // nothing case LANGUAGE_OBSOLETE_USER_LATIN: nLang = LANGUAGE_LATIN; + break; case LANGUAGE_OBSOLETE_USER_MAORI: nLang = LANGUAGE_MAORI_NEW_ZEALAND; + break; case LANGUAGE_OBSOLETE_USER_KINYARWANDA: nLang = LANGUAGE_KINYARWANDA_RWANDA; + break; case LANGUAGE_OBSOLETE_USER_UPPER_SORBIAN: nLang = LANGUAGE_UPPER_SORBIAN_GERMANY; + break; case LANGUAGE_OBSOLETE_USER_LOWER_SORBIAN: nLang = LANGUAGE_LOWER_SORBIAN_GERMANY; + break; case LANGUAGE_OBSOLETE_USER_OCCITAN: nLang = LANGUAGE_OCCITAN_FRANCE; + break; case LANGUAGE_OBSOLETE_USER_BRETON: nLang = LANGUAGE_BRETON_FRANCE; + break; case LANGUAGE_OBSOLETE_USER_KALAALLISUT: nLang = LANGUAGE_KALAALLISUT_GREENLAND; + break; case LANGUAGE_OBSOLETE_USER_LUXEMBOURGISH: nLang = LANGUAGE_LUXEMBOURGISH_LUXEMBOURG; - default: - ; // nothing + break; + + // The following are not strictly obsolete but should be mapped to a + // replacement locale when encountered. + + // no_NO is an alias for nb_NO + case LANGUAGE_NORWEGIAN: + nLang = LANGUAGE_NORWEGIAN_BOKMAL; + break; + + // #i94435# A Spanish variant that differs only in collation details we + // do not support. + case LANGUAGE_SPANISH_DATED: + nLang = LANGUAGE_SPANISH_MODERN; + break; } return nLang; } |