-
-
Notifications
You must be signed in to change notification settings - Fork 43
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i18next plurals #57
Comments
Hmm, that's a good question. JSON Autotranslate doesn't have any specific behavior when it comes to plurals. Adding the "_few" and "_many" keys to the English source file could work, although I guess it adds a bit of redundant content since these aren't actually needed in English. |
This could be a workaround. It's not ideal, though, since we have 15ish languages and this form is used only in a few |
Yeah, that's a valid concern. Do you have an idea for how JSON Autotranslate could be improved to accomodate for this situation? |
I haven't actually looked at the code, but I guess we could use i18next's plural resolver when we see a key has plural forms in the default language: https://github.com/i18next/i18next/blob/master/src/PluralResolver.js But what to do with other translation engines supported by json-autotranslate? |
Hi @leolabs, first, thank you for this wonderful library, it is really useful for projects that are translated into multiple languages. We are using plurals in our i18next project, something like this:
English:
Polish:
As you can see, Polish has different plural forms. When I ran json-autotranslate with -d, it removed all these and added the key with _other as the last entry under the parent key. Is there a way to do it correctly for languages like this or this is something that's not implemented?
The text was updated successfully, but these errors were encountered: