i18n: localize Today strings + complete the French catalog (#35)#41
Merged
Conversation
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.
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.
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
Textviews), so Xcode never extracted them into the String Catalog and they couldn't be translated: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.readiness.summary/headline, the fused-metric row label, section-head titles) → rendered viaLocalizedStringKeyso 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
batteryAccessibilitychange: it declaredlet estimateText: String? = nil— dead code that shadowed the realestimateTextcomputed property — and folded the ", charging" suffix into the localization key. Replaced with two clean keys ("Strap battery %lld percent" / "…, charging").Notes
Closes #35.