GapsScreen.swift renders the subcategory of a gap recommendation by humanizing the raw enum name, instead of looking up the subcategory_* localized key like every other iOS call site.
iosApp/iosApp/Screens/GapsScreen.swift:350:
if let sub = recommendation.subcategory {
detailRow(String(localized: "label_subcategory"), sub.name.lowercased().replacingOccurrences(of: "_", with: " ").capitalized)
}
Compare with AddItemSheet.swift:458-461 and ItemDetailSheet.swift:223-226, which both do:
let key = "subcategory_\(subcategory.name.lowercased())"
return String(localized: String.LocalizationValue(key))
Consequence: the gap detail row is never translated. In pt-BR the app shows "Boots Chelsea" instead of "Bota chelsea", "Hat Cap" instead of "Boné", "Bag Backpack" instead of "Mochila". It also leaks the enum's internal wording (HAT_CAP → "Hat Cap") into the UI even in English. Android's GapsScreen.kt:519-520 already uses it.displayName() and is correct, so the two platforms disagree.
Suggested fix
- Reuse the localized lookup. The helper is currently duplicated verbatim in
AddItemSheet.swift and ItemDetailSheet.swift — worth extracting it to a single place (e.g. a Subcategory extension in Components/) and calling it from all three screens.
Noticed while fixing #51.
GapsScreen.swiftrenders the subcategory of a gap recommendation by humanizing the raw enum name, instead of looking up thesubcategory_*localized key like every other iOS call site.iosApp/iosApp/Screens/GapsScreen.swift:350:Compare with
AddItemSheet.swift:458-461andItemDetailSheet.swift:223-226, which both do:Consequence: the gap detail row is never translated. In pt-BR the app shows "Boots Chelsea" instead of "Bota chelsea", "Hat Cap" instead of "Boné", "Bag Backpack" instead of "Mochila". It also leaks the enum's internal wording (
HAT_CAP→ "Hat Cap") into the UI even in English. Android'sGapsScreen.kt:519-520already usesit.displayName()and is correct, so the two platforms disagree.Suggested fix
AddItemSheet.swiftandItemDetailSheet.swift— worth extracting it to a single place (e.g. aSubcategoryextension inComponents/) and calling it from all three screens.Noticed while fixing #51.