Fix all translations files and harden their consistency #3753
Open
Vondry wants to merge 1 commit into
Open
Conversation
Vondry
force-pushed
the
fix/translation-files
branch
2 times, most recently
from
July 20, 2026 16:17
419b87b to
0726a3c
Compare
… 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.
Vondry
force-pushed
the
fix/translation-files
branch
from
July 20, 2026 17:21
0726a3c to
ff86c02
Compare
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Audits and repairs the
messages,security, andvalidatorstranslation catalogues (translations/*.xlf, 3 domains × ~14–16 locales), then adds two permanent tooling scripts to keep the catalogues correct and in sync going forward.Translation catalogue fixes
messages.en.xlfandvalidators.en.xlf, including deleted-template leftovers, superseded field labels, wrong-domain duplicates, 21 corrupted hex-keyed entries, and 8 obsolete demo entries invalidators.en.xlf. Deletedvalidators.it/pl/pt_BR.xlf, which contained only those invalid entries.general.phrase.none(messages) and the three Symfony login-throttling messages (security), which were referenced by the application but missing from the catalogues.validators.it/pl/pt_BR.xlffrom Symfony vendor catalogues, converted legacy XLIFF 1.2 files (hu,pt_BR, andzh_CNvariants) to XLIFF 2.0, and corrected<file id>/trgLangmismatches (el,tr, anduk).{{limit}}→{{ limit }}), mistranslated placeholder names (e.g. German%Stunden%→%hours%), missing placeholders, incorrect translations (e.g. Russian "preview" translated as "list"), and structural issues such as missingsr-onlyspans and key-as-target fallbacks.<notes>blocks for every catalogue, documenting actual usage locations.messageskeys now reference in-repositorypath:linelocations, whilesecurityandvalidatorsentries reference the originating Symfony/vendor source when no in-project usage exists.New tooling
bin/validate-translations— a CI-safe validator (exit code1on failure) that verifies:domain.locale.xlffiles (missing files are treated as errors).<notes>, ordering, and byte-level skeleton structure.<file id>andtrgLangheaders (now enforced as hard errors).messageskey is referenced somewhere in the codebase (code, templates, themes, or bundled widgets), and everytrans(),|trans, or__()call resolves to a real translation key.bin/update-translation-notes— regenerates<notes>blocks from actual usage and mirrors them identically into every locale. Falls back to Symfony vendor sources forsecurityandvalidatorsentries without in-project references. Heuristic (non-exact) matches are prefixed with~, locations are sorted numerically by line number, and shared vendor directories are scanned only once..github/workflows/code_analysis.yaml), addingphp bin/validate-translationsalongside the existinglint:xliffstep.Testing
php bin/console lint:xliff translations/— all 42 catalogue files validate successfully.php bin/validate-translations— passes cleanly (exit code0).php bin/console debug:translation <locale> --domain=<domain>— spot-checked across multiple locales and domains with zero missing keys.trgLang, malformed XML, reordered/tampered<notes>, and duplicate keys) was correctly detected bybin/validate-translations, after which each change was reverted.Screen.Recording.2026-07-20.at.10.56.11.mov