diff --git a/Localizable.xcstrings b/Localizable.xcstrings index ec0109ca..ca7d895e 100644 --- a/Localizable.xcstrings +++ b/Localizable.xcstrings @@ -91,6 +91,12 @@ "state" : "new", "value" : "%1$@ - %2$@" } + }, + "sr" : { + "stringUnit" : { + "state" : "translated", + "value" : "%1$@ - %2$@" + } } } }, @@ -121,7 +127,7 @@ "sr" : { "stringUnit" : { "state" : "translated", - "value" : "%1$@ - %2$d Одлазних скокова %3$d Долазних скокова" + "value" : "%1$@ - %2$@ Одлазних скокова %3$@ Долазних скокова" } } } @@ -387,6 +393,36 @@ } } } + }, + "sr" : { + "variations" : { + "plural" : { + "few" : { + "stringUnit" : { + "state" : "translated", + "value" : "%d скокова" + } + }, + "one" : { + "stringUnit" : { + "state" : "translated", + "value" : "%d скок" + } + }, + "other" : { + "stringUnit" : { + "state" : "translated", + "value" : "%d скокова" + } + }, + "zero" : { + "stringUnit" : { + "state" : "translated", + "value" : "Директно" + } + } + } + } } } }, @@ -2578,6 +2614,23 @@ } } }, + "ble.errorcode.6" : { + "extractionState" : "manual", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "The connection has timed out unexpectedly." + } + }, + "sr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Веза је неочекивано истекла." + } + } + } + }, "ble.errorcode.6 %@" : { "extractionState" : "migrated", "localizations" : { @@ -2643,6 +2696,23 @@ } } }, + "ble.errorcode.14" : { + "extractionState" : "manual", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Peer removed pairing information." + } + }, + "sr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Радио уређај је уклонио информације о упаривању." + } + } + } + }, "ble.errorcode.14 %@" : { "extractionState" : "migrated", "localizations" : { @@ -6864,7 +6934,14 @@ } }, "Currently the recommended way to update ESP32 devices is using the web flasher on a desktop computer from a chrome based browser. It does not work on mobile devices or over BLE." : { - + "localizations" : { + "sr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Тренутно препоручени начин за ажурирање ЕСП32 уређаја је коришћење веб флешера на десктоп рачунару из прегледача заснованог на хрому. Не ради на мобилним уређајима или преко BLE-а." + } + } + } }, "Date" : { "localizations" : { @@ -6993,6 +7070,23 @@ } } }, + "default.128x64.screen.layout" : { + "extractionState" : "manual", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Default 128x64 screen layout" + } + }, + "sr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Подразумевани изглед екрана 128x64" + } + } + } + }, "delete" : { "localizations" : { "de" : { @@ -8003,6 +8097,193 @@ } } }, + "device.role.name.client" : { + "extractionState" : "manual", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Client" + } + }, + "sr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Клијент" + } + } + } + }, + "device.role.name.clientHidden" : { + "extractionState" : "manual", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Client Hidden" + } + }, + "sr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Скривени клијент" + } + } + } + }, + "device.role.name.clientMute" : { + "extractionState" : "manual", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Client Mute" + } + }, + "sr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Клијент мутиран" + } + } + } + }, + "device.role.name.lostAndFound" : { + "extractionState" : "manual", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Lost and Found" + } + }, + "sr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Изгубљено и нађено" + } + } + } + }, + "device.role.name.repeater" : { + "extractionState" : "manual", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Repeater" + } + }, + "sr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Поновљач" + } + } + } + }, + "device.role.name.router" : { + "extractionState" : "manual", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Router" + } + }, + "sr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Рутер" + } + } + } + }, + "device.role.name.routerClient" : { + "extractionState" : "manual", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Router & Client" + } + }, + "sr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Рутер и клијент" + } + } + } + }, + "device.role.name.sensor" : { + "extractionState" : "manual", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Sensor" + } + }, + "sr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Сензор" + } + } + } + }, + "device.role.name.tak" : { + "extractionState" : "manual", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "TAK" + } + }, + "sr" : { + "stringUnit" : { + "state" : "translated", + "value" : "TAK" + } + } + } + }, + "device.role.name.takTracker" : { + "extractionState" : "manual", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "TAK Tracker" + } + }, + "sr" : { + "stringUnit" : { + "state" : "translated", + "value" : "ТАК Трекер" + } + } + } + }, + "device.role.name.tracker" : { + "extractionState" : "manual", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Tracker" + } + }, + "sr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Трекер" + } + } + } + }, "device.role.repeater" : { "extractionState" : "migrated", "localizations" : { @@ -10300,7 +10581,7 @@ "sr" : { "stringUnit" : { "state" : "translated", - "value" : "Превладавање фреквенције" + "value" : "Измена фреквенције" } } } @@ -11245,7 +11526,7 @@ "sr" : { "stringUnit" : { "state" : "translated", - "value" : "Наслов" + "value" : "Смер" } } } @@ -11255,7 +11536,7 @@ "sr" : { "stringUnit" : { "state" : "translated", - "value" : "Наслов: %@" + "value" : "Смер: %@" } } } @@ -11405,7 +11686,7 @@ "sr" : { "stringUnit" : { "state" : "translated", - "value" : "Закриј алертове" + "value" : "Сакриј упозорења" } } } @@ -14481,20 +14762,19 @@ } } }, - "interval.tyeight.hours" : { - "comment" : "What should this even represent?", + "inverted.top.bar.for.2.color.display" : { "extractionState" : "manual", "localizations" : { - "zh-Hans" : { + "en" : { "stringUnit" : { "state" : "translated", - "value" : "四十八小时小时" + "value" : "Inverted top bar for 2 Color display" } }, - "zh-Hant-TW" : { + "sr" : { "stringUnit" : { "state" : "translated", - "value" : "四十八小时小時" + "value" : "Обрнута горња трака за екран у 2 боје" } } } @@ -15406,6 +15686,74 @@ } } }, + "lora.signal.strength.bad" : { + "extractionState" : "manual", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Bad" + } + }, + "sr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Лош" + } + } + } + }, + "lora.signal.strength.fair" : { + "extractionState" : "manual", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Fair" + } + }, + "sr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Прихватљив" + } + } + } + }, + "lora.signal.strength.good" : { + "extractionState" : "manual", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Good" + } + }, + "sr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Добар" + } + } + } + }, + "lora.signal.strength.none" : { + "extractionState" : "manual", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "None" + } + }, + "sr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Без" + } + } + } + }, "LOW" : { "localizations" : { "sr" : { @@ -15473,7 +15821,7 @@ "sr" : { "stringUnit" : { "state" : "translated", - "value" : "Мапа меш мреже" + "value" : "Мапа меша" } }, "zh-Hans" : { @@ -19877,6 +20225,28 @@ } } }, + "New Node" : { + "extractionState" : "manual", + "localizations" : { + "sr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Нови чвор" + } + } + } + }, + "New Node has been discovered" : { + "extractionState" : "manual", + "localizations" : { + "sr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Откривен је нови чвор" + } + } + } + }, "Newer firmware is available" : { "localizations" : { "de" : { @@ -20834,6 +21204,23 @@ } } }, + "optimized.for.2.color.displays" : { + "extractionState" : "manual", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Optimized for 2 color displays" + } + }, + "sr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Оптимизовано за двобојне дисплеје" + } + } + } + }, "Optional fields to include when assembling position messages. the more fields are included, the larger the message will be - leading to longer airtime and a higher risk of packet loss" : { "localizations" : { "sr" : { @@ -22053,6 +22440,17 @@ } } }, + "Radio Disconnected" : { + "extractionState" : "manual", + "localizations" : { + "sr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Радио веза је прекинута" + } + } + } + }, "radio.configuration" : { "localizations" : { "de" : { @@ -22521,7 +22919,7 @@ "sr" : { "stringUnit" : { "state" : "translated", - "value" : "Примљен Ack" + "value" : "Примљен ACK" } }, "zh-Hans" : { @@ -22585,7 +22983,7 @@ "sr" : { "stringUnit" : { "state" : "translated", - "value" : "Прималац Ack" + "value" : "Прималац ACK" } }, "zh-Hans" : { @@ -23910,7 +24308,7 @@ "sr" : { "stringUnit" : { "state" : "translated", - "value" : "Признато" + "value" : "Потврђено" } }, "zh-Hans" : { @@ -24723,7 +25121,7 @@ "sr" : { "stringUnit" : { "state" : "translated", - "value" : "Појачано појачање пријемника" + "value" : "Појачање пријемника" } } } @@ -25680,7 +26078,7 @@ "sr" : { "stringUnit" : { "state" : "translated", - "value" : "Серијска" + "value" : "Серијска веза" } }, "zh-Hans" : { @@ -25764,7 +26162,7 @@ "sr" : { "stringUnit" : { "state" : "translated", - "value" : "Серијска конфигурација" + "value" : "Подешавања серијске везе" } }, "zh-Hans" : { @@ -26227,7 +26625,7 @@ "sr" : { "stringUnit" : { "state" : "translated", - "value" : "Подешава максималан број скокова, подразумевано је 3. Повећање броја скокова такође повећава загушење и треба га користити опрезно. Поруке емитоване са 0 скокова неће добити потврде пријема (ACK)." + "value" : "Подешава максималан број скокова. Подразумевано је 3, а повећање броја одобрених скокова такође повећава загушење и треба га користити опрезно. Поруке емитоване са 0 скокова неће добити потврде пријема (ACK)." } } } @@ -27758,7 +28156,7 @@ "sr" : { "stringUnit" : { "state" : "translated", - "value" : "Палац горе" + "value" : "Палац доле" } }, "zh-Hans" : { @@ -27888,7 +28286,7 @@ "sr" : { "stringUnit" : { "state" : "translated", - "value" : "Талас" + "value" : "Махање" } }, "zh-Hans" : { @@ -27905,6 +28303,57 @@ } } }, + "telementry.hazardous" : { + "extractionState" : "manual", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Hazardous" + } + }, + "sr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Опасно" + } + } + } + }, + "telementry.unhealthy" : { + "extractionState" : "manual", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Unhealthy" + } + }, + "sr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Нездраво" + } + } + } + }, + "telementry.veryUnhealthy" : { + "extractionState" : "manual", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Very Unhealthy" + } + }, + "sr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Веома нездраво" + } + } + } + }, "telemetry" : { "localizations" : { "de" : { @@ -28033,6 +28482,57 @@ } } }, + "telemetry.good" : { + "extractionState" : "manual", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Good" + } + }, + "sr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Добро" + } + } + } + }, + "telemetry.moderate" : { + "extractionState" : "manual", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Moderate" + } + }, + "sr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Умерено" + } + } + } + }, + "telemetry.sensitive" : { + "extractionState" : "manual", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Unhealthy for Sensitive Groups" + } + }, + "sr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Нездраво за осетљиве групе" + } + } + } + }, "Temp" : { "localizations" : { "de" : { @@ -28091,6 +28591,23 @@ } } }, + "tft.full.color.displays" : { + "extractionState" : "manual", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "TFT Full Color Displays" + } + }, + "sr" : { + "stringUnit" : { + "state" : "translated", + "value" : "TFT екрани у пуној боји" + } + } + } + }, "The amount of time to wait before we consider your packet as done." : { "localizations" : { "sr" : { @@ -28247,6 +28764,17 @@ } } }, + "The specified device has disconnected from us" : { + "extractionState" : "manual", + "localizations" : { + "sr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Наведени уређај је прекинуо везу са нама" + } + } + } + }, "The state of the LED (on/off)" : { "localizations" : { "sr" : { @@ -28564,7 +29092,7 @@ "sr" : { "stringUnit" : { "state" : "translated", - "value" : "Време и формат" + "value" : "Временска ознака" } }, "zh-Hans" : { @@ -28582,7 +29110,14 @@ } }, "Timing & Format" : { - + "localizations" : { + "sr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Време и формат" + } + } + } }, "tip.bluetooth.connect.message" : { "localizations" : { @@ -29234,6 +29769,17 @@ } } }, + "Topic: %@" : { + "extractionState" : "manual", + "localizations" : { + "sr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Тема: %@" + } + } + } + }, "Total" : { "localizations" : { "de" : { @@ -30067,6 +30613,17 @@ } } }, + "User Initiated Disconnect" : { + "extractionState" : "manual", + "localizations" : { + "sr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Корисник је покренуо прекид везе" + } + } + } + }, "user.details" : { "extractionState" : "manual", "localizations" : { diff --git a/Meshtastic/Enums/DeviceEnums.swift b/Meshtastic/Enums/DeviceEnums.swift index 5c980da0..2128fafa 100644 --- a/Meshtastic/Enums/DeviceEnums.swift +++ b/Meshtastic/Enums/DeviceEnums.swift @@ -27,27 +27,27 @@ enum DeviceRoles: Int, CaseIterable, Identifiable { var name: String { switch self { case .client: - return "Client" + return "device.role.name.client".localized case .clientMute: - return "Client Mute" + return "device.role.name.clientMute".localized case .router: - return "Router" + return "device.role.name.router".localized case .routerClient: - return "Router & Client" + return "device.role.name.routerClient".localized case .repeater: - return "Repeater" + return "device.role.name.repeater".localized case .tracker: - return "Tracker" + return "device.role.name.tracker".localized case .sensor: - return "Sensor" + return "device.role.name.sensor".localized case .tak: - return "TAK" + return "device.role.name.tak".localized case .takTracker: - return "TAK Tracker" + return "device.role.name.takTracker".localized case .clientHidden: - return "Client Hidden" + return "device.role.name.clientHidden".localized case .lostAndFound: - return "Lost and Found" + return "device.role.name.lostAndFound".localized } } diff --git a/Meshtastic/Enums/DisplayEnums.swift b/Meshtastic/Enums/DisplayEnums.swift index a540a9d2..8959668a 100644 --- a/Meshtastic/Enums/DisplayEnums.swift +++ b/Meshtastic/Enums/DisplayEnums.swift @@ -149,13 +149,13 @@ enum DisplayModes: Int, CaseIterable, Identifiable { var description: String { switch self { case .defaultMode: - return "Default 128x64 screen layout" + return "default.128x64.screen.layout".localized case .twoColor: - return "Optimized for 2 color displays" + return "optimized.for.2.color.displays".localized case .inverted: - return "Inverted top bar for 2 Color display" + return "inverted.top.bar.for.2.color.display".localized case .color: - return "TFT Full Color Displays" + return "tft.full.color.displays".localized } } func protoEnumValue() -> Config.DisplayConfig.DisplayMode { diff --git a/Meshtastic/Enums/TelemetryEnums.swift b/Meshtastic/Enums/TelemetryEnums.swift index 213d6963..68d65961 100644 --- a/Meshtastic/Enums/TelemetryEnums.swift +++ b/Meshtastic/Enums/TelemetryEnums.swift @@ -20,17 +20,17 @@ enum Aqi: Int, CaseIterable, Identifiable { var description: String { switch self { case .good: - return "Good" + return "telemetry.good".localized case .moderate: - return "Moderate" + return "telemetry.moderate".localized case .sensitive: - return "Unhealthy for Sensitive Groups" + return "telemetry.sensitive".localized case .unhealthy: - return "Unhealthy" + return "telementry.unhealthy".localized case .veryUnhealthy: - return "Very Unhealthy" + return "telementry.veryUnhealthy".localized case .hazardous: - return "Hazardous" + return "telementry.hazardous".localized } } var color: Color { diff --git a/Meshtastic/Helpers/BLEManager.swift b/Meshtastic/Helpers/BLEManager.swift index bbdbd329..5484f74a 100644 --- a/Meshtastic/Helpers/BLEManager.swift +++ b/Meshtastic/Helpers/BLEManager.swift @@ -242,14 +242,14 @@ class BLEManager: NSObject, CBPeripheralDelegate, MqttClientProxyManagerDelegate if errorCode == 6 { // CBError.Code.connectionTimeout The connection has timed out unexpectedly. // Happens when device is manually reset / powered off lastConnectionError = "🚨" + String.localizedStringWithFormat("ble.errorcode.6 %@".localized, e.localizedDescription) - Logger.services.error("🚨 [BLE] Disconnected: \(peripheral.name ?? "Unknown", privacy: .public) Error Code: \(errorCode, privacy: .public) Error: \(e.localizedDescription, privacy: .public)") + Logger.services.error("🚨 [BLE] Disconnected: \(peripheral.name ?? "Unknown".localized, privacy: .public) Error Code: \(errorCode, privacy: .public) Error: \(e.localizedDescription, privacy: .public)") } else if errorCode == 7 { // CBError.Code.peripheralDisconnected The specified device has disconnected from us. // Seems to be what is received when a tbeam sleeps, immediately recconnecting does not work. if UserDefaults.preferredPeripheralId == peripheral.identifier.uuidString { manager.notifications = [ Notification( id: (peripheral.identifier.uuidString), - title: "Radio Disconnected", + title: "Radio Disconnected".localized, subtitle: "\(peripheral.name ?? "unknown".localized)", content: e.localizedDescription, target: "bluetooth", @@ -258,18 +258,18 @@ class BLEManager: NSObject, CBPeripheralDelegate, MqttClientProxyManagerDelegate ] manager.schedule() } - lastConnectionError = "🚨 \(e.localizedDescription)" - Logger.services.error("🚨 [BLE] Disconnected: \(peripheral.name ?? "Unknown", privacy: .public) Error Code: \(errorCode, privacy: .public) Error: \(e.localizedDescription, privacy: .public)") + lastConnectionError = "🚨 \("The specified device has disconnected from us".localized)" + Logger.services.error("🚨 [BLE] Disconnected: \(peripheral.name ?? "Unknown".localized, privacy: .public) Error Code: \(errorCode, privacy: .public) Error: \(e.localizedDescription, privacy: .public)") } else if errorCode == 14 { // Peer removed pairing information // Forgetting and reconnecting seems to be necessary so we need to show the user an error telling them to do that lastConnectionError = "🚨 " + String.localizedStringWithFormat("ble.errorcode.14 %@".localized, e.localizedDescription) - Logger.services.error("🚨 [BLE] Disconnected: \(peripheral.name ?? "Unknown") Error Code: \(errorCode, privacy: .public) Error: \(self.lastConnectionError, privacy: .public)") + Logger.services.error("🚨 [BLE] Disconnected: \(peripheral.name ?? "Unknown".localized) Error Code: \(errorCode, privacy: .public) Error: \(self.lastConnectionError, privacy: .public)") } else { if UserDefaults.preferredPeripheralId == peripheral.identifier.uuidString { manager.notifications = [ Notification( id: (peripheral.identifier.uuidString), - title: "Radio Disconnected", + title: "Radio Disconnected".localized, subtitle: "\(peripheral.name ?? "unknown".localized)", content: e.localizedDescription, target: "bluetooth", @@ -279,12 +279,12 @@ class BLEManager: NSObject, CBPeripheralDelegate, MqttClientProxyManagerDelegate manager.schedule() } lastConnectionError = "🚨 \(e.localizedDescription)" - Logger.services.error("🚨 [BLE] Disconnected: \(peripheral.name ?? "Unknown", privacy: .public) Error Code: \(errorCode, privacy: .public) Error: \(e.localizedDescription, privacy: .public)") + Logger.services.error("🚨 [BLE] Disconnected: \(peripheral.name ?? "Unknown".localized, privacy: .public) Error Code: \(errorCode, privacy: .public) Error: \(e.localizedDescription, privacy: .public)") } } else { // Disconnected without error which indicates user intent to disconnect // Happens when swiping to disconnect - Logger.services.info("ℹ️ [BLE] Disconnected: \(peripheral.name ?? "Unknown", privacy: .public): User Initiated Disconnect") + Logger.services.info("ℹ️ [BLE] Disconnected: \(peripheral.name ?? "Unknown".localized, privacy: .public): \(String(describing: "User Initiated Disconnect".localized))") } // Start a scan so the disconnected peripheral is moved to the peripherals[] if it is awake self.startScanning() @@ -663,15 +663,15 @@ class BLEManager: NSObject, CBPeripheralDelegate, MqttClientProxyManagerDelegate } switch decodedInfo.packet.decoded.portnum { - + // Handle Any local only packets we get over BLE case .unknownApp: var nowKnown = false - + // MyInfo from initial connection if decodedInfo.myInfo.isInitialized && decodedInfo.myInfo.myNodeNum > 0 { let myInfo = myInfoPacket(myInfo: decodedInfo.myInfo, peripheralId: self.connectedPeripheral.id, context: context) - + if myInfo != nil { UserDefaults.preferredPeripheralNum = Int(myInfo?.myNodeNum ?? 0) connectedPeripheral.num = myInfo?.myNodeNum ?? 0 @@ -890,7 +890,7 @@ class BLEManager: NSObject, CBPeripheralDelegate, MqttClientProxyManagerDelegate } } hopNodes.append(traceRouteHop) - + let hopName = hopNode?.user?.longName ?? (node == 4294967295 ? "Repeater" : String(hopNode?.num.toHex() ?? "unknown".localized)) let mqttLabel = hopNode?.viaMqtt ?? false ? "MQTT " : "" let snrLabel = (traceRouteHop.snr != -32) ? String(traceRouteHop.snr) : "unknown ".localized @@ -912,7 +912,7 @@ class BLEManager: NSObject, CBPeripheralDelegate, MqttClientProxyManagerDelegate /// Add the destination node to the end of the route towards string and the beginning of the route back string routeString += "\(traceRoute?.node?.user?.longName ?? "unknown".localized) \((traceRoute?.node?.num ?? 0).toHex()) (\(destinationHop.snr != -32 ? String(destinationHop.snr) : "unknown ".localized)dB)" traceRoute?.routeText = routeString - + traceRoute?.hopsBack = Int32(routingMessage.routeBack.count) // Only if hopStart is set and there is an SNR entry if decodedInfo.packet.hopStart > 0 && routingMessage.snrBack.count > 0 { @@ -946,7 +946,7 @@ class BLEManager: NSObject, CBPeripheralDelegate, MqttClientProxyManagerDelegate } } hopNodes.append(traceRouteHop) - + let hopName = hopNode?.user?.longName ?? (node == 4294967295 ? "Repeater" : String(hopNode?.num.toHex() ?? "unknown".localized)) let mqttLabel = hopNode?.viaMqtt ?? false ? "MQTT " : "" let snrLabel = (traceRouteHop.snr != -32) ? String(traceRouteHop.snr) : "unknown ".localized @@ -1954,7 +1954,7 @@ class BLEManager: NSObject, CBPeripheralDelegate, MqttClientProxyManagerDelegate } return false } - + public func saveLicensedUser(ham: HamParameters, fromUser: UserEntity, toUser: UserEntity, adminIndex: Int32) -> Int64 { var adminPacket = AdminMessage() adminPacket.setHamMode = ham diff --git a/Meshtastic/Persistence/UpdateCoreData.swift b/Meshtastic/Persistence/UpdateCoreData.swift index b824f777..edc21605 100644 --- a/Meshtastic/Persistence/UpdateCoreData.swift +++ b/Meshtastic/Persistence/UpdateCoreData.swift @@ -199,9 +199,9 @@ func upsertNodeInfoPacket (packet: MeshPacket, context: NSManagedObjectContext) manager.notifications = [ Notification( id: (UUID().uuidString), - title: "New Node", + title: "New Node".localized, subtitle: "\(newUser.longName ?? "unknown".localized)", - content: "New Node has been discovered", + content: "New Node has been discovered".localized, target: "nodes", path: "meshtastic:///nodes?nodenum=\(newUser.num)" ) diff --git a/Meshtastic/Views/Helpers/LoRaSignalStrengthIndicator.swift b/Meshtastic/Views/Helpers/LoRaSignalStrengthIndicator.swift index 03735ae2..688dcc24 100644 --- a/Meshtastic/Views/Helpers/LoRaSignalStrengthIndicator.swift +++ b/Meshtastic/Views/Helpers/LoRaSignalStrengthIndicator.swift @@ -47,13 +47,13 @@ enum LoRaSignalStrength: Int { var description: String { switch self { case .none: - return "None" + return "lora.signal.strength.none".localized case .bad: - return "Bad" + return "lora.signal.strength.bad".localized case .fair: - return "Fair" + return "lora.signal.strength.fair".localized case .good: - return "Good" + return "lora.signal.strength.good".localized } } } diff --git a/Meshtastic/Views/Helpers/MQTTIcon.swift b/Meshtastic/Views/Helpers/MQTTIcon.swift index 79821dd1..914c6043 100644 --- a/Meshtastic/Views/Helpers/MQTTIcon.swift +++ b/Meshtastic/Views/Helpers/MQTTIcon.swift @@ -27,7 +27,7 @@ struct MQTTIcon: View { .symbolRenderingMode(.hierarchical) }.popover(isPresented: self.$isPopoverOpen, arrowEdge: .bottom, content: { VStack(spacing: 0.5) { - Text("Topic: " + topic) + Text("Topic: \(topic)".localized) .padding(20) Button("close", action: { self.isPopoverOpen = false }).padding([.bottom], 20) }