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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deault values in t function do not work #2124
Comments
should be fixed with i18next v23.7.19 |
Thanks. It works if saveMissing: false But in this sandbox example as soon as I activate saveMissing:true, the displays goes to "one item def" instead of "no item def". And the POST requests are {key12_one: "one item def"}, {key12_other: "{{count}} items def"} and {key12_many: "no item def"} whereas I would have expected key12_zero instead of key12_many |
That's because of the fallbackLng it defaults to dev.... |
Thank you for your quick response There is still one problem, in this sandox example {key_many: "no item def"} is sent in POST whereas it is not defined in the default value. Moreover it takes the value of key_zero, which makes no sense. For your information, if we change the order of the ressource from
to
the problem does not happen. Thanks ! |
currently afk... but I guess that's because of the used language... |
i'm not able to reproduce your issue... |
It's not because of the refresh... it's because of the detected language... that's why I'm not able to reproduce it... for me it detects english... for you probably french... |
What is the link between the fallbackLng and the fact that it sends _many whereas it does not exist? |
The reason is the saveMissingTo option: https://www.i18next.com/overview/configuration-options |
馃悰 Bug Report
Default values in t function do not work
To Reproduce
Expected behavior
It renders "one item" whereas I would have expected zero.
If I put this in a traduction file it works but I want my code to be the source of thruth.
Your Environment
The text was updated successfully, but these errors were encountered: