From 2a1d2d42af7f365330479f4032ddfdd9eeba7c1d Mon Sep 17 00:00:00 2001 From: László Németh Date: Thu, 27 Oct 2022 08:36:37 +0200 Subject: tdf#115007 add NatNum12 number format list items, fix title case MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add NumberText NatNum12 number formats, e.g. "One Hundred", and currency formats, e.g. "One U.S. Dollar and Twenty Cents" to number formatting dialog windows, i.e. Format Cells->Numbers in Calc and Format Numbers in Writer (Edit Fields->Format-> Additional formats...). Fix also bad English title case: "One Euro *and* *Twenty-Two* cents" (not *And* and *Twenty-two*) Details: – svl: list NatNum12 NumberText currency codes in Currency formats (i.e. after choosing Currency category). – svx: Recognize bank symbol "CURRENCY" in NatNum12 parameters defined in locale resource files. For example, "[NatNum12 CURRENCY]" is converted to "[NatNum12 USD]" in the number format dialog windows, using bank symbol of the current locale settings. Recognize compatible (old) bank symbol "CCC" in NatNum12 parameters defined in locale resource files. For example, "[NatNum12 CCC]" is converted to "[NatNum12 DEM]" in the number format dialog windows, using bank symbol of the compatible currency of the German locale settings. User-defined formats with arbitrary bank codes are recognized as currency formats, e.g. modifying "[NatNum12 USD]" to "[NatNum12 EUR]" in the dialog window results a new currency format item. – i18npool/*en_US.xml: define four Standard NatNum12 formats (lower case, sentence case, title case, upper case) and four Currency NatNum12 formats (title case, title case with digits, upper case, upper case with digits). – cui: use lower sample numbers for spell out formats: – 100 for Standard: One Hundred one hundred One hundred ONE HUNDRED – 1.2 for Currency: One U.S. Dollar ONE U.S. DOLLAR One U.S. Dollar and Twenty Cents ONE U.S. DOLLAR AND TWENTY CENTS – i18npool: fix English title casing of NatNum12 conversions: – Don't apply casing on "and", according to the title case rules, for example: "One Euro and One Cent" instead of "One Euro And One Cent". – Apply casing on the second element of the hyphenated compound words: "Twenty-One" instead of the bad "Twenty-one". – add unit test for extended Number and Currency categories. Note: according to the changes, update user-defined number format id in chart2/qa/extras/chart2dump/reference/chartdatatest/simple_chart.txt Change-Id: Ieaf9a8f75a4f197b858eaf67f83484df70295834 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141994 Tested-by: Jenkins Reviewed-by: László Németh --- i18npool/source/localedata/data/en_US.xml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'i18npool/source/localedata/data') diff --git a/i18npool/source/localedata/data/en_US.xml b/i18npool/source/localedata/data/en_US.xml index 9e852f743125..14c74a7e2932 100644 --- a/i18npool/source/localedata/data/en_US.xml +++ b/i18npool/source/localedata/data/en_US.xml @@ -77,6 +77,18 @@ #,##0.00_);(#,##0.00) + + [NatNum12 cardinal]0 + + + [NatNum12 capitalize cardinal]0 + + + [NatNum12 title cardinal]0 + + + [NatNum12 upper cardinal]0 + 0.00E+000 @@ -116,6 +128,18 @@ [CURRENCY]* #,##0.00;-[CURRENCY]* #,##0.00 + + [NatNum12 title CURRENCY]0 + + + [NatNum12 title CURRENCY]0.00 + + + [NatNum12 upper CURRENCY]0 + + + [NatNum12 upper CURRENCY]0.00 + M/D/YY -- cgit