Fix missing format type specifiers in localization strings#1558
Open
twoheartliu wants to merge 1 commit into
Open
Fix missing format type specifiers in localization strings#1558twoheartliu wants to merge 1 commit into
twoheartliu wants to merge 1 commit into
Conversation
Several translations were missing the printf format type specifier after %(variableName) placeholders, causing the raw variable names to appear in the UI instead of actual values. For example, '%(newFollowerCount) 人关注了您' displayed as '(newFollowerCount) 人关注了您' instead of '3 人关注了您'. Fixed 30 translation entries across 6 locales: - zh-Hans (Simplified Chinese): 11 fixes - et (Estonian): 11 fixes - ga (Irish): 3 fixes (incl. 2 'll' -> 'lld' corrections) - ru (Russian): 2 fixes - tr (Turkish): 2 fixes - th (Thai): 1 fix Each fix adds the correct type specifier: - lld for integer count variables - @ for string variables Co-Authored-By: Claude <noreply@anthropic.com>
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
Fixed 30 translation entries across 6 locales that were missing printf format type specifiers after named variables like
%(newFollowerCount).Problem
Several translations had
%(variableName)without the required format type (e.g.lldfor integers,@for strings). This caused the raw variable name to appear as literal text in the UI:(newFollowerCount) 人关注了您3 人关注了您(boostCount) 人转嘟了:5 人转嘟了:(username) 转嘟了:Alice 转嘟了:Root Cause
The
String(format:locale:arguments:)function requires a valid printf type specifier immediately after a%(name)format specifier. The affected translations were missing this type (or had a typo likellinstead oflld).Changes by locale
lldto count vars,@to string varslldto count vars,@to string varsll→lld(×2), addedlld(×1)lldto count varlldand@lldto count varFiles changed
MastodonSDK/Sources/MastodonLocalization/Resources/Localizable.xcstrings— 36 insertions, 36 deletions🤖 Generated with Claude Code