Complete localization#159
Conversation
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 13 minutes and 24 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughReplaced many hard-coded UI strings with localized lookups via Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR completes app localization coverage by expanding the String Catalog (including Spanish translations) and updating SwiftUI/UI strings to use localized resources consistently.
Changes:
- Expanded
Localizable.xcstringswith additional missing keys/translations (notably for symptoms/vitals graphs, medication sections/types, and accessibility strings). - Updated multiple views/enums to use
String(localized:)for user-facing labels and picker text. - Added
MedicationRecommendationType.localizedDescriptionand adopted it in medication-related UI.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| ENGAGEHF/Resources/Localizable.xcstrings | Adds/updates String Catalog entries (incl. Spanish) for new UI and accessibility strings. |
| ENGAGEHF/Medications/RowLabel/MedicationRecommendationSymbol.swift | Switches accessibility label content to use localized recommendation type (but label itself still not localized). |
| ENGAGEHF/Medications/MedicationsList.swift | Localizes medication section headers via String(localized:). |
| ENGAGEHF/Managers/VitalsManager/VitalsUnit.swift | Localizes unit abbreviations via String(localized:). |
| ENGAGEHF/Managers/MedicationsManager/MedicationDetails.swift | Adds localized description for recommendation types. |
| ENGAGEHF/HeartHealth/Shared/DateGranularity.swift | Localizes date granularity labels. |
| ENGAGEHF/HeartHealth/SelectionTypes/VitalsType.swift | Localizes vitals type labels. |
| ENGAGEHF/HeartHealth/SelectionTypes/SymptomsType.swift | Localizes symptom picker labels and score names. |
| ENGAGEHF/HeartHealth/SelectionTypes/GraphSelection.swift | Localizes graph selection short/full names. |
| ENGAGEHF/HeartHealth/GraphPicker.swift | Uses localized description rather than String(describing:) for picker entries. |
| ENGAGEHF/HeartHealth/AddMeasurement/AddMeasurementView.swift | Localizes measurement field/unit labels. |
| ENGAGEHF/Dashboard/Messages/MessagesSection.swift | Localizes the composed accessibility label for message cards. |
| ENGAGEHF/Dashboard/Messages/MessageRow.swift | Adjusts action icon accessibility label string composition (but still not localized). |
| CLAUDE.md | Adds repository-specific build/test, architecture, and localization guidance. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@ENGAGEHF/Dashboard/Messages/MessageRow.swift`:
- Line 62: The accessibility label currently concatenates an already-localized
action description with the hardcoded English word "Symbol" in the
.accessibilityLabel call; update the call to use a fully localized format string
(e.g., use NSLocalizedString/LocalizedStringKey with a placeholder) so the whole
label is localized, referencing the existing
message.action.localizedDescription.localizedString() value inside that
localized format before passing to .accessibilityLabel (or create a localized
key like "message_action_symbol_accessibility" with a %@ placeholder and use
String.localizedStringWithFormat / LocalizedStringKey to build the final label).
In `@ENGAGEHF/Dashboard/Messages/MessagesSection.swift`:
- Line 47: The accessibility fallback currently uses the ambiguous string
"none"; change the fallback for message.description in MessagesSection (the let
description = message.description ?? String(localized: "none", ...)) to a
clearer phrase such as "No description" and update the localized key/comment
accordingly (e.g., String(localized: "No description", comment: "Accessibility
placeholder for missing message description")) so VoiceOver reads a meaningful
sentence.
In `@ENGAGEHF/Medications/RowLabel/MedicationRecommendationSymbol.swift`:
- Line 34: The accessibility label currently hardcodes the English prefix in the
.accessibilityLabel("Medication Label: \(type.localizedDescription)"); replace
that prefix with a fully localized format string so the entire label is
translated (e.g., use NSLocalizedString or String(localized:) with a format like
"Medication Label: %@" and inject type.localizedDescription). Update the
.accessibilityLabel call to use the localized format and keep
type.localizedDescription as the substituted value so the whole label appears in
the user's language.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 1387a8bd-504f-49d9-8d4d-cc1ae6e1eb1a
📒 Files selected for processing (14)
CLAUDE.mdENGAGEHF/Dashboard/Messages/MessageRow.swiftENGAGEHF/Dashboard/Messages/MessagesSection.swiftENGAGEHF/HeartHealth/AddMeasurement/AddMeasurementView.swiftENGAGEHF/HeartHealth/GraphPicker.swiftENGAGEHF/HeartHealth/SelectionTypes/GraphSelection.swiftENGAGEHF/HeartHealth/SelectionTypes/SymptomsType.swiftENGAGEHF/HeartHealth/SelectionTypes/VitalsType.swiftENGAGEHF/HeartHealth/Shared/DateGranularity.swiftENGAGEHF/Managers/MedicationsManager/MedicationDetails.swiftENGAGEHF/Managers/VitalsManager/VitalsUnit.swiftENGAGEHF/Medications/MedicationsList.swiftENGAGEHF/Medications/RowLabel/MedicationRecommendationSymbol.swiftENGAGEHF/Resources/Localizable.xcstrings
Complete localization
♻️ Current situation & Problem
We noticed that some parts of the app were missing localization, so this PR is attempting to complete localization.
⚙️ Release Notes
📚 Documentation
Please ensure that you properly document any additions in conformance to Spezi Documentation Guide.
You can use this section to describe your solution, but we encourage contributors to document your reasoning and changes using in-line documentation.
✅ Testing
Please ensure that the PR meets the testing requirements set by CodeCov and that new functionality is appropriately tested.
This section describes important information about the tests and why some elements might not be testable.
Code of Conduct & Contributing Guidelines
By creating and submitting this pull request, you agree to follow our Code of Conduct and Contributing Guidelines: