Skip to content

i18n: localize Today strings + complete the French catalog (#35)#41

Merged
ryanbr merged 1 commit into
mainfrom
i18n-fr-and-localize
Jul 7, 2026
Merged

i18n: localize Today strings + complete the French catalog (#35)#41
ryanbr merged 1 commit into
mainfrom
i18n-fr-and-localize

Conversation

@ryanbr

@ryanbr ryanbr commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Reworks the closed #35 (from @pipiche38) under the NOOP identity.

1. Make Today/record strings translatable

Several UI strings were passed as function arguments (not literal Text views), so Xcode never extracted them into the String Catalog and they couldn't be translated:

  • Static labels → String(localized:): hero Charge/Effort/Rest, the vital rows (HRV / Resting HR / Breaths), the key-metric tiles, readinessWord, the readiness synthesis line, greeting, and the live-HR subtitle + Min/Avg/Max.
  • Dynamic strings that originate in the StrandAnalytics package or a data row (readiness.summary/headline, the fused-metric row label, section-head titles) → rendered via LocalizedStringKey so the app catalog translates them at display. Localizing those at their source would mean making the analytics package itself localized (its own catalog + bundle: .module) — out of scope here.

2. Complete the French locale

The catalog carried only ~465 French entries vs ~3000 for German/Spanish. This fills every string — French now covers all 3088 entries. Purely additive (the diff is +19k/−9): de/es and existing entries are untouched, and the file validates as JSON.

Reworked vs #35

Dropped #35's batteryAccessibility change: it declared let estimateText: String? = nil — dead code that shadowed the real estimateText computed property — and folded the ", charging" suffix into the localization key. Replaced with two clean keys ("Strap battery %lld percent" / "…, charging").

Notes

  • French strings taken as-is from the contributor (native speaker); a later native pass can refine any phrasing.
  • Swift-only + catalog; CI build dispatched to verify (Swift can't be compiled locally).

Closes #35.

Two things, reworked from the closed PR #35:

1. Make hardcoded Today/record UI strings translatable. Labels passed as function
   args (hero Charge/Effort/Rest, the vital rows, key-metric tiles, readiness
   word/synthesis line, greeting, live-HR subtitle + Min/Avg/Max) were never
   extracted into the String Catalog because they weren't literal Text views --
   wrap them in String(localized:). Dynamic strings that originate in the
   StrandAnalytics package or a data row (readiness.summary/headline, fused metric
   row label, section-head titles) are rendered via LocalizedStringKey so the app
   catalog translates them at display (the package isn't itself localized).

2. Complete the French locale: the catalog carried only ~465 fr entries vs ~3000
   for de/es; this fills every string (now 3088 fr). Purely additive -- de/es and
   existing entries are untouched.

Reworked vs #35: dropped the batteryAccessibility change, which shadowed the real
estimateText computed property with a nil local (dead code) and folded the
charging suffix into the localization key -- replaced with two clean keys.

Closes #35.
@ryanbr ryanbr merged commit 5e6289b into main Jul 7, 2026
4 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