fix(translations): remove stray whitespace inside placeholders (ru/uk) - #3782
Open
Vondry wants to merge 1 commit into
Open
fix(translations): remove stray whitespace inside placeholders (ru/uk)#3782Vondry wants to merge 1 commit into
Vondry wants to merge 1 commit into
Conversation
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.
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 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
messages.ru.xlfgeneral.phrase.search-results-for% search%%search%messages.ru.xlfgeneral.phrase.search-results-for-variable% search%%search%messages.uk.xlfgeneral.phrase.search-results-for% search%%search%messages.uk.xlfgeneral.phrase.search-results-for-variable% search%%search%messages.uk.xlfcontent.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.