https://bugs.documentfoundation.org/show_bug.cgi?id=160558

            Bug ID: 160558
           Summary: Calc shows incorrect words in portuguese ordinal
                    numbers when formatting using [NatNum12 ordinal]
           Product: LibreOffice
           Version: 24.2.2.2 release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Calc
          Assignee: [email protected]
          Reporter: [email protected]

Description:
I am using a custom number format with the specifiers `[NatNum 12 ordinal]` and
`[NatNum12 ordinal-feminine]` and the numbers shown are written incorrectly,
both in masculine and in feminine.
This problem affects both Brazilian Portuguese and European Portuguese. A
secondary, but inseparable problem is that Brazil is the only
portuguese-speaking country that uses the short scale for big numbers. All
others countries use the long scale.

I dont know how big integers can get in Calc, so I only tested numbers up to
multiples of 10^9.

Steps to Reproduce:
1. Type a number in any cell.
2. Right-click and select Format Cells...
3. In the Numbers tab, use one of the following Format Codes: [NatNum12
ordinal]0 or [NatNum12 ordinal-feminine]0
4. Click OK.

Actual Results:
number -> ordinal(feminine ending)

40  -> cuadragésimo(a)
50  -> quincuagésimo(a)
400 -> quadrigentésimo(a)
700 -> septicentésimo(a)
800 -> octigentésimo(a)

Greater than one thousand:
1000 -> milésimo(a) (This is one correct, but the next ones are not.)
2000 -> dois milésimo(a)
3000 -> três milésimo(a)
4000 -> quatro(a) milésimo(a)
5000 -> cinco(a) milésimo

Greater than ten thousand: Simply do not exist.

Greater than one hundred thousand: Simply do not exist.

(For multiples of 10^4 and 10^5, the cell still shows the same arabic numbers.
For other numbers it does not show the ordinals within this range in the long
ordinal form.)

Greater than a million:
1.000.000 -> milionésimo(a) (This is one correct, but the next ones are not.)
2.000.000 -> dois milionésimo(a)
3.000.000 -> três milionésimo(a)
4.000.000 -> quatro(a) milionésimo(a)
...
(Brazil)
1.000.000.000 -> bilionésimo(a) (Correct, but the next ones are not.)
2.000.000.000 -> dois bilionésimo(a)
2.001.100.001 -> dois bilionésimo(a) milésimo(a)
3.000.000.000 -> três bilionésimo(a)
4.000.000.000 -> quatro(a) bilionésimo(a)
(the rest)
1.000.000.000 -> bilionésimo(a) (incorrect, all should use long scale)
2.000.000.000 -> dois bilionésimo(a)
2.001.100.001 -> dois bilionésimo(a) milionésimo(a)
3.000.000.000 -> três bilionésimo(a)
4.000.000.000 -> quatro(a) bilionésimo(a)

Expected Results:
number -> ordinal(feminine ending)
40  -> quadragésimo(a)
50  -> quinquagésimo(a)
400 -> quadriNgentésimo(a)
700 -> septiNgentésimo(a)
800 -> octiNgentésimo(a)

Greater than one thousand:
1000 -> milésimo(a)
2000 -> segundo(a) milésimo(a)
3000 -> terceiro(a) milésmio(a)
4000 -> quarto(a) milésimo(a)
5000 -> quinto(a) milésimo(a)

Greater than ten thousand:
10.000 -> décimo(a) milésimo(a)
11.000 -> décimo(a) primeiro(a) milésimo(a)
22.222 -> vigésimo(a) segundo(a) milésimo(a) ducentésimo(a) vigésimo(a)
segundo(a)

Greater than one hundred thousand:
100.000 -> centésimo(a) milésimo(a)
111.000 -> centésimo(a) décimo(a) primeiro(a) milésimo(a)
222.222 -> ducentésimo(a) vigésimo(a) segundo(a) milésimo(a) ducentésimo(a)
vigésimo(a) segundo(a)

Greater than a million:
1.000.000 -> milionésimo(a)
2.000.000 -> segundo(a) milionésimo(a)
3.000.000 -> terceiro(a) milionésimo(a)
4.000.000 -> quarto(a) milionésimo(a)
...
(Brazil)
1.000.000.000 -> bilionésimo(a) (Correct, but the next ones are not.)
2.000.000.000 -> segundo(a) bilionésimo(a)
2.001.100.001 -> segundo(a) bilionésimo(a) milionésimo(a) centésimo(a)
milésimo(a) primeiro(a)
3.000.000.000 -> terceiro(a) bilionésimo(a)
4.000.000.000 -> quarto(a) bilionésimo(a)
(the rest)
1.000.000.000 -> milésimo(a) milionésimo(a)
2.000.000.000 -> segundo(a) milésimo(a) milionésimo(a)
2.001.100.001 -> segundo(a) milésimo(a) primeiro(a) milionésimo(a) centésimo(a)
milésimo(a) primeiro(a)
3.000.000.000 -> terceiro(a) milésimo(a) milionésimo(a)
4.000.000.000 -> quarto(a) milésimo(a) milionésimo(a)


Reproducible: Always


User Profile Reset: Yes

Additional Info:
- long and short scales: 
https://en.wikipedia.org/wiki/Long_and_short_scales

- numbers in portuguese: 
https://en.wiktionary.org/wiki/Appendix:Portuguese_numbers
https://european-portuguese.info/numbers

- [NatNum12] :
https://help.libreoffice.org/latest/en-US/text/shared/01/05020301.html

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to