Removing some hardcoded message + French translation update#35
Closed
pipiche38 wants to merge 2 commits into
Closed
Removing some hardcoded message + French translation update#35pipiche38 wants to merge 2 commits into
pipiche38 wants to merge 2 commits into
Conversation
…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
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)
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does
Type of change
How it was tested
Checklist
swift testinPackages/<name>)android/(./gradlew testFullDebugUnitTest)StrandDesigntokens — no hardcoded colors, fonts, or spacingdocs/CONTRIBUTING.mdStrand.xcodeproj/) or any secrets/keystoresRelated issues