Skip to content

Removing some hardcoded message + French translation update#35

Closed
pipiche38 wants to merge 2 commits into
ryanbr:mainfrom
pipiche38:main
Closed

Removing some hardcoded message + French translation update#35
pipiche38 wants to merge 2 commits into
ryanbr:mainfrom
pipiche38:main

Conversation

@pipiche38

@pipiche38 pipiche38 commented Jul 7, 2026

Copy link
Copy Markdown

What this PR does

Type of change

  • Bug fix
  • New feature
  • Refactor / cleanup
  • Documentation
  • CI / tooling

How it was tested

Checklist

  • Swift package tests pass for any package I touched (swift test in Packages/<name>)
  • Android unit tests pass if I touched android/ (./gradlew testFullDebugUnitTest)
  • No new build warnings introduced
  • UI changes use only StrandDesign tokens — no hardcoded colors, fonts, or spacing
  • No hardcoded hex frame bytes; protocol facts live in the schema / decoders
  • Follows the conventions in docs/CONTRIBUTING.md
  • I did not commit generated output (Strand.xcodeproj/) or any secrets/keystores

Related issues

pipiche38 added 2 commits July 6, 2026 15:37
…instead of a literal or LocalizedStringKey. SwiftUI's Text(String) overload is verbatim — it never localizes, even if the exact text already has translations in the catalog. Fixed:

- FusedRecordView.swift:216 — Text(row.label) → Text(LocalizedStringKey(row.label)) (this is what made "Resting HR / HRV / Sleep / Skin temp / Blood oxygen" show in English on your merged-data screen even though French translations already existed for most of them).
- LiquidTodayView.swift vitalRow(...) calls — wrapped the three vital labels in String(localized:) (same bug, this is why "Heart-rate variability" etc. stayed in English under "RECOVERY VITALS").
- LiquidTodayView.swift batteryAccessibility — rebuilt to match the exact interpolation pattern already used (and already translated) in the classic TodayView.swift, instead of raw string concatenation.

Missing translations: the whole Liquid redesign (new Today screen + Live Session) had never been synced into Localizable.xcstrings — including "You're in a good spot for training." and its 4 siblings, "RECOVERY VITALS", "SYNTHESIS", "YOUR CARDS", "KEY METRICS", "LAST WORKOUTS", "DATA SOURCES", "BEATS PER MINUTE", "Skin temp", the
Live Session screen strings, band-status accessibility strings, etc. Added 44 new catalog entries with de/es/fr/it/pt-PT/zh-Hans/zh-Hant translations, matching this catalog's existing terminology and conventions (pt-PT flagged needs_review like all other pt-PT entries).
Verified the build succeeds (xcodebuild -scheme Strand -destination 'platform=macOS' build → BUILD SUCCEEDED) and that no existing catalog entries were altered by my script (I diffed structurally against HEAD — the ~2500 other changed lines you'll see in git diff are your own already-in-progress French pass that predates this conversation, not something I touched).
…"Good evening") displayed via Text(greeting), which is verbatim and never localizes even though those exact strings were already translated in the catalog. Wrapped with String(localized:) at the source, matching the fix pattern applied throughout this session. Rebuilt (succeeds) and relaunched the app under French — please check the greeting now.

  I also went further and swept the whole Liquid Today + Live Session screens for this same bug class and fixed everything found: sectionHead/ktile helper call sites (KEY METRICS, RECOVERY VITALS grid labels, "Strain"/"Rest HR"), the HeroScoreCell Charge/Effort/Rest labels, the live-HR subtitle text, and the ReadinessEngine's headline/summary/signal text display (which turned out to have never been localized anywhere in the app, classic Today screen included) — plus added ~70 new catalog translations total across two batches.
@ryanbr ryanbr closed this Jul 7, 2026
ryanbr added a commit that referenced this pull request Jul 7, 2026
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 added a commit that referenced this pull request Jul 7, 2026
i18n: localize Today strings + complete the French catalog (#35)
@ryanbr

ryanbr commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Thanks for this — the French translations shipped in v8.3.3. The catalog only had a partial French locale before (~465 of ~3000 strings); it's now complete, matching German and Spanish. The Today-screen strings you made translatable (hero labels, recovery vitals, key-metric tiles, readiness wording, greeting) are in too.

I reworked it slightly on the way in: dropped the battery-accessibility change (it declared an unused estimateText local that shadowed the real computed property, and folded the "charging" suffix into the localization key) in favour of two clean keys. Everything else is as you had it. Appreciate the contribution.

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