-
-
Notifications
You must be signed in to change notification settings - Fork 201
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
fix: Exact plural forms for basic MT translators #2454
Conversation
Looking at your current implementation of Let's say the target locale is 'en-US' (with target-examples: 'one', 'other') In my closed PR, I merge the cases quite carefully, to retain as many cases as possible. Please also note that your unit-tests typically have target-locale 'cs', which happens to have an abundance of target-examples (one, few many, other), which might yield the desired output in your unit-tests, but would not produce the correct result for English as a target. I think adding unit-tests for the translation from "cs" to "en" would be valuable. |
Hey! Look into the test. This case is tested there with |
I tested your branch, and just as I predicted, it removes the zero case. |
Oh, I see. I believe this is correct. English doesn't require the |
## [3.71.4](v3.71.3...v3.71.4) (2024-09-04) ### Bug Fixes * Exact plural forms for basic MT translators ([#2454](#2454)) ([12b3fd6](12b3fd6))
I'm not sure that when defining "zero/one/other" in your source plural-statement, it would be intuitive that most translations would drop the "zero" case, just because it happens not to be strictly required in the target-locale. This would be so tricky, that Tolgee would have to advise anybody to use "=0/=1/other" unless they are really sure what they are doing and have investigated all target-locale PluralRules (which is hidden in an ibm/icu-package). You mentioned that "zero" can be grammatically handled by "other", but that seems theoretical. Sure you can say "You have 0 products in your shopping cart", but in my source ICU-message I could have "Your shopping cart is empty." Both are grammatically correct, but not translating the latter version is rather unfortunate. Sure, using '=0' would be an effective workaround, but I prefer to adhere to the principle of least surprise. |
This is great example of the right case for exact
|
Well I learned something... there even is a whole world of trickery behind 'one'. |
Yeah... |
No description provided.