-
-
Notifications
You must be signed in to change notification settings - Fork 673
Closed
Description
🐛 Bug Report
When I have an ordinal and non-ordinal versions of a key, ordinal one is never picked up even if used like t('key', { ordinal: true })
e.g.
{
"test_ordinal_one": "Every {{count}}st month",
"test_one": "Every month",
}
t('test', { count: 1, ordinal: true }) // Returns "Every month"
t('test', { count: 21, ordinal: true }) // Returns "Every month"
t('test', { count: 31, ordinal: true }) // Returns "Every month"
To Reproduce
See minimal reproducible example on playground
Rendered:
1 - Every month
1 (ordinal) - Every month
2 (ordinal) - Every 2nd month
3 (ordinal) - Every 3rd month
11 (ordinal) - Every 11th month
21 (ordinal) - Every month
31 (ordinal) - Every month
Expected behavior
t('test', { count: 21, ordinal: true })
Should return "Every 21st month"
It should render
1 - Every month
1 (ordinal) - Every 1st month
2 (ordinal) - Every 2nd month
3 (ordinal) - Every 3rd month
11 (ordinal) - Every 11th month
21 (ordinal) - Every 21st month
31 (ordinal) - Every 31st month
Your Environment
- runtime version: Chrome 139.0.7258.127
- i18next version: 25.3.4
- os: Mac
Metadata
Metadata
Assignees
Labels
No labels