Bug 133842 - Localized Ordinal numbering have gender
Summary: Localized Ordinal numbering have gender
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
25.8.2.2 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 135434 (view as bug list)
Depends on:
Blocks: Bullet-Number-Outline-Lists
  Show dependency treegraph
 
Reported: 2020-06-09 22:40 UTC by Olivier Hallot
Modified: 2025-10-14 07:39 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
pt.odt: test document with a list formatted in feminine ordinal number names (10.37 KB, application/vnd.oasis.opendocument.text)
2025-10-13 16:12 UTC, László Németh
Details
pt.sor: modified Brazilian-Portuguese language file to get feminine gender using localized list format "First, Second, Three" (4.93 KB, application/octet-stream)
2025-10-13 16:37 UTC, László Németh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Hallot 2020-06-09 22:40:55 UTC
In English, we have first, second, third, ... which are invariant.

In some latin languages, these ordinals flex with gender

pt: 
Primeiro, Primeira
Segundo, Segunda
Terceiro, Terceira
Quarto, Quarta
Quinto, Quinta
(...)

We need a second ordinal numbering with female gender.
Comment 1 Dieter 2020-08-04 15:57:54 UTC
*** Bug 135434 has been marked as a duplicate of this bug. ***
Comment 2 Clésio Pinheiro 2020-08-05 08:39:39 UTC
Other examples are:

Portuguese – male: primeiro, segundo, terceiro
Portuguese – female: primeira, segunda, terceira

Italian – male: primo, secondo, terzo
Italian – female: prima, seconda, terza

Spanish – male: primero, segundo, tercero
Spanish – female: primera, segunda, tercera

Writer has the numbers for male gender, but not for female.
Comment 3 Stanislav Horacek 2022-07-13 21:01:30 UTC
I agree that this would be very useful to have an option to choose which category of libnumbertext is used for numbering - i.e. not to restrict it to "ordinal", but also to use "ordinal-feminine" etc.

(A typical issue in Czech: chapters are often numbered by text, which is currently not possible as word for chapter is feminine.)

