Skip to content

fix(ios): translate the table page range - #2987

Merged
datlechin merged 1 commit into
mainfrom
fix/ios-pager-label-localization
Sep 18, 2026
Merged

datlechin merged 1 commit into
mainfrom
fix/ios-pager-label-localization

Conversation

@datlechin

Copy link
Copy Markdown
Member

Summary

The page range under a table on iPhone and iPad ("1-100 of 3503") was English in every language. DataBrowserViewModel.paginationLabel built it with plain string interpolation and DataBrowserView shows it through Text(String), which never looks anything up. It turned up in the App Store screenshots, where it was the only English text on the Vietnamese, Korean and Chinese screens.

Change

  • pageRangeLabel(start:end:total:bundle:) formats String(localized: "%1$lld-%2$lld of %3$lld"), following the house rule of never interpolating inside String(localized:). The range without a total is digits only and stays as it was.
  • The key is added to the iOS catalog, translated into Vietnamese, Korean, Simplified and Traditional Chinese in the same shape as the existing %lld of %lld row counter.

Tests

  • New pageRangeLabelIsLocalized checks the English output, and the Vietnamese output read from the app's compiled vi.lproj.
  • Full iOS test target on the iPhone 18 Pro simulator: 667 passed, 0 failed.
  • localization.py --target ios verify: ok. SwiftLint strict on both files: clean.

@datlechin
datlechin merged commit 221d622 into main Sep 18, 2026
8 of 9 checks passed
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.

1 participant