Skip to content

fix(translations): remove stray whitespace inside placeholders (ru/uk) - #3782

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

fix(translations): remove stray whitespace inside placeholders (ru/uk)#3782
Vondry wants to merge 1 commit into
bolt:6.1from
Vondry:fix/translations-placeholder-whitespace

Conversation

@Vondry

@Vondry Vondry commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Follow up of #3753

Summary

Fixes five translation placeholders in the Russian and Ukrainian message catalogues. The placeholder names contained stray whitespace, preventing Symfony from substituting the parameters and causing the raw placeholders to be shown to users.

Changes

File Translation key Before After
messages.ru.xlf general.phrase.search-results-for % search% %search%
messages.ru.xlf general.phrase.search-results-for-variable % search% %search%
messages.uk.xlf general.phrase.search-results-for % search% %search%
messages.uk.xlf general.phrase.search-results-for-variable % search% %search%
messages.uk.xlf content.edit_missing_definition містить% contenttype% містить %contenttype%

Root cause

Symfony performs parameter substitution using exact placeholder names. Because the translated strings used % search% instead of %search%, the parameter lookup failed and the placeholders were rendered verbatim instead of being replaced with their values.

Five Russian and Ukrainian strings had a space inside the placeholder
delimiters, so the parameter name no longer matched:

  "% search%"     -> "%search%"       (ru x2, uk x2)
  "% contenttype%" -> " %contenttype%" (uk x1)

Symfony substitutes translation parameters by exact string replacement,
so these were rendered to the user verbatim, e.g.

  Результаты поиска по запросу "% search%".

instead of the search term.

Both parameters are genuinely passed by the callers:
  public/theme/skeleton/search.twig:11  '%search%'
  templates/content/edit.html.twig:45   '%contenttype%'

For content.edit_missing_definition the space was misplaced rather than
merely extra ("містить% contenttype%"), so it is moved outside the
placeholder to keep the sentence spacing correct.
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