Repository navigation
Conversation
0726a3c to
ff86c02
Compare
|
This is not reviewable in it's current form. I need to ask you to split the work done in separate PRs to be able to do something with this. My suggestion for PRs would be:
And possibly even more. Keep it simple. |
ff86c02 to
d313106
Compare
|
In an effort to keep our pull request list manageable, we are marking this PR as stale because it has been 60 days without activity. If this PR is still relevant, please let us know by posting a quick comment or update so that it can be assigned and hopefully merged. |
… strings Removes dead/duplicate keys, adds missing keys, and fixes ~77 broken translations (unescaped placeholders, dropped variables, wrong meanings) across the messages, security, and validators domains. Every locale file is now byte-parity synced to its *.en.xlf counterpart: same keys, order, unit ids, and usage notes. Adds bin/validate-translations and bin/update-translation-notes to keep the catalogues in sync going forward, and wires the validator into CI.
d313106 to
000e0d8
Compare
|
@Vondry can this be closed? Or weren't all changes merged in separate MRs yet? |
@bobvandevijver There is still a lot of changes that could be done to the translations, but we can close this one and keep it just for the reference and continue with further changes in |
Summary
Audits and repairs the
messages,securityandvalidatorstranslation catalogues (translations/*.xlf, 3 domains × 15–17 locales, 45 files). It also adds two scripts that keep the catalogues correct and in sync from now on.Rebased onto 6.1.9. Several earlier fixes have since landed on master separately: the XLIFF 1.2 → 2.0 conversion, the
trgLang/<file id>header corrections,general.phrase.none, the Slovak catalogues, and a number of placeholder fixes. This PR builds on top of those.Translation catalogue fixes
messages.en.xlf(leftovers from deleted templates, replaced field labels, keys duplicated from other domains, unused language-name labels, etc.) and 29 fromvalidators.en.xlf(corrupted entries with hex-string keys and obsolete demo entries). Every locale was cleaned up to match.securitydomain. The app uses them, but they were missing from the catalogues. Locale targets come from Symfony's own vendor catalogues.<target>elements. This fills in about 1,650 missing keys with real translations, including:validators.it,validators.plandvalidators.pt_BR, recreated from Symfony's vendor catalogues (they previously contained only invalid entries);messages.pt_BR.xlf, brought back with full translations (it was removed earlier only because it was empty).zh_CNstrings,nl/it/elUI labels);title.edit_user_profile,caption.kitchensink,image.placeholder_filename);sr-onlyspans;password.suggested.messages.frnow match English (12reset_password.*/ form units).<notes>blocks in every catalogue so they record where each key is actually used.messagesnotes point to in-repopath:linelocations.securityandvalidatorsnotes fall back to the Symfony vendor file a key comes from when the project itself doesn't use it.New tooling
bin/validate-translations: a validator that can run in CI (exits with1on failure). It checks:domain.locale.xlffiles (a missing file is an error);<notes>, order and file structure outside the targets;<file id>andtrgLangheaders;messageskey is used somewhere in the codebase (code, templates, themes or bundled widgets), and that everytrans(),|transor__()call points to a key that exists.bin/update-translation-notes: regenerates the<notes>blocks from actual usage and copies them unchanged into every locale.securityandvalidatorskeys not used in the project, it falls back to Symfony's vendor sources.~, and locations are sorted by line number..github/workflows/code_analysis.yaml):php bin/validate-translationsruns next to the existinglint:xliffstep.Testing
php bin/console lint:xliff translations/: all 45 catalogue files are valid.php bin/validate-translations: passes (exit code0).php bin/update-translation-notes: running it again changes no files.trgLang, malformed XML, reordered or edited<notes>and duplicate keys were each caught bybin/validate-translations. Each change was reverted afterwards.