From 041dfbb824bff9cdd517013ab39fa32a1208deb9 Mon Sep 17 00:00:00 2001 From: Felipe Giacomini Cocco Date: Thu, 5 Feb 2026 15:08:37 -0300 Subject: [PATCH] Fix strings detections and translates the entire "Stats" section --- DynamicIsland/Localizable.xcstrings | 2 +- .../components/Settings/SettingsView.swift | 30 +++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/DynamicIsland/Localizable.xcstrings b/DynamicIsland/Localizable.xcstrings index 99be532..01b6142 100644 --- a/DynamicIsland/Localizable.xcstrings +++ b/DynamicIsland/Localizable.xcstrings @@ -12966,7 +12966,7 @@ "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Atualizado pelo Última vez" + "value" : "Última Atualização Há" } } } diff --git a/DynamicIsland/components/Settings/SettingsView.swift b/DynamicIsland/components/Settings/SettingsView.swift index b9ee05b..93b42dc 100644 --- a/DynamicIsland/components/Settings/SettingsView.swift +++ b/DynamicIsland/components/Settings/SettingsView.swift @@ -5884,7 +5884,7 @@ struct StatsSettings: View { var body: some View { Form { Section { - Defaults.Toggle("Enable system stats monitoring", key: .enableStatsFeature) + Defaults.Toggle(String(localized: "Enable system stats monitoring"), key: .enableStatsFeature) .settingsHighlight(id: highlightID("Enable system stats monitoring")) .onChange(of: enableStatsFeature) { _, newValue in if !newValue { @@ -5904,7 +5904,7 @@ struct StatsSettings: View { if enableStatsFeature { Section { - Defaults.Toggle("Stop monitoring after closing the notch", key: .statsStopWhenNotchCloses) + Defaults.Toggle(String(localized: "Stop monitoring after closing the notch"), key: .statsStopWhenNotchCloses) .settingsHighlight(id: highlightID("Stop monitoring after closing the notch")) .help("When enabled, stats monitoring stops a few seconds after the notch closes.") @@ -5944,15 +5944,15 @@ struct StatsSettings: View { } Section { - Defaults.Toggle("CPU Usage", key: .showCpuGraph) + Defaults.Toggle(String(localized: "CPU Usage"), key: .showCpuGraph) .settingsHighlight(id: highlightID("CPU Usage")) - Defaults.Toggle("Memory Usage", key: .showMemoryGraph) + Defaults.Toggle(String(localized: "Memory Usage"), key: .showMemoryGraph) .settingsHighlight(id: highlightID("Memory Usage")) - Defaults.Toggle("GPU Usage", key: .showGpuGraph) + Defaults.Toggle(String(localized: "GPU Usage"), key: .showGpuGraph) .settingsHighlight(id: highlightID("GPU Usage")) - Defaults.Toggle("Network Activity", key: .showNetworkGraph) + Defaults.Toggle(String(localized: "Network Activity"), key: .showNetworkGraph) .settingsHighlight(id: highlightID("Network Activity")) - Defaults.Toggle("Disk I/O", key: .showDiskGraph) + Defaults.Toggle(String(localized: "Disk I/O"), key: .showDiskGraph) .settingsHighlight(id: highlightID("Disk I/O")) } header: { Text("Graph Visibility") @@ -5986,7 +5986,7 @@ struct StatsSettings: View { if statsManager.isMonitoring { if showCpuGraph { HStack { - Text("CPU Usage") + Text(String(localized: "CPU Usage")) Spacer() Text(statsManager.cpuUsageString) .foregroundStyle(.secondary) @@ -5995,7 +5995,7 @@ struct StatsSettings: View { if showMemoryGraph { HStack { - Text("Memory Usage") + Text(String(localized: "Memory Usage")) Spacer() Text(statsManager.memoryUsageString) .foregroundStyle(.secondary) @@ -6004,7 +6004,7 @@ struct StatsSettings: View { if showGpuGraph { HStack { - Text("GPU Usage") + Text(String(localized: "GPU Usage")) Spacer() Text(statsManager.gpuUsageString) .foregroundStyle(.secondary) @@ -6013,14 +6013,14 @@ struct StatsSettings: View { if showNetworkGraph { HStack { - Text("Network Download") + Text(String(localized: "Network Download")) Spacer() Text(String(format: "%.1f MB/s", statsManager.networkDownload)) .foregroundStyle(.secondary) } HStack { - Text("Network Upload") + Text(String(localized: "Network Upload")) Spacer() Text(String(format: "%.1f MB/s", statsManager.networkUpload)) .foregroundStyle(.secondary) @@ -6029,14 +6029,14 @@ struct StatsSettings: View { if showDiskGraph { HStack { - Text("Disk Read") + Text(String(localized: "Disk Read")) Spacer() Text(String(format: "%.1f MB/s", statsManager.diskRead)) .foregroundStyle(.secondary) } HStack { - Text("Disk Write") + Text(String(localized: "Disk Write")) Spacer() Text(String(format: "%.1f MB/s", statsManager.diskWrite)) .foregroundStyle(.secondary) @@ -6044,7 +6044,7 @@ struct StatsSettings: View { } HStack { - Text("Last Updated") + Text(String(localized: "Last Updated")) Spacer() Text(statsManager.lastUpdated, style: .relative) .foregroundStyle(.secondary)