LibreOffice » i18nlangtag
View module in: git
Code for language tags, LanguageTag wrapper for liblangtag and converter between BCP47 language tags, Locale(Language,Country,Variant) and MS-LangIDs.
Basic functionality used by almost every other module including comphelper, so even don’t use that string helpers in this code to not create circular dependencies. Stick with sal and rtl!
If Microsoft introduced a new LCID for a locale that we previously defined as LANGUAGE_USER_..., for example LANGUAGE_CATALAN_VALENCIAN that we had as LANGUAGE_USER_CATALAN_VALENCIAN:
include/i18nlangtag/lang.h
LANGUAGE_... value as defined by MS, here LANGUAGE_CATALAN_VALENCIANLANGUAGE_USER_... definition to LANGUAGE_OBSOLETE_USER_..., here LANGUAGE_USER_CATALAN_VALENCIAN to LANGUAGE_OBSOLETE_USER_CATALAN_VALENCIAN#define LANGUAGE_USER_CATALAN_VALENCIAN LANGUAGE_CATALAN_VALENCIAN
svtools/source/misc/langtab.src (where the defined name is an identifier) and other places using LANGUAGE_USER_CATALAN_VALENCIAN do not need to be changedi18nlangtag/source/isolang/isolang.cxx
LANGUAGE_CATALAN_VALENCIAN before (!) the existing LANGUAGE_USER_CATALAN_VALENCIANLANGUAGE_USER_CATALAN_VALENCIAN to LANGUAGE_OBSOLETE_USER_CATALAN_VALENCIAN
LANGUAGE_CATALAN_VALENCIAN and converting the old LANGUAGE_OBSOLETE_USER_CATALAN_VALENCIAN still maps to the tag.i18nlangtag/source/isolang/mslangid.cxx
MsLangId::getReplacementForObsoleteLanguage() to convert LANGUAGE_OBSOLETE_USER_CATALAN_VALENCIAN to LANGUAGE_CATALAN_VALENCIANWhen changing a (translation’s) language tag (for example, ca-XV to ca-valencia or sh to sr-Latn):
solenv/inc/langlist.mk
in translations/source do git mv old-tag new-tag
i18nlangtag/source/isolang/isolang.cxx
aImplIsoLangEntries to be able to read existing documents using that codeaImplBcp47CountryEntries or aImplIsoLangScriptEntriesmnOverride from 0 to kSAME in aImplIsoLangScriptEntries or aImplIsoLangEntriesi18nlangtag/source/languagetag/languagetag.cxx
LanguageTag::getFallbackStrings()i18nlangtag/qa/cppunit/test_languagetag.cxx
l10ntools/source/ulfconv/msi-encodinglist.txt
setup_native/source/packinfo/spellchecker_selection.txt
If locale data exists:
i18npool/source/localedata/data/*.xml for example i18npool/source/localedata/data/sh_RS.xml
<LC_INFO> element
<LangID> to qlt<Country> element add a <Variant> element with the new full BCP 47 tag, for example sr-Latn-RS
<Variant> has no <VariantID> or <DefaultName> child elements*.xml files reference the locale in a ref="..." attribute, change those too; note that these references use ‘_’ underscore instead of ‘-’ hyphen just like the file names dosh_RS.xml to sr_Latn_RS.xml, git mv sh_RS.xml sr_Latn_RS.xmli18npool/source/localedata/localedata.cxx
aLibTable change the entry from old sh_RS to new sr_Latn_RS, do not sort the tablei18npool/Library_localedata_*.mk for example i18npool/Library_localedata_euro.mk
.xml file, for example CustomTarget/i18npool/localedata/localedata_sh_RS to CustomTarget/i18npool/localedata/localedata_sr_Latn_RS, sort the list alphabeticallyIf dictionary exists:
dictionaries/*/dictionaries.xcu for example dictionaries/sr/dictionaries.xcu
<node oor:name="..."> elements to something corresponding, for example <node oor:name="HunSpellDic_sh" ...> to <node oor:name="HunSpellDic_sr_Latn" ...>Locales properties change the <value> element, for example <value>sh-RS</value> to <value>sr-Latn-RS</value>If dictionary is to be renamed, for example ku-TR to kmr-Latn:
dictionaries/*/* for example dictionaries/ku_TR/*
*.dic and *.aff files, for example ku_TR.dic to kmr_Latn.dic and ku_TR.aff to kmr_Latn.affdictionaries/Dictionary_*.mk for example dictionaries/Dictionary_ku_TR.mk
Dictionary_kmr_Latn.mkku_TR to kmr_Latn AND ku-TR to kmr-Latn; note ‘-’ and ‘_’ separators, both are used!dictionaries/Module_dictionaries.mk
Dictionary_* (Dictionary_ku-TR to Dictionary_kmr-Latn) and sort alphabeticallyscp2/source/ooo/common_brand.scp
DosName = "dict-ku-TR";
"dict-kmr-Latn"scp2/source/ooo/file_ooo.scp
gid_File_Extension_Dictionary_Ku_Tr
gid_File_Extension_Dictionary_Kmr_LatnName = "Dictionary/dict-ku-TR.filelist";
"Dictionary/dict-kmr-Latn.filelist"scp2/source/ooo/module_ooo.scp
gid_Module_Root_Extension_Dictionary_Ku_Tr
gid_Module_Root_Extension_Dictionary_Kmr_LatnMOD_NAME_DESC ( MODULE_EXTENSION_DICTIONARY_KU_TR );
MODULE_EXTENSION_DICTIONARY_KMR_LATNFiles = (gid_File_Extension_Dictionary_Ku_Tr);
gid_File_Extension_Dictionary_Kmr_LatnSpellcheckerlanguage = "ku-TR";
"kmr-Latn"scp2/source/ooo/module_ooo.ulf
STR_NAME_MODULE_EXTENSION_DICTIONARY_KU_TR]
STR_NAME_MODULE_EXTENSION_DICTIONARY_KMR_LATNen-US = "Kurdish (Turkey)"
"Kurdish, Northern, Latin script"STR_DESC_MODULE_EXTENSION_DICTIONARY_KU_TR]
STR_DESC_MODULE_EXTENSION_DICTIONARY_KMR_LATNen-US = "Kurdish (Turkey) spelling dictionary"
"Kurdish, Northern, Latin script spelling dictionary"setup_native/source/packinfo/packinfo_office.txt
module = "gid_Module_Root_Extension_Dictionary_Ku_Tr"
"gid_Module_Root_Extension_Dictionary_Kmr_Latn"solarispackagename = "%PACKAGEPREFIX%WITHOUTDOTUNIXPRODUCTNAME%BRANDPACKAGEVERSION-dict-ku-TR"
"...-dict-kmr-Latn"packagename = "%UNIXPRODUCTNAME%BRANDPACKAGEVERSION-dict-ku-TR"
"...-dict-kmr-Latn"description = "Ku-TR dictionary for %PRODUCTNAME %PRODUCTVERSION"
"Kmr-Latn dictionary ..."If extras exist, for example extras/source/autotext/*:
extras/Package_autocorr.mk
acor_* entry, for example acor_sh-RS.dat to acor_sr-Latn-RS.dat, sort alphabeticallyextras/CustomTarget_autocorr.mk
extras_AUTOCORR_LANGS change map entry, for example sh-RS:sh-RS to sr-Latn-RS:sr-Latn-Rsextras_AUTOCORR_XMLFILES change directory entries, for example sh-RS/acor/DocumentList.xml to sr-Latn-RS/acor/DocumentList.xmlrename files accordingly, for example in extras/source/autotext/lang/ git mv sh-RS sr-Latn-RS
If helpcontent exists:
helpcontent2/source/auxiliary/*/* for example helpcontent2/source/auxiliary/sh/*
Language=..., for example Language=sh to Language=sr-Latn in helpcontent2/source/auxiliary/sh/*.cfghelpcontent2/source/auxiliary/sh/ git mv sh sr-LatnFor language packs:
scp2/source/ooo/module_langpack.ulfscp2/source/accessories/module_templates_accessories.ulfscp2/source/accessories/module_samples_accessories.ulfscp2/source/extensions/module_extensions_sun_templates.ulf
STR_NAME_MODULE_LANGPACK_SH to STR_NAME_MODULE_LANGPACK_SR_LATNGenerated by Libreoffice CI on lilith.documentfoundation.org
Last updated: 2023-07-30 04:48:19 | Privacy Policy | Impressum (Legal Info)