Is your feature request related to a problem? Please describe.
Currently this excellent plugin supports only the one basic form of default value: "defaultValue".
i18next supports a buch of suffixes for defaultValue: https://www.i18next.com/translation-function/essentials#overview-options
That would allow to maintain the default locale translations file be 100% generated from the source.
Similar approach could apply to contexts as well.
Describe the solution you'd like
It would be very nice if I could do something like this in code:
{
key_zero: "no data",
key_one: "One",
key_other: "many",
}
Describe alternatives you've considered
Now, there are two options (both suboptimal):
1) Add plurals manually to the translations file.
2) Do the pluralization in source.
Additional context
I'd be happy to do PR if someone could guide which parts should be changed.
One thing I found I could do is make parseTCallOptions return the extracted defaults but not sure how to integrate them with the rest of the code.
Is your feature request related to a problem? Please describe.
Currently this excellent plugin supports only the one basic form of default value: "defaultValue". i18next supports a buch of suffixes for defaultValue: https://www.i18next.com/translation-function/essentials#overview-options That would allow to maintain the default locale translations file be 100% generated from the source.
Similar approach could apply to contexts as well.
Describe the solution you'd like
It would be very nice if I could do something like this in code:
And it would produce:
Describe alternatives you've considered
Now, there are two options (both suboptimal): 1) Add plurals manually to the translations file. 2) Do the pluralization in source.
Additional context
I'd be happy to do PR if someone could guide which parts should be changed. One thing I found I could do is make
parseTCallOptions
return the extracted defaults but not sure how to integrate them with the rest of the code.