-
Notifications
You must be signed in to change notification settings - Fork 45
Proper way to display ordinal numbers #359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
If the results are as you describe also with the example that's in the docs, then I believe you've found a bug with the Python implementation, rather than a spec bug. |
Here’s what the python implementation does with the docs example:
I’ve just checked that the js implementation produces the expected strings first/2nd/5th/21st, so I’ll open a bug over on the python implementation. |
Follow-up at issue projectfluent/python-fluent#192 and PR projectfluent/python-fluent#193 |
The docs give the following example:
But it seems
type: "ordinal"
is not recognised. Even when ignoring the CLDR plural categories and changing the selector for exact matches we are limited:So what is the option to properly display irregular ordinals (X1st, X2nd, X3rd)? Is there a number format for ordinals? Is there a way to perform a calculation on the selector (here
$pos > 20 + $pos % 10
could do but this will be locale-specific)? Or is my only option to enumerate them all?The text was updated successfully, but these errors were encountered: