-
-
Notifications
You must be signed in to change notification settings - Fork 125
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
i18next-scanner is removing every translation key with plural version #217
Comments
shaftwin
changed the title
bug: i18next-scanner is removing every translation key with plural version
i18next-scanner is removing every translation key with plural version
Sep 29, 2021
I'm not maintainer of this project so I can't help in any way. |
cheton
pushed a commit
that referenced
this issue
Oct 12, 2021
cheton
added a commit
that referenced
this issue
Oct 12, 2021
#219) Co-authored-by: Cheton Wu <chetonu@gmail.com>
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
馃悰 Bug Report
Hello there,
I've been using i18next with i18next-scanner from a long time now. Everything was on track until today, where something really strange happened.
I'm working on a React-Native project. When I run yarn local:extract, every translation key with plural in it is removed from my translation files. If i rename count to anything else, it's parsed correctly. If I dare use count variable, the key is removed instantly from my translation files.
I did some research in this Github repository, in the doc and in StackOverflow, but i've seen nothing about a similar issue or any breaking changes.
I've just discovered this behavior recently, I tried to roll back to a previous version of my app when everything was working well but i found that, even on version where I've pushed plural key, if i run now local:extract, the script is deleting every plural key again...
I've tried to used in my config file. :
If I return false, I do get singular version of key, but if I return true, I don't get singular nor plural in my translation files.
I run out of solution and I'm asking for help
To Reproduce
Here is my config:
i18next-scanner.config.js
initTranslation.js
package.json
If I run yarn local:extract, this kind of keys are removed => t('common:content.detail', { count: 2 })
Expected behavior
I expected the default behavior, this means I expected to have two keys set in common.json, one for plural (with _plural as suffix) and one for singular.
Your Environment
The text was updated successfully, but these errors were encountered: