fix(explore-dash): pluralise the ATM count subtitle - #1033
Conversation
…agent worktrees Partial backport of #855 (merged to master, never carried over to develop). - AtmListViewController now uses String.localizedStringWithFormat so the "%d ATM(s) in %@" key resolves through Localizable.stringsdict, matching how "%d merchant(s) in %@" already works in MerchantListViewController. - Carry that plural entry into every locale catalog, including zh-Hans and zh-Hant-TW (the two Chinese catalogs the project actually builds; master only carried the orphaned zh/zh_TW files). - NavBarClose draws the DashUIKit close icon instead of the local "toolbar-close" asset. - .bartycrouch.toml ignores .claude, which holds full agent worktrees — otherwise BartyCrouch walks that duplicate source and imports keys from whatever branch is checked out there. Deliberately not carried over from #855: - The regenerated Localizable.strings (43 files). That regeneration reflects master's code, so applying it here would delete the DashPay/shielded keys develop needs. Run BartyCrouch against develop instead if a refresh is wanted. - The ExtendedPublicKeysView title fix: develop deleted that view. - SwapOrder.providerExplorer: develop already has the equivalent via TxDetailModel.SwapExplorerLink.
|
Warning Review limit reached
Next review available in: 53 minutes Limit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?Wait for the limit to reset, then comment An organization admin can change what happens after included review limits in Billing. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (46)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 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 |
|
@coderabbitai review |
|
|
@coderabbitai review |
|
`String.localizedStringWithFormat(fmt, count, distance)` binds arguments by position, so a translation that reorders them silently mismatches types. This is not hypothetical: the existing `%d merchant(s) in %@` entry is translated in ja as `%@ で %d の加盟店`, which feeds the Int to %@ and the String to %d and segfaults. The ATM key ships English placeholders in 21 locales today, so the same reordering is likely once translators pick it up. Declaring the plural variable as `%1$#@atms@` and referencing `%1$d` / `%2$@` inside each category makes the binding explicit, so any word order stays correct. Verified against a real bundle: positional and non-positional forms produce identical output for the current strings, and a reordered translation renders correctly instead of crashing. The pre-existing merchant entry has the same latent bug and needs its own fix.
Issue being fixed or feature implemented
Partial backport of #855, which was merged into
masteron 2026-07-28 and neverreached
develop.masterhas been frozen since 2026-07-29 and is no longer thedefault branch.
The ATM list subtitle read "1 ATM(s) in 5 km" — the key was never pluralised, and
String(format:)bypasses the plural catalog even when one exists.What was done?
AtmListViewControllerusesString.localizedStringWithFormat, so"%d ATM(s) in %@"resolves throughLocalizable.stringsdict. This is exactly how"%d merchant(s) in %@"already works inMerchantListViewController.zh-Hansandzh-Hant-TW, the two Chinese catalogs the project actually builds — the originalPR only updated the orphaned
zh/zh_TWfiles, which are not referenced byproject.pbxproj.NavBarClosedraws the DashUIKit close icon instead of the localtoolbar-closeasset.
.bartycrouch.tomlignores.claude, which holds full agent worktrees. Leftalone, BartyCrouch walks that duplicate source tree and imports keys from whatever
branch is checked out there into this branch's catalog.
Deliberately not carried over from #855:
Localizable.strings(43 files). That regeneration reflectsmaster's code; applying it here would delete the DashPay and shielded-wallet keysdevelopneeds. If a refresh is wanted, BartyCrouch should be run againstdevelopin its own PR.ExtendedPublicKeysViewtitle fix —developdeleted that view.SwapOrder.providerExplorer—developalready has the equivalent viaTxDetailModel.SwapExplorerLink.How Has This Been Tested?
Built the
dashpayscheme (the one CI archives) for the iOS Simulator with allthree backport branches merged together: BUILD SUCCEEDED. No errors or warnings
in any of the changed files.
Two local-environment caveats, neither caused by this change:
ARCHS=arm64is required, becauseplatform/packages/swift-sdk/DashSDKFFI.xcframeworkcarries no x86_64 slice, so a generic simulator destination fails to link.
dashwalletanddashwallet-dashpayschemes can't be built locally at all —they pull the embedded WatchApp targets, and the SwiftLint build phase there fails
on 220 pre-existing violations that are already present on a clean
developcheckout. That is what blocks running the XCTest bundle locally.
SwiftLint was run directly on this branch and on a clean
developcheckout and theresults diffed: this branch has one violation fewer and none added (removing a
duplicate
import DashUIKitfixed asorted_importsviolation).Every
Localizable.stringsdictpassesplutil -lint, and all 43 catalogs theproject builds now carry the
%d ATM(s) in %@key — verified by cross-checking the.lprojlist inproject.pbxproj.Not exercised on device: the ATM list subtitle needs location permission plus the
map segment to render.
Breaking Changes
None.
Checklist:
For repository code-owners and collaborators only