fix(translations): restore English placeholder names in de/uk - #3783
Open
Vondry wants to merge 1 commit into
Open
fix(translations): restore English placeholder names in de/uk#3783Vondry wants to merge 1 commit into
Vondry wants to merge 1 commit into
Conversation
Three translations had localised the placeholder name itself, so the
parameter no longer matched and was rendered to the user verbatim:
messages.de.xlf reset_password.check_email_sent_text_1
%Stunden% -> %hours%
validators.uk.xlf 1dc128a, 9e27714
{{ширина}} -> {{ width }}
{{высота}} -> {{ height }}
Parameter names are defined by the calling code, not by the locale, and
Symfony substitutes them by exact string replacement.
Both are genuinely passed:
templates/reset_password/check_email.html.twig:35 '%hours%'
Symfony\Component\Validator\Constraints\ImageValidator {{ width }}, {{ height }}
Only the placeholders changed; the surrounding prose is untouched. Note
the Ukrainian strings also read "ширина"/"высота" as ordinary words
elsewhere in the file -- those are prose, not placeholders, and were
deliberately left alone.
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.
Follow up of #3753
Summary
Fixes translations where placeholder names themselves were translated, preventing Symfony from substituting the values at runtime.
Changes
messages.de.xlf%Stunden%→%hours%validators.uk.xlf{{ширина}}→{{ width }},{{высота}}→{{ height }}(2 messages)Why
Symfony replaces placeholders by exact name. Translating the placeholder identifier breaks interpolation, leaving the raw placeholder visible to users instead of the intended value.
For example, the German password reset email rendered:
instead of substituting the number of hours.
The placeholder names are defined by the calling code and must remain unchanged:
%hours%—templates/reset_password/check_email.html.twig:35{{ width }}/{{ height }}—Symfony\Component\Validator\Constraints\ImageValidator