From e49162f971e424931bb0eac22f04ab9bdad74a7e Mon Sep 17 00:00:00 2001 From: Hebert Marchesi Date: Thu, 30 Jul 2026 10:25:35 -0300 Subject: [PATCH] fix(l10n): apply appearance name localization in MainWindow The appearance name (System/Light/Dark) was rendered via Text(String) and Label(String, systemImage:), which use the non-localizing initializers. As a result the existing "System"/"Light"/"Dark" translations were never applied and the labels always showed English. Wrap the values in LocalizedStringKey (matching AppearancePill) at the menu item, the sidebar value, and the accessibility value so they localize correctly. --- PureMac/Views/MainWindow.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PureMac/Views/MainWindow.swift b/PureMac/Views/MainWindow.swift index b665728..f9d00b9 100644 --- a/PureMac/Views/MainWindow.swift +++ b/PureMac/Views/MainWindow.swift @@ -350,7 +350,7 @@ struct MainWindow: View { Button { theme.appearance = appearance } label: { - Label(appearance.label, systemImage: appearance.icon) + Label(LocalizedStringKey(appearance.label), systemImage: appearance.icon) } } } label: { @@ -366,7 +366,7 @@ struct MainWindow: View { Spacer(minLength: 6) - Text(theme.appearance.label) + Text(LocalizedStringKey(theme.appearance.label)) .font(.system(size: 10.5, weight: .medium)) .foregroundStyle(.secondary) @@ -382,7 +382,7 @@ struct MainWindow: View { .menuStyle(.borderlessButton) .help("Change appearance") .accessibilityLabel("Appearance") - .accessibilityValue(theme.appearance.label) + .accessibilityValue(Text(LocalizedStringKey(theme.appearance.label))) } private var sidebarLabelColor: Color {