Skip to content
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

English strings end up in some non-english translation files #18

Closed
GuySartorelli opened this issue Aug 22, 2023 · 3 comments
Closed

English strings end up in some non-english translation files #18

GuySartorelli opened this issue Aug 22, 2023 · 3 comments

Comments

@GuySartorelli
Copy link
Member

GuySartorelli commented Aug 22, 2023

When running tx translator with tx_pull=1, we sometimes end up with english strings in non-english translation files.

For example in silverstripe/silverstripe-mfa#506, we see several english strings being added to the de.js translation files. But when we look in transifex, those strings are explicitly not translated for de yet, so they shouldn't be pulled through.
silverstripe/mfa in transifex showing the untranslated strings for the "de" locale

Notes

I have a few thoughts about this:

  • This could be a result of running tx pull with both -t and -s flags together - we might need to run pull twice per module, once with each flag.
  • There might be a setting in transifex we need to change via the web portal.
  • As a last resort, we could simply unset any values in translation files that match their en counterpart.

PRs

@emteknetnz
Copy link
Member

Have confirmed locally that it's the tx pull step that's causing the en strings to show up in de.yml, so it's not something PHP related which would have been an easier fix

I've had a good look through transifex including on the settings page for mfa - https://app.transifex.com/silverstripe/silverstripe-mfa/settings/workflow/ and I couldn't find anything relevant

I tried change the tx command to tx pull -a - t -f (removing the -s) - it made no difference

I think the "As a last resort, we could simply unset any values in translation files that match their en counterpart." is a good idea. We've probably already accidentally committed a bunch of en "translations" so makes sense to undo them.

@GuySartorelli
Copy link
Member Author

PR merged. I'm on the fence as to whether this should be run now (just on 4.13 and merge up) or just wait until next time the issue is created - so I'll reassign to @emteknetnz and he can decide if that's in scope or not.

@emteknetnz
Copy link
Member

emteknetnz commented Sep 1, 2023

Next issue is in under 3 months, I wouldn't worry about it for now, we've had far more than enough automated PR's recently :-) Practically speaking this won't make much of a difference because an erroneous english "translation" is no different from a missing translation defaulting back to english

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants