From 219a84cd624f044d6682b293e54c7255333814f0 Mon Sep 17 00:00:00 2001 From: Garth Vander Houwen Date: Thu, 8 May 2025 15:18:36 -0700 Subject: [PATCH] More translation strings --- Localizable.xcstrings | 80 +++---------------- Meshtastic/Enums/AppSettingsEnums.swift | 2 +- Meshtastic/Persistence/UpdateCoreData.swift | 6 +- .../Config/Module/TelemetryConfig.swift | 2 +- Meshtastic/Views/Settings/Settings.swift | 10 +-- 5 files changed, 20 insertions(+), 80 deletions(-) diff --git a/Localizable.xcstrings b/Localizable.xcstrings index f0c48e6e..ece3b65f 100644 --- a/Localizable.xcstrings +++ b/Localizable.xcstrings @@ -8879,7 +8879,7 @@ } } }, - "device" : { + "Device" : { "localizations" : { "de" : { "stringUnit" : { @@ -8887,12 +8887,6 @@ "value" : "Gerät" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Device" - } - }, "fr" : { "stringUnit" : { "state" : "translated", @@ -16237,7 +16231,7 @@ } } }, - "logging" : { + "Logging" : { "localizations" : { "de" : { "stringUnit" : { @@ -16245,12 +16239,6 @@ "value" : "Logging" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Logging" - } - }, "fr" : { "stringUnit" : { "state" : "translated", @@ -17331,7 +17319,7 @@ } } }, - "mesh.log.bluetooth.config %@" : { + "Bluetooth config received: %@" : { "localizations" : { "de" : { "stringUnit" : { @@ -17339,12 +17327,6 @@ "value" : "Bluetooth Konfiguration empfangen: %@" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Bluetooth config received: %@" - } - }, "fr" : { "stringUnit" : { "state" : "translated", @@ -17685,7 +17667,7 @@ } } }, - "mesh.log.device.config %@" : { + "Device config received: %@" : { "localizations" : { "de" : { "stringUnit" : { @@ -17693,12 +17675,6 @@ "value" : "Gerätekonfiguration empfangen: %@" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Device config received: %@" - } - }, "fr" : { "stringUnit" : { "state" : "translated", @@ -18917,7 +18893,7 @@ } } }, - "mesh.log.telemetry.config %@" : { + "Telemetry module config received: %@" : { "localizations" : { "de" : { "stringUnit" : { @@ -18925,12 +18901,6 @@ "value" : "Telemetrie Modul Konfiguration empfangen: %@" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Telemetry module config received: %@" - } - }, "fr" : { "stringUnit" : { "state" : "translated", @@ -20148,7 +20118,7 @@ } } }, - "module.configuration" : { + "Module Configuration" : { "localizations" : { "de" : { "stringUnit" : { @@ -20156,12 +20126,6 @@ "value" : "Modul Konfiguration" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Module Configuration" - } - }, "fr" : { "stringUnit" : { "state" : "translated", @@ -20656,7 +20620,7 @@ } } }, - "network" : { + "Network" : { "localizations" : { "de" : { "stringUnit" : { @@ -20664,12 +20628,6 @@ "value" : "Netzwerk" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Network" - } - }, "fr" : { "stringUnit" : { "state" : "translated", @@ -21668,7 +21626,7 @@ } } }, - "nodelist.filter.distance %@" : { + "up to %@ away" : { "localizations" : { "de" : { "stringUnit" : { @@ -21676,12 +21634,6 @@ "value" : "bis zu %@ entfernt" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "up to %@ away" - } - }, "fr" : { "stringUnit" : { "state" : "translated", @@ -30845,7 +30797,7 @@ } } }, - "telemetry" : { + "Telemetry" : { "localizations" : { "de" : { "stringUnit" : { @@ -30853,12 +30805,6 @@ "value" : "Telemetrie (Sensoren)" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Telemetry (Sensors)" - } - }, "fr" : { "stringUnit" : { "state" : "translated", @@ -30909,7 +30855,7 @@ } } }, - "telemetry.config" : { + "Telemetry Config" : { "localizations" : { "de" : { "stringUnit" : { @@ -30917,12 +30863,6 @@ "value" : "Telemetrie Einstellungen" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Telemetry Config" - } - }, "fr" : { "stringUnit" : { "state" : "translated", diff --git a/Meshtastic/Enums/AppSettingsEnums.swift b/Meshtastic/Enums/AppSettingsEnums.swift index 0797a0df..8355c4b4 100644 --- a/Meshtastic/Enums/AppSettingsEnums.swift +++ b/Meshtastic/Enums/AppSettingsEnums.swift @@ -66,7 +66,7 @@ enum MeshMapDistances: Double, CaseIterable, Identifiable { var id: Double { self.rawValue } var description: String { let distanceFormatter = MKDistanceFormatter() - return String.localizedStringWithFormat("nodelist.filter.distance %@".localized, distanceFormatter.string(fromDistance: Double(self.rawValue))) + return String.localizedStringWithFormat("up to %@ away".localized, distanceFormatter.string(fromDistance: Double(self.rawValue))) } } diff --git a/Meshtastic/Persistence/UpdateCoreData.swift b/Meshtastic/Persistence/UpdateCoreData.swift index 01e29d47..431bf95d 100644 --- a/Meshtastic/Persistence/UpdateCoreData.swift +++ b/Meshtastic/Persistence/UpdateCoreData.swift @@ -406,7 +406,7 @@ func upsertPositionPacket (packet: MeshPacket, context: NSManagedObjectContext) func upsertBluetoothConfigPacket(config: Config.BluetoothConfig, nodeNum: Int64, sessionPasskey: Data? = Data(), context: NSManagedObjectContext) { - let logString = String.localizedStringWithFormat("mesh.log.bluetooth.config %@".localized, String(nodeNum)) + let logString = String.localizedStringWithFormat("Bluetooth config received: %@".localized, String(nodeNum)) Logger.mesh.info("📶 \(logString, privacy: .public)") let fetchNodeInfoRequest = NodeInfoEntity.fetchRequest() @@ -450,7 +450,7 @@ func upsertBluetoothConfigPacket(config: Config.BluetoothConfig, nodeNum: Int64, func upsertDeviceConfigPacket(config: Config.DeviceConfig, nodeNum: Int64, sessionPasskey: Data? = Data(), context: NSManagedObjectContext) { - let logString = String.localizedStringWithFormat("mesh.log.device.config %@".localized, String(nodeNum)) + let logString = String.localizedStringWithFormat("Device config received: %@".localized, String(nodeNum)) Logger.mesh.info("📟 \(logString, privacy: .public)") let fetchNodeInfoRequest = NodeInfoEntity.fetchRequest() fetchNodeInfoRequest.predicate = NSPredicate(format: "num == %lld", Int64(nodeNum)) @@ -1393,7 +1393,7 @@ func upsertStoreForwardModuleConfigPacket(config: ModuleConfig.StoreForwardConfi func upsertTelemetryModuleConfigPacket(config: ModuleConfig.TelemetryConfig, nodeNum: Int64, sessionPasskey: Data? = Data(), context: NSManagedObjectContext) { - let logString = String.localizedStringWithFormat("mesh.log.telemetry.config %@".localized, String(nodeNum)) + let logString = String.localizedStringWithFormat("Telemetry module config received: %@".localized, String(nodeNum)) Logger.data.info("📈 \(logString, privacy: .public)") let fetchNodeInfoRequest = NodeInfoEntity.fetchRequest() diff --git a/Meshtastic/Views/Settings/Config/Module/TelemetryConfig.swift b/Meshtastic/Views/Settings/Config/Module/TelemetryConfig.swift index 79bf05b2..0dfe7566 100644 --- a/Meshtastic/Views/Settings/Config/Module/TelemetryConfig.swift +++ b/Meshtastic/Views/Settings/Config/Module/TelemetryConfig.swift @@ -124,7 +124,7 @@ struct TelemetryConfig: View { } } } - .navigationTitle("telemetry.config") + .navigationTitle("Telemetry Config") .navigationBarItems( trailing: ZStack { ConnectedDevice( diff --git a/Meshtastic/Views/Settings/Settings.swift b/Meshtastic/Views/Settings/Settings.swift index 1e9ab8a7..fc40aa52 100644 --- a/Meshtastic/Views/Settings/Settings.swift +++ b/Meshtastic/Views/Settings/Settings.swift @@ -124,7 +124,7 @@ struct Settings: View { NavigationLink(value: SettingsNavigationState.device) { Label { - Text("device") + Text("Device") } icon: { Image(systemName: "flipphone") } @@ -140,7 +140,7 @@ struct Settings: View { NavigationLink(value: SettingsNavigationState.network) { Label { - Text("network") + Text("Network") } icon: { Image(systemName: "network") } @@ -269,7 +269,7 @@ struct Settings: View { if isModuleSupported(.telemetryConfig) { NavigationLink(value: SettingsNavigationState.telemetry) { Label { - Text("telemetry") + Text("Telemetry") } icon: { Image(systemName: "chart.xyaxis.line") } @@ -286,7 +286,7 @@ struct Settings: View { Text("This node does not support any configurable modules.") } } header: { - Text("module.configuration") + Text("Module Configuration") } footer: { if moduleOverride { Text("Currently showing modules that may not be supported by this node.") @@ -295,7 +295,7 @@ struct Settings: View { } var loggingSection: some View { - Section(header: Text("logging")) { + Section(header: Text("Logging")) { NavigationLink(value: SettingsNavigationState.debugLogs) { Label { Text("Logs")