From eb7bbb761fd34f76cbfd89b45846c6cb9083d24e Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Mon, 28 Nov 2022 13:29:12 +0100 Subject: [PATCH] Resolves: tdf#148792 Add Portuguese (Mozambique) {pt-MZ} locale and data Basically copies pt_PT.xml but replaces translated with untranslated keywords (AA,AAAA => YY,YYYY), hence no ref="pt_PT" for LC_FORMAT (and LC_CTYPE). Also use sort-formats.awk -v group=1 to sort FormatElement by usage group and formatIndex as those went quite wild over time.. Change-Id: Iececac0ebdd0317fd14ab65f32c08501f3ce32c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143398 Reviewed-by: Eike Rathke Tested-by: Jenkins --- i18nlangtag/source/isolang/isolang.cxx | 2 + i18npool/Library_localedata_euro.mk | 1 + i18npool/source/localedata/data/pt_MZ.xml | 282 ++++++++++++++++++++++++++++++ i18npool/source/localedata/localedata.cxx | 3 +- include/i18nlangtag/lang.h | 1 + svtools/inc/langtab.hrc | 3 +- 6 files changed, 290 insertions(+), 2 deletions(-) create mode 100644 i18npool/source/localedata/data/pt_MZ.xml diff --git a/i18nlangtag/source/isolang/isolang.cxx b/i18nlangtag/source/isolang/isolang.cxx index 5204b212d86b..c5259a53886d 100644 --- a/i18nlangtag/source/isolang/isolang.cxx +++ b/i18nlangtag/source/isolang/isolang.cxx @@ -674,6 +674,8 @@ IsoLanguageCountryEntry const aImplIsoLangEntries[] = { LANGUAGE_USER_KLINGON, "tlh", "" , k0 }, { LANGUAGE_USER_ENGLISH_ISRAEL, "en", "IL", k0 }, { LANGUAGE_USER_PENNSYLVANIA_DUTCH, "pdc", "US", k0 }, + { LANGUAGE_USER_PORTUGUESE_MOZAMBIQUE, "pt", "MZ", k0 }, + // Add new languages ^^^ there. { LANGUAGE_MULTIPLE, "mul", "" , k0 }, // multiple languages, many languages are used { LANGUAGE_UNDETERMINED, "und", "" , k0 }, // undetermined language, language cannot be identified { LANGUAGE_NONE, "zxx", "" , k0 }, // added to ISO 639-2 on 2006-01-11: Used to declare the absence of linguistic information diff --git a/i18npool/Library_localedata_euro.mk b/i18npool/Library_localedata_euro.mk index 069809bcf0af..b2f6ce549c42 100644 --- a/i18npool/Library_localedata_euro.mk +++ b/i18npool/Library_localedata_euro.mk @@ -86,6 +86,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,localedata_euro,\ CustomTarget/i18npool/localedata/localedata_oc_FR_lengadoc \ CustomTarget/i18npool/localedata/localedata_pl_PL \ CustomTarget/i18npool/localedata/localedata_pt_BR \ + CustomTarget/i18npool/localedata/localedata_pt_MZ \ CustomTarget/i18npool/localedata/localedata_pt_PT \ CustomTarget/i18npool/localedata/localedata_ro_RO \ CustomTarget/i18npool/localedata/localedata_rue_SK \ diff --git a/i18npool/source/localedata/data/pt_MZ.xml b/i18npool/source/localedata/data/pt_MZ.xml new file mode 100644 index 000000000000..db4ef6896ece --- /dev/null +++ b/i18npool/source/localedata/data/pt_MZ.xml @@ -0,0 +1,282 @@ + + + + + + + pt + Portuguese + + + MZ + Mozambique + + + + + - +   + , + : + , + ; + , + de + de + + + + + + + + + AM + PM + Metric + + + D-M + + Geral + + + 0 + + + 0,00 + + + # ##0 + + + # ##0,00 + + + # ###,00 + + + [NatNum12 cardinal]0 + + + [NatNum12 capitalize cardinal]0 + + + [NatNum12 upper cardinal]0 + + + 0,00E+000 + + + 0,00E+00 + + + ##0,00E+00 + + + 0% + + + 0,00% + + + # ##0 [CURRENCY];-# ##0 [CURRENCY] + + + # ##0,00 [CURRENCY];-# ##0,00 [CURRENCY] + + + # ##0 [CURRENCY];[RED]-# ##0 [CURRENCY] + + + # ##0,00 [CURRENCY];[RED]-# ##0,00 [CURRENCY] + + + # ##0,00 CCC + + + # ##0,-- [CURRENCY];[RED]-# ##0,-- [CURRENCY] + + + [NatNum12 CURRENCY]0 + + + [NatNum12 CURRENCY]0,00 + + + [NatNum12 upper CURRENCY]0 + + + [NatNum12 upper CURRENCY]0,00 + + + DD-MM-YYYY + + + NNNND "de" MMMM "de" YYYY + + + DD-MM-YY + + + DD-MM-YYYY + + + D "de" MMM "de" YY + + + D "de" MMM "de" YYYY + + + D. MMM "de" YYYY + + + D "de" MMMM "de" YYYY + + + D. MMMM "de" YYYY + + + NN, D "de" MMM "de" YY + + + NN, DD-MMM-YY + + + NN, D "de" MMMM "de" YYYY + + + NNNND "de" MMMM "de" YYYY + + + MM-DD + + + YY-MM-DD + + + YYYY-MM-DD + ISO 8601 (EN 28601) + + + MM-YY + + + DD-MMM + + + MMMM + + + QQ "de" YY + + + WW + + + QQ "de" YYYY + + + Q "de" YY + + + Q "de" YYYY + + + DD-MMM-YY + + + DD-MMM-YYYY + + + MMMM-YYYY + + + MMM-YYYY + + + MMMM-YY + + + MMM-YY + + + D-MMMM-YYYY + + + D-MMMM-YY + + + MMMM "de" YYYY + + + MMM "de" YYYY + + + HH:MM + + + HH:MM:SS + + + HH:MM AM/PM + + + HH:MM:SS AM/PM + + + [HH]:MM:SS + + + MM:SS,00 + + + [HH]:MM:SS,00 + + + DD-MM-YY HH:MM + + + DD-MM-YYYY HH:MM:SS + + + DD-MM-YYYY HH:MM + + + YYYY-MM-DD HH:MM + + + + + + + + + MZN + MTn + MZN + metical moçambicano + 2 + + + + + + + diff --git a/i18npool/source/localedata/localedata.cxx b/i18npool/source/localedata/localedata.cxx index 8bf2bbc27dd8..4291df4809e9 100644 --- a/i18npool/source/localedata/localedata.cxx +++ b/i18npool/source/localedata/localedata.cxx @@ -142,8 +142,9 @@ const struct { { "nb_NO", lcl_DATA_EURO }, { "nds_DE", lcl_DATA_EURO }, { "pl_PL", lcl_DATA_EURO }, - { "pt_BR", lcl_DATA_EURO }, { "pt_PT", lcl_DATA_EURO }, + { "pt_BR", lcl_DATA_EURO }, // needs to be in EURO because inherits from pt_PT + { "pt_MZ", lcl_DATA_EURO }, // needs to be in EURO because inherits from pt_PT { "ru_RU", lcl_DATA_EURO }, { "tr_TR", lcl_DATA_EURO }, { "tt_RU", lcl_DATA_EURO }, diff --git a/include/i18nlangtag/lang.h b/include/i18nlangtag/lang.h index 0e4c6d23a9b4..158a7c7fe5be 100644 --- a/include/i18nlangtag/lang.h +++ b/include/i18nlangtag/lang.h @@ -774,6 +774,7 @@ namespace o3tl #define LANGUAGE_USER_INTERSLAVIC_LATIN LanguageType(0x06AD) #define LANGUAGE_USER_INTERSLAVIC_CYRILLIC LanguageType(0x06AE) #define LANGUAGE_USER_PENNSYLVANIA_DUTCH LanguageType(0x06AF) +#define LANGUAGE_USER_PORTUGUESE_MOZAMBIQUE LanguageType(0x8416) /* makeLangID( 0x21, getPrimaryLanguage( LANGUAGE_PORTUGUESE)) */ /* XXX Add new user defined LCIDs ^^^ there. diff --git a/svtools/inc/langtab.hrc b/svtools/inc/langtab.hrc index cb23437358bc..5d1ed4a7e987 100644 --- a/svtools/inc/langtab.hrc +++ b/svtools/inc/langtab.hrc @@ -438,7 +438,8 @@ const std::pair STR_ARR_SVT_LANGUAGE_TABLE[] = { NC_("STR_ARR_SVT_LANGUAGE_TABLE", "English (Israel)") , LANGUAGE_USER_ENGLISH_ISRAEL }, { NC_("STR_ARR_SVT_LANGUAGE_TABLE", "Interslavic Latin") , LANGUAGE_USER_INTERSLAVIC_LATIN }, { NC_("STR_ARR_SVT_LANGUAGE_TABLE", "Interslavic Cyrillic") , LANGUAGE_USER_INTERSLAVIC_CYRILLIC }, - { NC_("STR_ARR_SVT_LANGUAGE_TABLE", "Pennsylvania Dutch") , LANGUAGE_USER_PENNSYLVANIA_DUTCH } + { NC_("STR_ARR_SVT_LANGUAGE_TABLE", "Pennsylvania Dutch") , LANGUAGE_USER_PENNSYLVANIA_DUTCH }, + { NC_("STR_ARR_SVT_LANGUAGE_TABLE", "Portuguese (Mozambique)") , LANGUAGE_USER_PORTUGUESE_MOZAMBIQUE } }; -- 2.11.4.GIT