You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The plural form of the default value is not parsed correctly using defaultValue_plural. This seems to be the correct keyword according to i18next's doc, but it always falls back to the default singular value no matter what value I change it to. In order to parse the defaultValue plural forms correctly, I have to add another property called defaultValue_other, which does the same thing as the defaultValue_plural is supposed to do. And it works. I am not sure what other value I can change the property to but this is not documented anywhere.
To Reproduce
A minimal reproducible example.
In this sample project, I have provided both the successful examples and the failed examples.
Every time I modify the keys or i18next tags I use yarn lang:extract to parse the keys and translations with gulp in i18next-parser
Expected behavior
I expected the defaultValue_plural property will produce a correct plural form for the default value. like the first two.
But I got results like the last two when using defaultValue_plural with i18next-parser.
JSON output:
"itemCount_one": "{{ count }} unit",
"itemCount_other": "{{ count }} units", // this only works with property "defaultValue_other""itemFailedCount_one": " You can see this is not working using defaultValue_plural: {{ count }} unit",
"itemFailedCount_other": " You can see this is not working using defaultValue_plural: {{ count }} unit"
Your Environment
runtime version: node v18
i18next version: 22.4.12
os: Mac
The text was updated successfully, but these errors were encountered:
馃悰 Bug Report
The plural form of the default value is not parsed correctly using defaultValue_plural. This seems to be the correct keyword according to i18next's doc, but it always falls back to the default singular value no matter what value I change it to. In order to parse the defaultValue plural forms correctly, I have to add another property called defaultValue_other, which does the same thing as the defaultValue_plural is supposed to do. And it works. I am not sure what other value I can change the property to but this is not documented anywhere.
To Reproduce
A minimal reproducible example.
In this sample project, I have provided both the successful examples and the failed examples.
Every time I modify the keys or i18next tags I use
yarn lang:extract
to parse the keys and translations withgulp
ini18next-parser
Expected behavior
I expected the
defaultValue_plural
property will produce a correct plural form for the default value. like the first two.But I got results like the last two when using
defaultValue_plural
withi18next-parser
.JSON output:
Your Environment
The text was updated successfully, but these errors were encountered: