Repository navigation
fix(l10n): ship Localizable.stringsdict for every locale the app bundles - #1079
Conversation
The Localizable.stringsdict PBXVariantGroup had only four children — en, sk, cs, uk — so `find <builtapp> -name '*.stringsdict'` returned 4 even though all 43 catalogs exist on disk and are actively maintained (#945 added 15 plurals, #1076 added `%d words`). Every pluralised string therefore fell back to English in the other locales. `%d words` is the clearest case: it lives only in stringsdict and in no `.strings` catalog, so the 12/24 recovery-phrase-length picker rendered "12 words / 24 words" in English on a Russian device. Add the 18 remaining locales the app actually ships (bg de el es fr id it ja ko nl pl pt ru th tr vi zh-Hans zh-Hant-TW) as children of the variant group. Both the dashwallet and dashpay targets already reference that one group via build files 2ADC722923B5547000D9DD37 and C9D2C91C2A320AA000D15901, so no build-phase change is needed. Bundled stringsdict count: 4 -> 22, one for each shipping locale. Note: 21 further locales (ar ca da eo et fa fi fil hr hu mk ms nb ro sl sl_SI sq sr sv zh zh_TW) have complete translations on disk but are absent from knownRegions and from the Localizable.strings group, so they ship nothing at all today. Wiring those up adds 21 new advertised languages (including RTL) and needs a product decision on the sl/sl_SI, zh/zh-Hans and zh_TW/zh-Hant-TW duplicates — tracked separately, deliberately out of scope here. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe Xcode project registers ChangesLocalization registration
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to This change expands bundled pluralized localization coverage across the app’s supported locales without altering runtime logic or build-phase structure; no actionable merge-blocking risk remains beyond normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.) ✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The bug
The
Localizable.stringsdictPBXVariantGroup(2ADC722723B5547000D9DD37) had exactly four children —en,sk,cs,uk— so only those four plural catalogs were copied into the app:All 43
DashWallet/*.lproj/Localizable.stringsdictfiles exist on disk and are actively maintained (#945 added 15 plural entries to all of them, #1076 added%d words), but the rest were never referenced by the project. Every pluralised string silently fell back to English in those locales.%d wordsis the cleanest demonstration: it lives only in stringsdict and in no.stringscatalog, so it can only come from a bundled stringsdict.The fix
Add the 18 remaining locales the app actually ships —
bg de el es fr id it ja ko nl pl pt ru th tr vi zh-Hans zh-Hant-TW— as children of that variant group, each with its ownPBXFileReference(lastKnownFileType = text.plist.stringsdict).Both targets already reference the single shared variant group through build files
2ADC722923B5547000D9DD37(dashwalletResources) andC9D2C91C2A320AA000D15901(dashpayResources), so no build-phase change was needed — adding children to the group fixes both targets at once.Bundled stringsdict count: 4 → 22, one for every shipping locale.
Before / after
Same screen, same simulator, same fresh install — the Дополнительно disclosure on "Сохранить фразу восстановления", Russian device language.
12 words / 24 words12 слов / 24 словаNote the body copy around the picker is already Russian in both shots — it comes from
.strings, which was shipping fine. Only the stringsdict-backed segment labels were falling back.Slavic plural categories resolve correctly
Russian and Polish both select two different CLDR categories on this one screen — 12 →
many, 24 →few— and both render correctly:12 слов(many) /24 слова(few)12 słów(many) /24 słowa(few)Verification
xcodebuild -workspace DashWallet.xcworkspace -scheme dashpay -sdk iphonesimulator -destination 'generic/platform=iOS Simulator' ARCHS=arm64 build→ BUILD SUCCEEDEDfind <builtapp> -name '*.stringsdict' | wc -l→ 22 (was 4); every.lprojin the bundle exceptBasenow has one12 слов / 24 слова12 słów / 24 słowaOut of scope (found while verifying)
Two further localisation gaps, deliberately not touched here:
ar ca da eo et fa fi fil hr hu mk ms nb ro sl sl_SI sq sr sv zh zh_TWeach have a complete, fully-translated 2081-keyLocalizable.stringson disk, but are absent fromknownRegionsand from theLocalizable.stringsvariant group — they aretx pull -aoutput that was never wired into Xcode. Adding only their stringsdict would have produced a.lprojwith plurals and no strings, making the app advertise those languages (RTL included, forar/fa) with an otherwise-English UI — a regression, so they are excluded. Wiring them up properly is a product decision that also needs thesl/sl_SI,zh/zh-Hansandzh_TW/zh-Hant-TWduplicates resolved.BackupInfoViewController.swift:32andBackupInfoItemView.xib, never passed throughNSLocalizedString— they are in no catalog, not evenen. Visible as English in every screenshot above.🤖 Generated with Claude Code
Summary by CodeRabbit