Skip to content

fix(translations): restore English placeholder names in de/uk - #3783

Open
Vondry wants to merge 1 commit into
bolt:6.1from
Vondry:fix/translations-translated-placeholder-names
Open

fix(translations): restore English placeholder names in de/uk#3783
Vondry wants to merge 1 commit into
bolt:6.1from
Vondry:fix/translations-translated-placeholder-names

Conversation

@Vondry

@Vondry Vondry commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Follow up of #3753

Summary

Fixes translations where placeholder names themselves were translated, preventing Symfony from substituting the values at runtime.

Changes

File Placeholder(s)
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:

Dieser Link wird in %Stunden% Stunde(n) ablaufen.

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

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant