From 21e86deb95cdeadd1b1cc6dbeb4b72ed690ae1c2 Mon Sep 17 00:00:00 2001 From: Garth Vander Houwen Date: Sat, 15 Feb 2025 11:28:28 -0800 Subject: [PATCH] Remove lora config keys --- Localizable.xcstrings | 286 +++--------------- Meshtastic/Enums/LoraConfigEnums.swift | 40 +-- .../Helpers/Mqtt/MqttClientProxyManager.swift | 2 +- Meshtastic/Views/Bluetooth/Connect.swift | 2 +- .../TextMessageField/TextMessageField.swift | 2 +- Meshtastic/Views/Nodes/DeviceMetricsLog.swift | 2 +- .../Views/Settings/Config/LoRaConfig.swift | 2 +- .../Config/Module/AmbientLightingConfig.swift | 2 +- .../Views/Settings/Config/PowerConfig.swift | 2 +- Meshtastic/Views/Settings/Settings.swift | 4 +- Meshtastic/Views/Settings/UserConfig.swift | 2 +- 11 files changed, 77 insertions(+), 269 deletions(-) diff --git a/Localizable.xcstrings b/Localizable.xcstrings index 941d7b71..427eb71f 100644 --- a/Localizable.xcstrings +++ b/Localizable.xcstrings @@ -1610,7 +1610,7 @@ } } }, - "ambient.lighting" : { + "Ambient Lighting" : { "localizations" : { "de" : { "stringUnit" : { @@ -1674,7 +1674,7 @@ } } }, - "ambient.lighting.config" : { + "Ambient Lighting Config" : { "localizations" : { "de" : { "stringUnit" : { @@ -1856,136 +1856,6 @@ } } }, - "appsettings.provide.location" : { - "extractionState" : "manual", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Standort im Mesh veröffentlichen" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Share location" - } - }, - "fr" : { - "stringUnit" : { - "state" : "translated", - "value" : "Partager la position" - } - }, - "he" : { - "stringUnit" : { - "state" : "translated", - "value" : "שתף מיקום" - } - }, - "pl" : { - "stringUnit" : { - "state" : "translated", - "value" : "Udostępnij lokalizację" - } - }, - "pt-PT" : { - "stringUnit" : { - "state" : "translated", - "value" : "Partilha localização" - } - }, - "se" : { - "stringUnit" : { - "state" : "translated", - "value" : "Dela plats" - } - }, - "sr" : { - "stringUnit" : { - "state" : "translated", - "value" : "Подели информације о локацији" - } - }, - "zh-Hans" : { - "stringUnit" : { - "state" : "translated", - "value" : "提供定位到 Mesh 网络" - } - }, - "zh-Hant-TW" : { - "stringUnit" : { - "state" : "translated", - "value" : "提供定位到 Mesh 網路" - } - } - } - }, - "appsettings.smartposition" : { - "extractionState" : "manual", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Smart Position" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Smart Position" - } - }, - "fr" : { - "stringUnit" : { - "state" : "translated", - "value" : "Position intelligente" - } - }, - "he" : { - "stringUnit" : { - "state" : "translated", - "value" : "מיקום חכם" - } - }, - "pl" : { - "stringUnit" : { - "state" : "translated", - "value" : "Smart Position" - } - }, - "pt-PT" : { - "stringUnit" : { - "state" : "translated", - "value" : "Posição Inteligente" - } - }, - "se" : { - "stringUnit" : { - "state" : "translated", - "value" : "Smart position" - } - }, - "sr" : { - "stringUnit" : { - "state" : "translated", - "value" : "Паметно позиционирање" - } - }, - "zh-Hans" : { - "stringUnit" : { - "state" : "translated", - "value" : "智能定位" - } - }, - "zh-Hant-TW" : { - "stringUnit" : { - "state" : "translated", - "value" : "智能定位" - } - } - } - }, "Are you sure you want to delete this message?" : { "localizations" : { "sr" : { @@ -2025,9 +1895,6 @@ } }, "Are you sure?" : { - - }, - "are.you.sure" : { "localizations" : { "de" : { "stringUnit" : { @@ -2091,72 +1958,10 @@ } } }, - "ascii.capable" : { - "extractionState" : "manual", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "ASCII-fähig" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "ASCII Capable" - } - }, - "fr" : { - "stringUnit" : { - "state" : "translated", - "value" : "ASCII Compatible" - } - }, - "he" : { - "stringUnit" : { - "state" : "translated", - "value" : "בעל יכולת ASCII" - } - }, - "pl" : { - "stringUnit" : { - "state" : "translated", - "value" : "Zgodny z ASCII" - } - }, - "pt-PT" : { - "stringUnit" : { - "state" : "translated", - "value" : "Capacidade ASCII" - } - }, - "se" : { - "stringUnit" : { - "state" : "translated", - "value" : "ASCII-kompatibel" - } - }, - "sr" : { - "stringUnit" : { - "state" : "translated", - "value" : "ASCII способан" - } - }, - "zh-Hans" : { - "stringUnit" : { - "state" : "translated", - "value" : "ASCII 兼容" - } - }, - "zh-Hant-TW" : { - "stringUnit" : { - "state" : "translated", - "value" : "支援 ASCII" - } - } - } + "are.you.sure" : { + }, - "australia.new.zealand" : { + "Australia / New Zealand" : { "extractionState" : "manual", "localizations" : { "en" : { @@ -2205,7 +2010,7 @@ } } }, - "available.radios" : { + "Available Radios" : { "localizations" : { "de" : { "stringUnit" : { @@ -2355,23 +2160,7 @@ } } }, - "Battery Level %" : { - "localizations" : { - "sr" : { - "stringUnit" : { - "state" : "translated", - "value" : "Ниво батерије у %" - } - }, - "zh-Hans" : { - "stringUnit" : { - "state" : "translated", - "value" : "电池电量 %" - } - } - } - }, - "battery.level" : { + "Battery Level" : { "localizations" : { "de" : { "stringUnit" : { @@ -2434,6 +2223,25 @@ } } } + }, + "Battery Level %" : { + "localizations" : { + "sr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Ниво батерије у %" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "电池电量 %" + } + } + } + }, + "battery.level" : { + }, "Baud" : { "localizations" : { @@ -4639,7 +4447,7 @@ } } }, - "china" : { + "China" : { "extractionState" : "manual", "localizations" : { "en" : { @@ -9343,7 +9151,7 @@ } } }, - "dismiss.keyboard" : { + "Dismiss" : { "localizations" : { "de" : { "stringUnit" : { @@ -9407,7 +9215,7 @@ } } }, - "display" : { + "Display" : { "localizations" : { "de" : { "stringUnit" : { @@ -10401,7 +10209,7 @@ } } }, - "european.union.433mhz" : { + "European Union 433MHz" : { "extractionState" : "manual", "localizations" : { "en" : { @@ -10418,7 +10226,7 @@ } } }, - "european.union.868mhz" : { + "European Union 868MHz" : { "extractionState" : "manual", "localizations" : { "en" : { @@ -13204,7 +13012,7 @@ } } }, - "india" : { + "India" : { "extractionState" : "manual", "localizations" : { "en" : { @@ -15870,7 +15678,7 @@ } } }, - "korea" : { + "Korea" : { "extractionState" : "manual", "localizations" : { "en" : { @@ -16928,7 +16736,7 @@ } } }, - "malaysia.433mhz" : { + "Malaysia 433mhz" : { "extractionState" : "manual", "localizations" : { "en" : { @@ -16945,7 +16753,7 @@ } } }, - "malaysia.919mhz" : { + "Malaysia 919mhz" : { "extractionState" : "manual", "localizations" : { "en" : { @@ -21564,7 +21372,7 @@ } } }, - "new.zealand.865mhz" : { + "New Zealand 865mhz" : { "extractionState" : "manual", "localizations" : { "en" : { @@ -23132,7 +22940,7 @@ } } }, - "philippines.433mhz" : { + "Philippines 433mhz" : { "extractionState" : "manual", "localizations" : { "en" : { @@ -23149,7 +22957,7 @@ } } }, - "philippines.868mhz" : { + "Philippines 868mhz" : { "extractionState" : "manual", "localizations" : { "en" : { @@ -23166,7 +22974,7 @@ } } }, - "philippines.915mhz" : { + "Philippines 915mhz" : { "extractionState" : "manual", "localizations" : { "en" : { @@ -23380,7 +23188,7 @@ } } }, - "please.set.a.region" : { + "Please set a region" : { "extractionState" : "manual", "localizations" : { "en" : { @@ -26700,7 +26508,7 @@ } } }, - "russia" : { + "Russia" : { "extractionState" : "manual", "localizations" : { "en" : { @@ -28767,7 +28575,7 @@ } } }, - "singapore.923mhz" : { + "Singapore 923mhz" : { "extractionState" : "manual", "localizations" : { "en" : { @@ -29316,7 +29124,7 @@ } } }, - "taiwan" : { + "Taiwan" : { "extractionState" : "manual", "localizations" : { "en" : { @@ -30243,7 +30051,7 @@ } } }, - "thailand" : { + "Thailand" : { "extractionState" : "manual", "localizations" : { "en" : { @@ -31775,7 +31583,7 @@ } } }, - "ukraine.433mhz" : { + "Ukraine 433mhz" : { "extractionState" : "manual", "localizations" : { "en" : { @@ -31792,7 +31600,7 @@ } } }, - "ukraine.868mhz" : { + "Ukraine 868mhz" : { "extractionState" : "manual", "localizations" : { "en" : { @@ -31819,7 +31627,7 @@ } } }, - "united.states" : { + "United States" : { "extractionState" : "manual", "localizations" : { "en" : { diff --git a/Meshtastic/Enums/LoraConfigEnums.swift b/Meshtastic/Enums/LoraConfigEnums.swift index 2873c86f..7afdd9f2 100644 --- a/Meshtastic/Enums/LoraConfigEnums.swift +++ b/Meshtastic/Enums/LoraConfigEnums.swift @@ -83,49 +83,49 @@ enum RegionCodes: Int, CaseIterable, Identifiable { var description: String { switch self { case .unset: - return "please.set.a.region".localized + return "Please set a region".localized case .us: - return "united.states".localized + return "United States".localized case .eu433: - return "european.union.433mhz".localized + return "European Union 433MHz".localized case .eu868: - return "european.union.868mhz".localized + return "European Union 868MHz".localized case .cn: - return "china".localized + return "China".localized case .jp: return "Japan".localized case .anz: - return "australia.new.zealand".localized + return "Australia / New Zealand".localized case .kr: - return "korea".localized + return "Korea".localized case .tw: - return "taiwan".localized + return "Taiwan".localized case .ru: - return "russia".localized + return "Russia".localized case .in: - return "india".localized + return "India".localized case .nz865: - return "new.zealand.865mhz".localized + return "New Zealand 865mhz".localized case .th: - return "thailand".localized + return "Thailand".localized case .ua433: - return "ukraine.433mhz".localized + return "Ukraine 433mhz".localized case .ua868: - return "ukraine.868mhz".localized + return "Ukraine 868mhz".localized case .lora24: return "2.4ghz".localized case .my433: - return "malaysia.433mhz".localized + return "Malaysia 433mhz".localized case .my919: - return "malaysia.919mhz".localized + return "Malaysia 919mhz".localized case .sg923: - return "singapore.923mhz".localized + return "Singapore 923mhz".localized case .ph433: - return "philippines.433mhz".localized + return "Philippines 433mhz".localized case .ph868: - return "philippines.868mhz".localized + return "Philippines 868mhz".localized case .ph915: - return "philippines.915mhz".localized + return "Philippines 915mhz".localized } } var dutyCycle: Int { diff --git a/Meshtastic/Helpers/Mqtt/MqttClientProxyManager.swift b/Meshtastic/Helpers/Mqtt/MqttClientProxyManager.swift index 8fbcaff2..cac34de8 100644 --- a/Meshtastic/Helpers/Mqtt/MqttClientProxyManager.swift +++ b/Meshtastic/Helpers/Mqtt/MqttClientProxyManager.swift @@ -26,7 +26,7 @@ class MqttClientProxyManager { var debugLog = false func connectFromConfigSettings(node: NodeInfoEntity) { let defaultServerAddress = "mqtt.meshtastic.org" - var useSsl = node.mqttConfig?.tlsEnabled == true + let useSsl = node.mqttConfig?.tlsEnabled == true var defaultServerPort = useSsl ? 8883 : 1883 var host = node.mqttConfig?.address if host == nil || host!.isEmpty { diff --git a/Meshtastic/Views/Bluetooth/Connect.swift b/Meshtastic/Views/Bluetooth/Connect.swift index cb60b7e6..b17d9538 100644 --- a/Meshtastic/Views/Bluetooth/Connect.swift +++ b/Meshtastic/Views/Bluetooth/Connect.swift @@ -197,7 +197,7 @@ struct Connect: View { .textCase(nil) if !self.bleManager.isConnected { - Section(header: Text("available.radios").font(.title)) { + Section(header: Text("Available Radios").font(.title)) { ForEach(bleManager.peripherals.filter({ $0.peripheral.state == CBPeripheralState.disconnected }).sorted(by: { $0.name < $1.name })) { peripheral in HStack { if UserDefaults.preferredPeripheralId == peripheral.peripheral.identifier.uuidString { diff --git a/Meshtastic/Views/Messages/TextMessageField/TextMessageField.swift b/Meshtastic/Views/Messages/TextMessageField/TextMessageField.swift index 1eca5015..c8def69b 100644 --- a/Meshtastic/Views/Messages/TextMessageField/TextMessageField.swift +++ b/Meshtastic/Views/Messages/TextMessageField/TextMessageField.swift @@ -41,7 +41,7 @@ struct TextMessageField: View { .keyboardType(.default) .toolbar { ToolbarItemGroup(placement: .keyboard) { - Button("dismiss.keyboard") { + Button("Dismiss") { isFocused = false } .font(.subheadline) diff --git a/Meshtastic/Views/Nodes/DeviceMetricsLog.swift b/Meshtastic/Views/Nodes/DeviceMetricsLog.swift index a2adae6c..c790e689 100644 --- a/Meshtastic/Views/Nodes/DeviceMetricsLog.swift +++ b/Meshtastic/Views/Nodes/DeviceMetricsLog.swift @@ -140,7 +140,7 @@ struct DeviceMetricsLog: View { } else { /// Multi Column table for ipads and mac Table(deviceMetrics, selection: $selection, sortOrder: $sortOrder) { - TableColumn("battery.level") { dm in + TableColumn("Battery Level") { dm in if dm.batteryLevel > 100 { Text("Powered") } else { diff --git a/Meshtastic/Views/Settings/Config/LoRaConfig.swift b/Meshtastic/Views/Settings/Config/LoRaConfig.swift index 81cfa1ba..0948f36f 100644 --- a/Meshtastic/Views/Settings/Config/LoRaConfig.swift +++ b/Meshtastic/Views/Settings/Config/LoRaConfig.swift @@ -157,7 +157,7 @@ struct LoRaConfig: View { TextField("Frequency Slot", value: $channelNum, formatter: formatter) .toolbar { ToolbarItemGroup(placement: .keyboard) { - Button("dismiss.keyboard") { + Button("Dismiss") { focusedField = nil } .font(.subheadline) diff --git a/Meshtastic/Views/Settings/Config/Module/AmbientLightingConfig.swift b/Meshtastic/Views/Settings/Config/Module/AmbientLightingConfig.swift index 62340da8..8e3a0f02 100644 --- a/Meshtastic/Views/Settings/Config/Module/AmbientLightingConfig.swift +++ b/Meshtastic/Views/Settings/Config/Module/AmbientLightingConfig.swift @@ -75,7 +75,7 @@ struct AmbientLightingConfig: View { } } } - .navigationTitle("ambient.lighting.config") + .navigationTitle("Ambient Lighting Config") .navigationBarItems( trailing: ZStack { ConnectedDevice( diff --git a/Meshtastic/Views/Settings/Config/PowerConfig.swift b/Meshtastic/Views/Settings/Config/PowerConfig.swift index e9f7c0e5..abd2e30f 100644 --- a/Meshtastic/Views/Settings/Config/PowerConfig.swift +++ b/Meshtastic/Views/Settings/Config/PowerConfig.swift @@ -112,7 +112,7 @@ struct PowerConfig: View { .toolbar { ToolbarItemGroup(placement: .keyboard) { Spacer() - Button("dismiss.keyboard") { + Button("Dismiss") { isFocused = false } .font(.subheadline) diff --git a/Meshtastic/Views/Settings/Settings.swift b/Meshtastic/Views/Settings/Settings.swift index 9163d187..da648d5a 100644 --- a/Meshtastic/Views/Settings/Settings.swift +++ b/Meshtastic/Views/Settings/Settings.swift @@ -120,7 +120,7 @@ struct Settings: View { NavigationLink(value: SettingsNavigationState.display) { Label { - Text("display") + Text("Display") } icon: { Image(systemName: "display") } @@ -156,7 +156,7 @@ struct Settings: View { Section("module.configuration") { NavigationLink(value: SettingsNavigationState.ambientLighting) { Label { - Text("ambient.lighting") + Text("Ambient Lighting") } icon: { Image(systemName: "light.max") } diff --git a/Meshtastic/Views/Settings/UserConfig.swift b/Meshtastic/Views/Settings/UserConfig.swift index daacb849..7d1ede4f 100644 --- a/Meshtastic/Views/Settings/UserConfig.swift +++ b/Meshtastic/Views/Settings/UserConfig.swift @@ -109,7 +109,7 @@ struct UserConfig: View { TextField("Frequency Override", value: $overrideFrequency, formatter: floatFormatter) .toolbar { ToolbarItemGroup(placement: .keyboard) { - Button("dismiss.keyboard") { + Button("Dismiss") { focusedField = nil } .font(.subheadline)