From d568627ce8f2ef978d83d91ac65ccca3e7cf5389 Mon Sep 17 00:00:00 2001 From: Garth Vander Houwen Date: Sun, 27 Apr 2025 12:50:45 -0700 Subject: [PATCH] Additional translation key cleanup --- Localizable.xcstrings | 104 +----------------- Meshtastic/Enums/SerialConfigEnums.swift | 2 +- Meshtastic/Extensions/OSLogEntryLog.swift | 2 +- Meshtastic/Helpers/BLEManager.swift | 2 +- .../Nodes/Helpers/Map/WaypointForm.swift | 2 +- .../Views/Nodes/Helpers/NodeDetail.swift | 2 +- 6 files changed, 11 insertions(+), 103 deletions(-) diff --git a/Localizable.xcstrings b/Localizable.xcstrings index fd37255a..f405f17f 100644 --- a/Localizable.xcstrings +++ b/Localizable.xcstrings @@ -5534,7 +5534,7 @@ }, "zh-Hant-TW" : { "stringUnit" : { - "state" : "needs_review", + "state" : "translated", "value" : "關閉" } } @@ -7872,7 +7872,7 @@ } } }, - "default" : { + "Default" : { "localizations" : { "de" : { "stringUnit" : { @@ -7936,34 +7936,6 @@ } } }, - "Default" : { - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Standard" - } - }, - "it" : { - "stringUnit" : { - "state" : "translated", - "value" : "Predefinito" - } - }, - "sr" : { - "stringUnit" : { - "state" : "translated", - "value" : "Подразумевано" - } - }, - "zh-Hant-TW" : { - "stringUnit" : { - "state" : "translated", - "value" : "預設" - } - } - } - }, "default.128x64.screen.layout" : { "localizations" : { "en" : { @@ -10874,70 +10846,6 @@ } } }, - "distance" : { - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Entfernung" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Distance" - } - }, - "fr" : { - "stringUnit" : { - "state" : "translated", - "value" : "Distance" - } - }, - "he" : { - "stringUnit" : { - "state" : "translated", - "value" : "מרחק" - } - }, - "it" : { - "stringUnit" : { - "state" : "translated", - "value" : "Distanza" - } - }, - "pl" : { - "stringUnit" : { - "state" : "translated", - "value" : "Odległość" - } - }, - "se" : { - "stringUnit" : { - "state" : "translated", - "value" : "Distans" - } - }, - "sr" : { - "stringUnit" : { - "state" : "translated", - "value" : "Раздаљина" - } - }, - "zh-Hans" : { - "stringUnit" : { - "state" : "translated", - "value" : "距离" - } - }, - "zh-Hant-TW" : { - "stringUnit" : { - "state" : "translated", - "value" : "距離" - } - } - } - }, "Distance" : { "localizations" : { "de" : { @@ -11640,7 +11548,7 @@ }, "zh-Hant-TW" : { "stringUnit" : { - "state" : "needs_review", + "state" : "translated", "value" : "已加密" } } @@ -15474,7 +15382,7 @@ }, "zh-Hant-TW" : { "stringUnit" : { - "state" : "needs_review", + "state" : "translated", "value" : "包含" } } @@ -15560,7 +15468,7 @@ }, "zh-Hant-TW" : { "stringUnit" : { - "state" : "needs_review", + "state" : "translated", "value" : "印度" } } @@ -18112,7 +18020,7 @@ }, "zh-Hant-TW" : { "stringUnit" : { - "state" : "needs_review", + "state" : "translated", "value" : "韓國" } } diff --git a/Meshtastic/Enums/SerialConfigEnums.swift b/Meshtastic/Enums/SerialConfigEnums.swift index ff937207..5799dbfb 100644 --- a/Meshtastic/Enums/SerialConfigEnums.swift +++ b/Meshtastic/Enums/SerialConfigEnums.swift @@ -31,7 +31,7 @@ enum SerialBaudRates: Int, CaseIterable, Identifiable { switch self { case .baudDefault: - return "default".localized + return "Default".localized case .baud110: return "110 Baud" case .baud300: diff --git a/Meshtastic/Extensions/OSLogEntryLog.swift b/Meshtastic/Extensions/OSLogEntryLog.swift index fe2dc2cf..c60c7aca 100644 --- a/Meshtastic/Extensions/OSLogEntryLog.swift +++ b/Meshtastic/Extensions/OSLogEntryLog.swift @@ -18,7 +18,7 @@ extension OSLogEntryLog.Level { case .notice: "⚠️ Notice" case .error: "🚨 Error" case .fault: "💥 Fault" - @unknown default: "default" + @unknown default: "Default".localized } } var color: Color { diff --git a/Meshtastic/Helpers/BLEManager.swift b/Meshtastic/Helpers/BLEManager.swift index 9f633f30..b9f2a7d8 100644 --- a/Meshtastic/Helpers/BLEManager.swift +++ b/Meshtastic/Helpers/BLEManager.swift @@ -3448,7 +3448,7 @@ extension BLEManager: CBCentralManagerDelegate { case .unsupported: status = "BLE is unsupported" default: - status = "default" + status = "Default".localized } Logger.services.info("📜 [BLE] Bluetooth status: \(status, privacy: .public)") } diff --git a/Meshtastic/Views/Nodes/Helpers/Map/WaypointForm.swift b/Meshtastic/Views/Nodes/Helpers/Map/WaypointForm.swift index 8800cabf..736c2114 100644 --- a/Meshtastic/Views/Nodes/Helpers/Map/WaypointForm.swift +++ b/Meshtastic/Views/Nodes/Helpers/Map/WaypointForm.swift @@ -338,7 +338,7 @@ struct WaypointForm: View { if LocationsHandler.currentLocation.distance(from: LocationsHandler.DefaultLocation) > 0.0 { let metersAway = waypoint.coordinate.distance(from: LocationsHandler.currentLocation) Label { - Text("distance".localized + ": \(distanceFormatter.string(fromDistance: Double(metersAway)))") + Text("Distance".localized + ": \(distanceFormatter.string(fromDistance: Double(metersAway)))") .foregroundColor(.primary) } icon: { Image(systemName: "lines.measurement.horizontal") diff --git a/Meshtastic/Views/Nodes/Helpers/NodeDetail.swift b/Meshtastic/Views/Nodes/Helpers/NodeDetail.swift index 7f834de9..bd2abae8 100644 --- a/Meshtastic/Views/Nodes/Helpers/NodeDetail.swift +++ b/Meshtastic/Views/Nodes/Helpers/NodeDetail.swift @@ -214,7 +214,7 @@ struct NodeDetail: View { // to use with WeatherKit, or has actual data in the most recent EnvironmentMetrics entity // that will be rendered in this section. if node.hasPositions && UserDefaults.environmentEnableWeatherKit - || node.hasDataForLatestEnvironmentMetrics(attributes: ["iaq", "temperature", "relativeHumidity", "barometricPressure", "windSpeed", "radiation", "weight", "distance", "soilTemperature", "soilMoisture"]) { + || node.hasDataForLatestEnvironmentMetrics(attributes: ["iaq", "temperature", "relativeHumidity", "barometricPressure", "windSpeed", "radiation", "weight", "Distance", "soilTemperature", "soilMoisture"]) { Section("Environment") { if !node.hasEnvironmentMetrics { LocalWeatherConditions(location: node.latestPosition?.nodeLocation)