-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Translation] Skip state=needs-translation entries only when source == target #54564
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
Conversation
nicolas-grekas
commented
Apr 11, 2024
Q | A |
---|---|
Branch? | 5.4 |
Bug fix? | yes |
New feature? | no |
Deprecations? | no |
Issues | Fix #54541 |
License | MIT |
After managing translations in over 30 languages in a project with thousands of translations I can tell you, there are all kind of weird combinations ... What happens if you have such a combination (this is a stupid example I know, but you get the point). English:
French:
Would French now show May I ask: what was your initial idea for that change? Did you plan to reduce the cache size? Which problem are we trying to solve with ignoring the translations? |
It will show "Persist" if the fallback language is "en". Possibly "Save" if the key is used as a fallback instead. |
Hm, I expected that answer.
Yep. To me it is not 😁 and it is still breaking behavior. Currently hundreds of translations are missing throughout two dozen locales and this PR will only fix it partially. If you skip existing translations based on a flag (that is to me only meant for the tooling) and some assumptions, then I can't use the framework reader any more. I cannot remove the flag from the XLIFF, because it is needed for the translators. If you insist one keeping the behavior, can we make it configurable? |
The change has been made to allow filling in xliff files with missing keys, while still allow a fallback to the preferred language. We use this since that recent PR to make it easier for translators to spot what's missing. |
Thanks for not rejecting my arguments immediately 😄 Maybe this is an issue how Weblate handles its translations. I just want to repeat that to explain the problem I have and I doubt that I am the only one using that: if the base translation changes in Weblate, all other languages are flagged as "needs-translation". It does not mean they are suddenly invalid. Don't get me wrong, this PR will already solve > 95% of my current issues, so I would approve it no matter what. I checked the states in the XLIFF RFC and there is also "needs-review" and some other review states, but no matter which one we choose, it might not match the workflow or the used tooling. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested, works, thank you!