Skip to content

Commit c81ae04

Browse files
authored
fix(ios): localize Settings accessibility labels (#105859)
* fix(ios): preserve localized accessibility labels * chore(i18n): refresh native source inventory
1 parent e9e7d38 commit c81ae04

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

apps/ios/Sources/Design/SettingsProTabSections.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,7 @@ extension SettingsProTab {
767767

768768
/// Native inset-grouped action row (plain tinted text, no pill chrome).
769769
func gatewayActionButton(
770-
title: String,
770+
title: LocalizedStringKey,
771771
icon: String,
772772
color: Color,
773773
isBusy: Bool,
@@ -788,7 +788,7 @@ extension SettingsProTab {
788788
.buttonStyle(.plain)
789789
.foregroundStyle(color)
790790
.disabled(isBusy || isDisabled)
791-
.accessibilityLabel(title)
791+
.accessibilityLabel(Text(title))
792792
}
793793

794794
var aboutDestination: some View {
@@ -874,7 +874,7 @@ extension SettingsProTab {
874874
}
875875
.contentShape(Rectangle())
876876
}
877-
.accessibilityLabel(title)
877+
.accessibilityLabel(Text(title))
878878
}
879879

880880
func toggleCard(title: LocalizedStringKey, isOn: Binding<Bool>) -> some View {
@@ -1400,7 +1400,7 @@ extension SettingsProTab {
14001400
.contentShape(Rectangle())
14011401
}
14021402
.buttonStyle(.plain)
1403-
.accessibilityLabel(title)
1403+
.accessibilityLabel(Text(title))
14041404
.accessibilityValue(isOn.wrappedValue
14051405
? String(localized: "On")
14061406
: String(localized: "Off"))

scripts/apple-app-i18n.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,10 @@ const RAW_LOCALIZATION_BYPASSES: Record<string, readonly string[]> = {
281281
"func settingsListRow(\n icon: String,\n iconColor: Color,\n title: String",
282282
"func aboutLinkRow(title: String",
283283
"func toggleCard(title: String",
284+
"func gatewayActionButton(\n title: String",
284285
"func gatewaySecureField(_ placeholder: String",
285286
"func settingsToggle(\n _ title: String",
287+
".accessibilityLabel(title)",
286288
],
287289
"apps/ios/Sources/Gateway/GatewayConnectionController+Capabilities.swift": [
288290
'helperText: "Secure connection is required for this host."',

0 commit comments

Comments
 (0)