Skip to content

Localize missing Appearance settings strings#152

Merged
ryanbr merged 3 commits into
ryanbr:mainfrom
digitalerdude:claude/determined-pare-bf17fb
Jul 9, 2026
Merged

Localize missing Appearance settings strings#152
ryanbr merged 3 commits into
ryanbr:mainfrom
digitalerdude:claude/determined-pare-bf17fb

Conversation

@digitalerdude

Copy link
Copy Markdown

What this PR does

Four strings under Settings → Appearance ("Sky behind cards" and its
caption, "Card transparency" and its caption) were added to
SettingsView.swift's appearanceCard but never made it into
Strand/Resources/Localizable.xcstrings, so every non-English locale fell
back to the raw English source text instead of showing a translation.

Adds de, es, fr, it, pt-PT, zh-Hans, and zh-Hant entries for
all four strings, reusing existing catalog terminology (e.g. "Frecuencia
cardíaca"/"心率" for Heart Rate, "Fondo según el ciclo del día" for the
day-cycle background) so they read consistently with neighboring rows.

Also includes an unrelated one-line CI fix: ReadinessChecklistCard.lead
in HealthView.swift was typed LocalizedStringKey? but
fitnessReadyLead() returns an already-localized String (via
String(localized:)), which broke the macOS build. Retyped to String?
(the only usage is Text(lead), which accepts both). This was a
pre-existing break from commit 75a096a (PR #81), not caused by this
branch, but needed fixing to get CI green here.

Note: pt-PT entries in this catalog are marked needs_review throughout
(existing entries mix in Spanish words), and the four new ones follow that
same convention — worth a native pt-PT pass over the whole file at some
point.

Type of change

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

(Closest fit is "Documentation" for the string-catalog content; the
HealthView.swift change is a minimal, unrelated type fix needed for CI.)

How it was tested

  • Localizable.xcstrings: validated as JSON and confirmed all four keys
    carry complete localization sets via a Python script.
  • HealthView.swift: built locally with xcodegen generate +
    xcodebuild -project Strand.xcodeproj -scheme Strand -destination "generic/platform=macOS" ARCHS="x86_64 arm64" ONLY_ACTIVE_ARCH=NO build
    — BUILD SUCCEEDED.

Checklist

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

Related issues

None

digitalerdude and others added 2 commits July 9, 2026 12:35
…ency)

These four strings were added to SettingsView.swift's appearanceCard but
never made it into the string catalog, so every locale fell back to the
English source text. Adds de/es/fr/it/pt-PT/zh-Hans/zh-Hant translations.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
fitnessReadyLead() returns an already-localized String (via
String(localized:)), but ReadinessChecklistCard.lead was typed
LocalizedStringKey?, which SwiftUI treats as a lookup key rather than
literal text. Retype to String? — Text(_:) accepts both, and this is
the correct type for pre-resolved copy.

Pre-existing break from commit 75a096a (PR ryanbr#81), unrelated to this
branch's localization change; fixing here so PR #5's CI build passes.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Conflict was only a doc-comment collision in HealthView.swift:
upstream independently fixed the same ReadinessChecklistCard.lead
LocalizedStringKey/String type mismatch (with an added explanatory
comment) that this branch's earlier commit also fixed. Kept upstream's
version since it's functionally identical plus the comment.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@ryanbr ryanbr merged commit b3b238a into ryanbr:main Jul 9, 2026
@ryanbr

ryanbr commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Merged — thank you! This was a clean, well-scoped fix: the four Appearance strings ("Sky behind cards" / "Card transparency" and their captions) really were missing from the catalog, so non-English users were seeing raw English there. Nice catch.

Appreciated the care on the details too — reusing the existing catalog terminology so the rows read consistently with their neighbours, keeping it purely additive, and flagging the pt-PT needs_review convention rather than pretending it's final. (That whole-file native pt-PT pass is a good idea for down the line.)

The HealthView.swift type fix you mentioned had already landed on main via #132, so only the localization content came through the merge — exactly as intended. Thanks again for contributing.

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