Skip to content

fix(explore-dash): pluralise the ATM count subtitle - #1033

Open
romchornyi wants to merge 2 commits into
developfrom
fix/l10n-atm-plural-and-navbar-close-develop
Open

fix(explore-dash): pluralise the ATM count subtitle#1033
romchornyi wants to merge 2 commits into
developfrom
fix/l10n-atm-plural-and-navbar-close-develop

Conversation

@romchornyi

Copy link
Copy Markdown
Contributor

Issue being fixed or feature implemented

Partial backport of #855, which was merged into master on 2026-07-28 and never
reached develop. master has been frozen since 2026-07-29 and is no longer the
default 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?

  • AtmListViewController uses String.localizedStringWithFormat, so
    "%d ATM(s) in %@" resolves through Localizable.stringsdict. This is exactly how
    "%d merchant(s) in %@" already works in MerchantListViewController.
  • Carried that plural entry into every locale catalog. This includes zh-Hans and
    zh-Hant-TW, the two Chinese catalogs the project actually builds — the original
    PR only updated the orphaned zh/zh_TW files, which are not referenced by
    project.pbxproj.
  • NavBarClose draws the DashUIKit close icon instead of the local toolbar-close
    asset.
  • .bartycrouch.toml ignores .claude, which holds full agent worktrees. Left
    alone, 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:

  • The regenerated Localizable.strings (43 files). That regeneration reflects
    master's code; applying it here would delete the DashPay and shielded-wallet keys
    develop needs. If a refresh is wanted, BartyCrouch should be run against
    develop in its own PR.
  • The ExtendedPublicKeysView title fix — develop deleted that view.
  • SwapOrder.providerExplorerdevelop already has the equivalent via
    TxDetailModel.SwapExplorerLink.

How Has This Been Tested?

Built the dashpay scheme (the one CI archives) for the iOS Simulator with all
three 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=arm64 is required, because platform/packages/swift-sdk/DashSDKFFI.xcframework
    carries no x86_64 slice, so a generic simulator destination fails to link.
  • The dashwallet and dashwallet-dashpay schemes 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 develop
    checkout. That is what blocks running the XCTest bundle locally.

SwiftLint was run directly on this branch and on a clean develop checkout and the
results diffed: this branch has one violation fewer and none added (removing a
duplicate import DashUIKit fixed a sorted_imports violation).

Every Localizable.stringsdict passes plutil -lint, and all 43 catalogs the
project builds now carry the %d ATM(s) in %@ key — verified by cross-checking the
.lproj list in project.pbxproj.

Not exercised on device: the ATM list subtitle needs location permission plus the
map segment to render.

Breaking Changes

None.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

…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.
@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@romchornyi, you've reached your PR review limit, so we couldn't start this review.

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 @coderabbitai review or push new commits to the PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 0e5dc8a8-da7c-449e-92b3-872c1d8d6055

📥 Commits

Reviewing files that changed from the base of the PR and between 793c8de and eed67ae.

📒 Files selected for processing (46)
  • .bartycrouch.toml
  • DashWallet/Sources/UI/Explore Dash/Merchants & ATMs/List/AtmListViewController.swift
  • DashWallet/Sources/UI/SwiftUI Components/NavigationBar.swift
  • DashWallet/ar.lproj/Localizable.stringsdict
  • DashWallet/bg.lproj/Localizable.stringsdict
  • DashWallet/ca.lproj/Localizable.stringsdict
  • DashWallet/cs.lproj/Localizable.stringsdict
  • DashWallet/da.lproj/Localizable.stringsdict
  • DashWallet/de.lproj/Localizable.stringsdict
  • DashWallet/el.lproj/Localizable.stringsdict
  • DashWallet/en.lproj/Localizable.stringsdict
  • DashWallet/eo.lproj/Localizable.stringsdict
  • DashWallet/es.lproj/Localizable.stringsdict
  • DashWallet/et.lproj/Localizable.stringsdict
  • DashWallet/fa.lproj/Localizable.stringsdict
  • DashWallet/fi.lproj/Localizable.stringsdict
  • DashWallet/fil.lproj/Localizable.stringsdict
  • DashWallet/fr.lproj/Localizable.stringsdict
  • DashWallet/hr.lproj/Localizable.stringsdict
  • DashWallet/hu.lproj/Localizable.stringsdict
  • DashWallet/id.lproj/Localizable.stringsdict
  • DashWallet/it.lproj/Localizable.stringsdict
  • DashWallet/ja.lproj/Localizable.stringsdict
  • DashWallet/ko.lproj/Localizable.stringsdict
  • DashWallet/mk.lproj/Localizable.stringsdict
  • DashWallet/ms.lproj/Localizable.stringsdict
  • DashWallet/nb.lproj/Localizable.stringsdict
  • DashWallet/nl.lproj/Localizable.stringsdict
  • DashWallet/pl.lproj/Localizable.stringsdict
  • DashWallet/pt.lproj/Localizable.stringsdict
  • DashWallet/ro.lproj/Localizable.stringsdict
  • DashWallet/ru.lproj/Localizable.stringsdict
  • DashWallet/sk.lproj/Localizable.stringsdict
  • DashWallet/sl.lproj/Localizable.stringsdict
  • DashWallet/sl_SI.lproj/Localizable.stringsdict
  • DashWallet/sq.lproj/Localizable.stringsdict
  • DashWallet/sr.lproj/Localizable.stringsdict
  • DashWallet/sv.lproj/Localizable.stringsdict
  • DashWallet/th.lproj/Localizable.stringsdict
  • DashWallet/tr.lproj/Localizable.stringsdict
  • DashWallet/uk.lproj/Localizable.stringsdict
  • DashWallet/vi.lproj/Localizable.stringsdict
  • DashWallet/zh-Hans.lproj/Localizable.stringsdict
  • DashWallet/zh-Hant-TW.lproj/Localizable.stringsdict
  • DashWallet/zh.lproj/Localizable.stringsdict
  • DashWallet/zh_TW.lproj/Localizable.stringsdict
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/l10n-atm-plural-and-navbar-close-develop

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@romchornyi romchornyi changed the title fix(l10n): pluralise the ATM count subtitle fix(explore-dash): pluralise the ATM count subtitle Aug 21, 2026
@romchornyi

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@romchornyi

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 22, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Head commit changed.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

`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.
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