Skip to content

Fix missing format type specifiers in localization strings#1558

Open
twoheartliu wants to merge 1 commit into
mastodon:developfrom
twoheartliu:fix/missing-localization-format-specifiers
Open

Fix missing format type specifiers in localization strings#1558
twoheartliu wants to merge 1 commit into
mastodon:developfrom
twoheartliu:fix/missing-localization-format-specifiers

Conversation

@twoheartliu

Copy link
Copy Markdown

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. lld for integers, @ for strings). This caused the raw variable name to appear as literal text in the UI:

Before After
(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 like ll instead of lld).

Changes by locale

Locale Fixes Details
zh-Hans (Simplified Chinese) 11 Added lld to count vars, @ to string vars
et (Estonian) 11 Added lld to count vars, @ to string vars
ga (Irish) 3 Fixed lllld (×2), added lld (×1)
ru (Russian) 2 Added lld to count var
tr (Turkish) 2 Added lld and @
th (Thai) 1 Added lld to count var

Files changed

  • MastodonSDK/Sources/MastodonLocalization/Resources/Localizable.xcstrings — 36 insertions, 36 deletions

🤖 Generated with Claude Code

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>
@CLAassistant

CLAassistant commented Jun 26, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

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.

2 participants