Skip to content

fix(translations): restore dropped placeholders in bg/de/es/hu - #3784

Open
Vondry wants to merge 1 commit into
bolt:6.1from
Vondry:fix/translations-dropped-placeholders
Open

fix(translations): restore dropped placeholders in bg/de/es/hu#3784
Vondry wants to merge 1 commit into
bolt:6.1from
Vondry:fix/translations-dropped-placeholders

Conversation

@Vondry

@Vondry Vondry commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Follow up of #3753

Summary

Fixes translations that dropped placeholders required by the calling code, preventing runtime values from being displayed.

Changes

File Keys
messages.bg general.greeting, listing_details_box.listing_template
messages.de contenttypes.generic.overview, contenttypes.generic.recent, reset_password.check_email_sent_text_2
messages.es collection.add_item
messages.hu collection.add_item, title.filtered_by

Why

Symfony substitutes placeholders by exact name. When a translation omits a placeholder, the corresponding runtime value is lost.

Several of these were effectively hardcoded translations rather than direct equivalents of the source text. For example:

  • The Bulgarian greeting always addressed the user as "admin" instead of using the provided %name%.
  • The German ContentType headings were hardcoded to "Pages", making them incorrect for every other ContentType.

Eight translations omitted a parameter that the caller passes, so the
value never reached the user. Each string is reworded to reinstate it:

  messages.bg  general.greeting                       + %name%
  messages.bg  listing_details_box.listing_template   + %listingRecords%
  messages.de  contenttypes.generic.overview          + %contenttypes%
  messages.de  contenttypes.generic.recent            + %contenttypes%
  messages.de  reset_password.check_email_sent_text_2 + %tryagain%
  messages.es  collection.add_item                    + %name%
  messages.hu  collection.add_item                    + %name%
  messages.hu  title.filtered_by                      %szűrő% -> %filter%

Several were hardcoded workarounds rather than accidents -- the German
ContentType headings read "Seitenübersicht"/"Neueste Seiten", which is
correct only for Pages, and the Bulgarian greeting said "админ" for
every user.

All eight parameters were verified against their callers, e.g.
  templates/_base/layout.html.twig:39                '%name%'
  public/theme/skeleton/partials/_aside.twig:53,60   '%contenttypes%'
  templates/content/listing.html.twig:172            '%listingRecords%'
  templates/reset_password/check_email.html.twig:36  '%tryagain%'

The obsolete singular security.de unit ("...in %minutes% minute.") is
deliberately left alone: "in einer Minute" is the correct German for
that message, and reinstating the parameter would render "in 1 Minute".
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