As this is related to bug #117171, trying to ask László here: is anything like this planned or do you have an idea how this should be implemented?
Comment 4 László Németh 2022-07-20 11:53:49 UTC
(In reply to Stanislav Horacek from comment #3)
> As this is related to bug #117171, trying to ask László here: is anything
> like this planned or do you have an idea how this should be implemented?

@Stanislav, Olivier & All: I'm going to check the issue. I plan to fix it for a long time, especially because for dates it's possible to add special NumberText conversions using NatNum12. (Used by the Hungarian module this way:

i18npool/source/localedata/data/hu_HU.xml:      <FormatCode>[NatNum12 MMMM=abbreviation]YYYY". "MMMM D.</FormatCode>
i18npool/source/localedata/data/hu_HU.xml:      <FormatCode>[NatNum12 D=possessive]YYYY". "MMMM D</FormatCode>
i18npool/source/localedata/data/hu_HU.xml:      <FormatCode>[NatNum12 D=possessive-superessive]YYYY". "MMMM D</FormatCode>
i18npool/source/localedata/data/hu_HU.xml:      <FormatCode>[NatNum12 D=possessive-ablative]YYYY". "MMMM D</FormatCode>
i18npool/source/localedata/data/hu_HU.xml:      <FormatCode>[NatNum12 D=possessive-terminative]YYYY". "MMMM D</FormatCode>
i18npool/source/localedata/data/hu_HU.xml:      <FormatCode>[NatNum12 D=possessive-adjective]YYYY". "MMMM D</FormatCode>
i18npool/source/localedata/data/hu_HU.xml:      <FormatCode>[NatNum12 D=possessive-superessive,NNN=superessive]YYYY". "MMMM D, NNN</FormatCode>
i18npool/source/localedata/data/hu_HU.xml:      <FormatCode>[NatNum12 D=possessive]MMMM" "D</FormatCode>
i18npool/source/localedata/data/hu_HU.xml:      <FormatCode>[NatNum12 D=possessive-superessive]MMMM" "D</FormatCode>
i18npool/source/localedata/data/hu_HU.xml:      <FormatCode>[NatNum12 D=possessive-ablative]MMMM" "D</FormatCode>
i18npool/source/localedata/data/hu_HU.xml:      <FormatCode>[NatNum12 D=possessive-terminative]MMMM" "D</FormatCode>
i18npool/source/localedata/data/hu_HU.xml:      <FormatCode>[NatNum12 MMMM=article,D=possessive-adjective]MMMM" "D</FormatCode>
i18npool/source/localedata/data/hu_HU.xml:      <FormatCode>[NatNum12 MMMM=capitalize article,D=possessive-adjective]MMMM" "D</FormatCode>
i18npool/source/localedata/data/hu_HU.xml:      <FormatCode>[NatNum12 MMMM=article,D=adjective]MMMM" "D</FormatCode>
i18npool/source/localedata/data/hu_HU.xml:      <FormatCode>[NatNum12 MMMM=capitalize article,D=adjective]MMMM" "D</FormatCode>
i18npool/source/localedata/data/hu_HU.xml:      <FormatCode>[NatNum12 MMMM=article]MMMM"i"</FormatCode>
i18npool/source/localedata/data/hu_HU.xml:      <FormatCode>[NatNum12 MMMM=capitalize article]MMMM"i"</FormatCode>
i18npool/source/localedata/data/hu_HU.xml:      <FormatCode>[NatNum12 superessive]NNN</FormatCode>
i18npool/source/localedata/data/hu_HU.xml:      <FormatCode>[NatNum12 ablative]NNN</FormatCode>
i18npool/source/localedata/data/hu_HU.xml:      <FormatCode>[NatNum12 terminative]NNN</FormatCode>
i18npool/source/localedata/data/hu_HU.xml:      <FormatCode>[NatNum12 inessive]YYYY</FormatCode>
i18npool/source/localedata/data/hu_HU.xml:      <FormatCode>[NatNum12 ablative]YYYY</FormatCode>
i18npool/source/localedata/data/hu_HU.xml:      <FormatCode>[NatNum12 article]MMMM</FormatCode>
i18npool/source/localedata/data/hu_HU.xml:      <FormatCode>[NatNum12 capitalize article]MMMM</FormatCode>
i18npool/source/localedata/data/hu_HU.xml:      <FormatCode>[NatNum12 inessive]MMMM</FormatCode>
i18npool/source/localedata/data/hu_HU.xml:      <FormatCode>[NatNum12 article inessive]MMMM</FormatCode>
i18npool/source/localedata/data/hu_HU.xml:      <FormatCode>[NatNum12 capitalize article inessive]MMMM</FormatCode>
i18npool/source/localedata/data/hu_HU.xml:      <FormatCode>[NatNum12 ablative]MMMM</FormatCode>
i18npool/source/localedata/data/hu_HU.xml:      <FormatCode>[NatNum12 article ablative]MMMM</FormatCode>
i18npool/source/localedata/data/hu_HU.xml:      <FormatCode>[NatNum12 capitalize article ablative]MMMM</FormatCode>
i18npool/source/localedata/data/hu_HU.xml:      <FormatCode>[NatNum12 MMMM=possessive-inessive]YYYY" "MMMM</FormatCode>
i18npool/source/localedata/data/hu_HU.xml:      <FormatCode>[NatNum12 MMMM=possessive-ablative]YYYY" "MMMM</FormatCode>
i18npool/source/localedata/data/hu_HU.xml:      <FormatCode>[NatNum12 MMMM=possessive-terminative]YYYY" "MMMM</FormatCode>
i18npool/source/localedata/data/hu_HU.xml:      <FormatCode>[NatNum12 ordinal year]YYYY</FormatCode>)

Thanks for the bug report!

Best regards,

László
Comment 5 Regis Barbosa 2025-10-13 15:12:34 UTC
I really need this feature to be implemented.

I’m a lawyer and I usually number the contract clauses manually.

They are numbered like this:

> Cláusula Primeira - ...
> Cláusula Segunda - ...
> Cláusula Terceira - ...
> ...

The only option currently available in LibreOffice Writer for automatic numbering (in list and numbering styles) is the masculine form — which doesn’t meet my needs.

Does anyone know if there’s any way to solve this? I’ve even tried looking into whether there are editable open files in the user configuration folder.

Ordinal with female gender.
Comment 6 László Németh 2025-10-13 16:12:19 UTC
Created attachment 203303 [details]
pt.odt: test document with a list formatted in feminine ordinal number names
Comment 7 László Németh 2025-10-13 16:28:13 UTC
User variables and formulas can use user-defined format with arbitrary NumberText formula, for example feminine etc. genders, if that is defined in the Soros source (*.sor).

The attached document contains several formula fields, showing

Primeira
Segunda
Terceira
Quarta
Quinta
Sexta


Removing an item, or copying a new one update the list immediately.

It's possible to modify the format in the following way:

1. Double click on the item. 

2. In Edit Fields dialog window, choose Format "Additional formats...".

3. In Format Number dialog window, choose Category "User-defined".

4. In Format list, choose "Centésima". The format code is

"[NatNum12 capitalize ordinal-feminine]0"

5. Modify the format code to

[NatNum12 upper ordinal-feminine]0

to get uppercase number names.
Comment 8 László Németh 2025-10-13 16:33:46 UTC
Note: As a low-level local (not portable) hack, it's possible to replace the default gender of the localized numbered list "First, Second, Third" by modifying the text file of the NumberText source. E.g. for Brazilian Portuguese, search for the file pt.sor, and modify it, e.g. replacing final "o"-s to "a" in the section "== ordinal-(masculine)? ==".

For example, use the attached modified pt.sor to get a feminine list instead of the default masculine.
Comment 9 László Németh 2025-10-13 16:37:27 UTC
Created attachment 203304 [details]
pt.sor: modified Brazilian-Portuguese language file to get feminine gender using localized list format "First, Second, Three"

Replace installed pt.sor with this to get numbered lists in feminine gender.
Comment 10 László Németh 2025-10-14 07:39:28 UTC
(In reply to László Németh from comment #7)
> User variables and formulas can use user-defined format with arbitrary
> NumberText formula, for example feminine etc. genders, if that is defined in
> the Soros source (*.sor).
> 
> The attached document contains several formula fields, showing
> 
> Primeira
> Segunda
> Terceira
> Quarta
> Quinta
> Sexta
> 
> 
> Removing an item, or copying a new one update the list immediately.
> 
> It's possible to modify the format in the following way:
> 
> 1. Double click on the item. 
> 
> 2. In Edit Fields dialog window, choose Format "Additional formats...".
> 
> 3. In Format Number dialog window, choose Category "User-defined".
> 
> 4. In Format list, choose "Centésima". The format code is
> 
> "[NatNum12 capitalize ordinal-feminine]0"

4.5. Select Locale "Portuguese (Brazil)", too, to get the localized formats.

> 
> 5. Modify the format code to
> 
> [NatNum12 upper ordinal-feminine]0
> 
> to get uppercase number names.