Skip to content

feat(l10n): add pt-BR translations for Smart Care dashboard - #145

Merged
momenbasel merged 1 commit into
momenbasel:mainfrom
boombertz:feat/ptbr-dashboard-l10n
Aug 12, 2026
Merged

momenbasel merged 1 commit into
momenbasel:mainfrom
boombertz:feat/ptbr-dashboard-l10n

Conversation

@boombertz

Copy link
Copy Markdown
Contributor

The Smart Care dashboard redesign introduced many string literals that were never added to the localization catalog, so they fell back to English regardless of the app language.

Add the missing Brazilian Portuguese strings for DashboardView, plus "Appearance" and "Advanced Tools", and backfill the same source strings in the English catalog to keep both files in sync.

  • Add 39 pt-BR entries (DashboardView, appearance controls)
  • Backfill 50 source strings in en.lproj
  • Cover the interpolated keys "%lld-POINT LOCAL SCAN" and "%@ free"
  • Validated with plutil -lint; no new duplicate keys

@momenbasel

momenbasel commented Aug 10, 2026 •

Copy link
Copy Markdown
Owner

The premise is correct and I verified it: the 2.9.3 Smart Care redesign (e3a0536) introduced ~50 user-facing literals that were never added to the catalog. Good catch.

Blocking issue: adding the 50 keys to en.lproj alone breaks PureMacTests/LocalizationFilesTests.swift. I ported the test's logic and ran it both ways — main passes, this branch fails with six assertion failures, one per catalog (ar, es, ja, pl, zh-Hans, zh-Hant). The test enforces exact parity against English, so every new source key has to exist in all of them.

Two smaller things:

  • pt-BR.lproj:64 — "Nada removido até você aprovar." is missing the copula. Should be "Nada é removido até você aprovar."
  • pt-BR.lproj:64 — please drop the hard \n. The English source is one sentence that wraps on its own, and the container is fixed-height (296/326pt) and clipped by SmartCareStageSurface, so a forced third line risks clipping.

Also a count correction for the description: this adds 50 pt-BR entries, not 39 the first hunk's 11 are not counted.

The 2.9.3 Smart Care redesign introduced ~50 user-facing string literals
(dashboard hero, Care areas, and the appearance controls) that were
never added to the localization catalog, so they fell back to English
regardless of the app language.

Add Brazilian Portuguese translations for these strings, matching the
app's existing pt-BR terminology (e.g. "Verificar"/"Verificação" for
scan). LocalizationFilesTests enforces exact English key parity across
all ten catalogs, so add the same 50 keys to every other catalog (ar,
es, ja, pl, ru, uk, zh-Hans, zh-Hant) as English fallbacks
(value == source), marked pending translation, so the suite stays green
without shipping unreviewed translations for languages I don't speak.

- 50 entries per catalog, including the interpolated keys
  "%lld-POINT LOCAL SCAN" and "%@ free"
- Hero description kept as one wrapping sentence (no forced newline) so
  it is not clipped by the fixed-height SmartCareStageSurface
- Validated with plutil -lint and the ported parity check

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@boombertz
boombertz force-pushed the feat/ptbr-dashboard-l10n branch from c0fefee to de6488b Compare August 11, 2026 14:25
@boombertz

Copy link
Copy Markdown
Contributor Author

Thanks for the detailed review Moamen
Addressed all points:

  • Parity test — added the 50 keys to every catalog.
    Rebased onto latest main, which also brought in ru/uk, so those are covered too.
    Non-pt-BR catalogs use English fallbacks (marked pending translation) to keep the suite green without shipping translations I can't verify. LocalizationFilesTests now passes (all 5 cases), verified locally.
  • pt-BR:64 copula — fixed to "Nada é removido até você aprovar."
  • pt-BR:64 hard \n — dropped; it's a single wrapping sentence now.
  • Count — it's 50 pt-BR entries, corrected in the description.
  • Also aligned the pt-BR scan wording to the app's existing Verificar/
    Verificação terminology.

Built on macOS 13.0 deployment target (BUILD SUCCEEDED).

@momenbasel momenbasel left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-verified the updated branch as part of an automated maintainer pass:

  • Parity: ported LocalizationFilesTests logic and ran it against this branch — all 10 catalogs now carry the identical 395-key set (345 on main + the 50 added here). No missing, no extra, no duplicate keys, plutil -lint clean on all files.
  • Format specifiers: signature check passes for every key in every catalog; spot-checked the interpolated ones against the call sites (%lld-POINT LOCAL SCAN ← Int interpolation at DashboardView.swift:238, %@ free ← String at :315, Last clean: %@, %lld checks, %lld selected) — all types line up.
  • Review points: copula fixed (Nada é removido até você aprovar.), hard \n dropped (the remaining \ns in Make room.\nKeep control. / Scan first.\nDecide what goes. mirror the English source exactly, which is correct), English-fallback strategy for catalogs you couldn't verify matches how we want to stage translations.
  • Risk: zero code changes, additive-only .strings entries — no deletion-logic, threading, or privacy surface touched. CI build is green.

Merging via squash. Thanks for the careful follow-up, and for catching that the 2.9.3 dashboard shipped ~50 unlocalized literals in the first place — the en.lproj backfill is the real fix here, the other locales can now translate incrementally.

— automated maintainer pass on behalf of @momenbasel

@momenbasel
momenbasel merged commit 760f572 into momenbasel:main Aug 12, 2026
1 check passed
momenbasel added a commit that referenced this pull request Aug 12, 2026
…ump 2.9.7

Ships the simctl runtime listing/deletion feature (#147), the pt-BR Smart
Care dashboard translations (#145), the full French localization (#129),
and the Xcode Junk description key restoration (#150), all already merged
to main. Regenerated project picks up the new source and strings files.

Co-authored-by: Cursor <[email protected]>
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