Create a ToFeminineOrdinal function for supporting languages with gendered ordinals
- Dominant language
- Rust
- Stars
- 114
- Forks
- 85
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 42
Description
We would need a function that creates a feminine version of ordinal numbers. This is needed to support languages in which some mathematical structures need the feminnine gender for concordance purposes. In Italian, and Spanish as well, Root is feminine, so we need "radice quartA", not "radice quartO", to translate "fourth root".
My latest attempt is as follows:
[T: "radice", x: "concat(substring(ToOrdinal(*[2]), 1, string-length(ToOrdinal(*[2])) - 1), 'a')"]
This somewhat works, but it seems to only affect 1 digit numbers. For two or more digit numbers, only the second gets ordinalized, so we have "radice venti prima" instead of "ventunesima". This works for English, where we have "twenty first, twenty second, twenty seventh"..., but in Italian it's only one word and needs to be spoken as such to be credible.
Any ideas on how to accomplish this?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by finding the existing ToOrdinal implementation and the language-specific ordinal rules it uses. Add ToFeminineOrdinal so multi-digit Italian and Spanish ordinals are treated as one ordinal, then verify examples such as ventunesima and radice quarta with regression tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- localization
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100