Repository navigation
fix(l10n): Use positional placeholders in strings with multiple %s - #6429
Merged
elzody merged 1 commit intoDec 3, 2026
Merged
Conversation
Strings with more than one plain %s force translators to keep the English order of the values. Numbered placeholders (%1$s, %2$s) let them reorder the values where their language needs it. IL10N::t() formats with vsprintf(), which renders both forms identically, so the output does not change. Signed-off-by: rakekniven <2069590+rakekniven@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
elzody
approved these changes
Dec 3, 2026
juliusknorr
approved these changes
Dec 3, 2026
rakekniven
enabled auto-merge
December 3, 2026 19:57
elzody
disabled auto-merge
December 3, 2026 21:01
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.
Summary
Translatable strings that contain more than one plain
%sfix the order of the inserted values: the first%salways gets the first value. Languages with a different word order cannot move them, so translators either have to bend the sentence or end up with values in the wrong place.This PR replaces the plain
%swith numbered placeholders in the affected string:lib/SetupCheck/CollaboraUpdate.phpCollabora server version is out of date. Currently using %s, new version is available: %sCollabora server version is out of date. Currently using %1$s, new version is available: %2$sIL10N::t()formats withvsprintf(), which renders%1$s %2$sexactly like%s %s, so the English output does not change. Only the placeholders change; the wording stays the same.Effect on translations: the source strings change, so Transifex treats them as new. Translation memory should offer the old translations as close matches, but translators have to accept them and add the numbered placeholders.
Tests: no test refers to these strings. I did not run the tests locally.
TODO
Checklist
This PR was partly generated using AI.
🤖 Generated with Claude Code