mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Additional localization key fixes
This commit is contained in:
parent
9bed5e34df
commit
9ecf7f7fbf
18 changed files with 1496 additions and 1941 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -80,9 +80,9 @@ enum UserTrackingModes: Int, CaseIterable, Identifiable {
|
|||
case .none:
|
||||
return "None".localized
|
||||
case .follow:
|
||||
return "map.usertrackingmode.follow".localized
|
||||
return "Follow".localized
|
||||
case .followWithHeading:
|
||||
return "map.usertrackingmode.followwithheading".localized
|
||||
return "Follow with heading".localized
|
||||
}
|
||||
}
|
||||
var icon: String {
|
||||
|
|
|
|||
|
|
@ -105,27 +105,27 @@ enum RegionCodes: Int, CaseIterable, Identifiable {
|
|||
case .in:
|
||||
return "India".localized
|
||||
case .nz865:
|
||||
return "New Zealand 865mhz".localized
|
||||
return "New Zealand 865MHz".localized
|
||||
case .th:
|
||||
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.4 Ghz".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 {
|
||||
|
|
@ -280,7 +280,6 @@ enum ModemPresets: Int, CaseIterable, Identifiable {
|
|||
case longFast = 0
|
||||
case longSlow = 1
|
||||
case longModerate = 7
|
||||
case vLongSlow = 2
|
||||
case medSlow = 3
|
||||
case medFast = 4
|
||||
case shortSlow = 5
|
||||
|
|
@ -295,19 +294,17 @@ enum ModemPresets: Int, CaseIterable, Identifiable {
|
|||
case .longSlow:
|
||||
return "Long Range - Slow".localized
|
||||
case .longModerate:
|
||||
return "long.range.moderate".localized
|
||||
case .vLongSlow:
|
||||
return "very.long.range.slow".localized
|
||||
return "Long Range - Moderate".localized
|
||||
case .medSlow:
|
||||
return "medium.range.slow".localized
|
||||
return "Medium Range - Slow".localized
|
||||
case .medFast:
|
||||
return "medium.range.fast".localized
|
||||
return "Medium Range - Fast".localized
|
||||
case .shortSlow:
|
||||
return "short.range.slow".localized
|
||||
return "Short Range - Slow".localized
|
||||
case .shortFast:
|
||||
return "short.range.fast".localized
|
||||
return "Short Range - Fast".localized
|
||||
case .shortTurbo:
|
||||
return "short.range.turbo".localized
|
||||
return "Short Range - Turbo".localized
|
||||
}
|
||||
}
|
||||
var name: String {
|
||||
|
|
@ -318,8 +315,6 @@ enum ModemPresets: Int, CaseIterable, Identifiable {
|
|||
return "LongSlow"
|
||||
case .longModerate:
|
||||
return "LongModerate"
|
||||
case .vLongSlow:
|
||||
return "VLongFast"
|
||||
case .medSlow:
|
||||
return "MediumSlow"
|
||||
case .medFast:
|
||||
|
|
@ -340,8 +335,6 @@ enum ModemPresets: Int, CaseIterable, Identifiable {
|
|||
return -7.5
|
||||
case .longModerate:
|
||||
return -17.5
|
||||
case .vLongSlow:
|
||||
return -20
|
||||
case .medSlow:
|
||||
return -15
|
||||
case .medFast:
|
||||
|
|
@ -362,8 +355,6 @@ enum ModemPresets: Int, CaseIterable, Identifiable {
|
|||
return Config.LoRaConfig.ModemPreset.longSlow
|
||||
case .longModerate:
|
||||
return Config.LoRaConfig.ModemPreset.longModerate
|
||||
case .vLongSlow:
|
||||
return Config.LoRaConfig.ModemPreset.veryLongSlow
|
||||
case .medSlow:
|
||||
return Config.LoRaConfig.ModemPreset.mediumSlow
|
||||
case .medFast:
|
||||
|
|
|
|||
|
|
@ -21,17 +21,17 @@ enum GpsFormats: Int, CaseIterable, Identifiable {
|
|||
var description: String {
|
||||
switch self {
|
||||
case .gpsFormatDec:
|
||||
return "gpsformat.dec".localized
|
||||
return "Decimal Degrees Format".localized
|
||||
case .gpsFormatDms:
|
||||
return "gpsformat.dms".localized
|
||||
return "Degrees Minutes Seconds".localized
|
||||
case .gpsFormatUtm:
|
||||
return "gpsformat.utm".localized
|
||||
return "Universal Transverse Mercator".localized
|
||||
case .gpsFormatMgrs:
|
||||
return "gpsformat.mgrs".localized
|
||||
return "Military Grid Reference System".localized
|
||||
case .gpsFormatOlc:
|
||||
return "gpsformat.olc".localized
|
||||
return "Open Location Code (aka Plus Codes)".localized
|
||||
case .gpsFormatOsgr:
|
||||
return "gpsformat.osgr".localized
|
||||
return "Ordnance Survey Grid Reference".localized
|
||||
}
|
||||
}
|
||||
func protoEnumValue() -> Config.DisplayConfig.GpsCoordinateFormat {
|
||||
|
|
|
|||
|
|
@ -20,34 +20,34 @@ enum ActivityType: Int, CaseIterable, Identifiable {
|
|||
var description: String {
|
||||
switch self {
|
||||
case .walking:
|
||||
return "routes.activitytype.walking".localized
|
||||
return "Walking".localized
|
||||
case .hiking:
|
||||
return "routes.activitytype.hiking".localized
|
||||
return "Hiking".localized
|
||||
case .biking:
|
||||
return "routes.activitytype.biking".localized
|
||||
return "Biking".localized
|
||||
case .driving:
|
||||
return "routes.activitytype.driving".localized
|
||||
return "Driving".localized
|
||||
case .overlanding:
|
||||
return "routes.activitytype.overlanding".localized
|
||||
return "Overlanding".localized
|
||||
case .skiing:
|
||||
return "routes.activitytype.skiing".localized
|
||||
return "Skiing".localized
|
||||
}
|
||||
}
|
||||
|
||||
var fileNameString: String {
|
||||
switch self {
|
||||
case .walking:
|
||||
return "routes.activitytype.filename.walking".localized
|
||||
return "walk".localized
|
||||
case .hiking:
|
||||
return "routes.activitytype.filename.hiking".localized
|
||||
return "hiking".localized
|
||||
case .biking:
|
||||
return "routes.activitytype.filename.biking".localized
|
||||
return "biking".localized
|
||||
case .driving:
|
||||
return "routes.activitytype.filename.driving".localized
|
||||
return "driving".localized
|
||||
case .overlanding:
|
||||
return "routes.activitytype.filename.overlanding".localized
|
||||
return "overlanding".localized
|
||||
case .skiing:
|
||||
return "routes.activitytype.filename.skiing".localized
|
||||
return "skiing".localized
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -739,7 +739,7 @@ class BLEManager: NSObject, CBPeripheralDelegate, MqttClientProxyManagerDelegate
|
|||
let supportedVersion = connectedVersion == "0.0.0" || self.minimumVersion.compare(connectedVersion, options: .numeric) == .orderedAscending || minimumVersion.compare(connectedVersion, options: .numeric) == .orderedSame
|
||||
if !supportedVersion {
|
||||
invalidVersion = true
|
||||
lastConnectionError = "🚨" + "update.firmware".localized
|
||||
lastConnectionError = "🚨" + "Update Your Firmware".localized
|
||||
return
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -863,7 +863,7 @@ func upsertSecurityConfigPacket(config: Config.SecurityConfig, nodeNum: Int64, s
|
|||
|
||||
func upsertAmbientLightingModuleConfigPacket(config: ModuleConfig.AmbientLightingConfig, nodeNum: Int64, sessionPasskey: Data? = Data(), context: NSManagedObjectContext) {
|
||||
|
||||
let logString = String.localizedStringWithFormat("mesh.log.ambientlighting.config %@".localized, String(nodeNum))
|
||||
let logString = String.localizedStringWithFormat("Ambient Lighting module config received: %@".localized, String(nodeNum))
|
||||
Logger.data.info("🏮 \(logString, privacy: .public)")
|
||||
|
||||
let fetchNodeInfoRequest = NodeInfoEntity.fetchRequest()
|
||||
|
|
|
|||
|
|
@ -13,10 +13,10 @@
|
|||
return "tip.channels.share"
|
||||
}
|
||||
var title: Text {
|
||||
Text("tip.channels.share.title")
|
||||
Text("Sharing Meshtastic Channels")
|
||||
}
|
||||
var message: Text? {
|
||||
Text("tip.channels.share.message")
|
||||
Text("A Meshtastic QR code contains the LoRa config and channel values needed for radios to communicate. You can share a complete channel configuration using the Replace Channels option, if you choose Add Channels your shared channels will be added to the channels on the receiving radio.")
|
||||
}
|
||||
var image: Image? {
|
||||
Image(systemName: "qrcode")
|
||||
|
|
@ -29,10 +29,10 @@ struct CreateChannelsTip: Tip {
|
|||
return "tip.channels.create"
|
||||
}
|
||||
var title: Text {
|
||||
Text("tip.channels.create.title")
|
||||
Text("Manage Channels")
|
||||
}
|
||||
var message: Text? {
|
||||
Text("tip.channels.create.message")
|
||||
Text("Most data on your mesh is sent over the primary channel. You can set up secondary channels to create additional messaging groups secured by their own key. [Channel config tips](https://meshtastic.org/docs/configuration/tips/)")
|
||||
}
|
||||
var image: Image? {
|
||||
Image(systemName: "fibrechannel")
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ struct Connect: View {
|
|||
VStack {
|
||||
List {
|
||||
if bleManager.isSwitchedOn {
|
||||
Section(header: Text("connected.radio").font(.title)) {
|
||||
Section(header: Text("Connected Radio").font(.title)) {
|
||||
if let connectedPeripheral = bleManager.connectedPeripheral, connectedPeripheral.peripheral.state == .connected {
|
||||
TipView(BluetoothConnectionTip(), arrowEdge: .bottom)
|
||||
VStack(alignment: .leading) {
|
||||
|
|
@ -139,7 +139,7 @@ struct Connect: View {
|
|||
NavigationLink {
|
||||
LoRaConfig(node: node)
|
||||
} label: {
|
||||
Label("set.region", systemImage: "globe.americas.fill")
|
||||
Label("Set LoRa Region", systemImage: "globe.americas.fill")
|
||||
.foregroundColor(.red)
|
||||
.font(.title)
|
||||
}
|
||||
|
|
@ -156,7 +156,7 @@ struct Connect: View {
|
|||
.frame(width: 60, height: 60)
|
||||
.padding(.trailing)
|
||||
if bleManager.timeoutTimerCount == 0 {
|
||||
Text("connecting")
|
||||
Text("Connecting . .")
|
||||
.font(.title2)
|
||||
.foregroundColor(.orange)
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ struct InvalidVersion: View {
|
|||
|
||||
VStack {
|
||||
|
||||
Text("update.firmware")
|
||||
Text("Update Your Firmware")
|
||||
.font(.largeTitle)
|
||||
.foregroundColor(.orange)
|
||||
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ struct DeviceMetricsLog: View {
|
|||
isPresented: $isPresentingClearLogConfirm,
|
||||
titleVisibility: .visible
|
||||
) {
|
||||
Button("device.metrics.delete", role: .destructive) {
|
||||
Button("Delete all device metrics?", role: .destructive) {
|
||||
if clearTelemetry(destNum: node.num, metricsType: 0, context: context) {
|
||||
Logger.data.notice("Cleared Device Metrics for \(node.num, privacy: .public)")
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ struct NodeListItem: View {
|
|||
if connected {
|
||||
IconAndText(systemName: "antenna.radiowaves.left.and.right.circle.fill",
|
||||
imageColor: .green,
|
||||
text: "connected".localized)
|
||||
text: "Connected".localized)
|
||||
}
|
||||
if node.lastHeard?.timeIntervalSince1970 ?? 0 > 0 && node.lastHeard! < Calendar.current.date(byAdding: .year, value: 1, to: Date())! {
|
||||
IconAndText(systemName: node.isOnline ? "checkmark.circle.fill" : "moon.circle.fill",
|
||||
|
|
|
|||
|
|
@ -379,6 +379,6 @@ enum PositionPrecision: Int, CaseIterable, Identifiable {
|
|||
|
||||
var description: String {
|
||||
let distanceFormatter = MKDistanceFormatter()
|
||||
return String.localizedStringWithFormat("position.precision %@".localized, String(distanceFormatter.string(fromDistance: precisionMeters)))
|
||||
return String.localizedStringWithFormat("Within %@".localized, String(distanceFormatter.string(fromDistance: precisionMeters)))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -304,6 +304,9 @@ struct LoRaConfig: View {
|
|||
}
|
||||
}
|
||||
func setLoRaValues() {
|
||||
if node?.loRaConfig?.modemPreset ?? 0 == 2 {
|
||||
node?.loRaConfig?.modemPreset = 0
|
||||
}
|
||||
self.hopLimit = Int(node?.loRaConfig?.hopLimit ?? 3)
|
||||
self.region = Int(node?.loRaConfig?.regionCode ?? 0)
|
||||
self.usePreset = node?.loRaConfig?.usePreset ?? true
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ struct DetectionSensorConfig: View {
|
|||
}
|
||||
.toggleStyle(SwitchToggleStyle(tint: .accentColor))
|
||||
}
|
||||
Section(header: Text("update.interval")) {
|
||||
Section(header: Text("Update Interval")) {
|
||||
Picker("Minimum time between detection broadcasts", selection: $minimumBroadcastSecs) {
|
||||
ForEach(UpdateIntervals.allCases) { ui in
|
||||
Text(ui.description).tag(ui.rawValue)
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ struct TelemetryConfig: View {
|
|||
Form {
|
||||
ConfigHeader(title: "Telemetry", config: \.telemetryConfig, node: node, onAppear: setTelemetryValues)
|
||||
|
||||
Section(header: Text("update.interval")) {
|
||||
Section(header: Text("Update Interval")) {
|
||||
Picker("Device Metrics", selection: $deviceUpdateInterval ) {
|
||||
ForEach(UpdateIntervals.allCases) { ui in
|
||||
if ui.rawValue >= 900 {
|
||||
|
|
|
|||
|
|
@ -42,8 +42,8 @@ struct NetworkConfig: View {
|
|||
.toggleStyle(SwitchToggleStyle(tint: .accentColor))
|
||||
|
||||
HStack {
|
||||
Label("ssid", systemImage: "network")
|
||||
TextField("ssid", text: $wifiSsid)
|
||||
Label("SSID", systemImage: "network")
|
||||
TextField("SSID", text: $wifiSsid)
|
||||
.foregroundColor(.gray)
|
||||
.autocapitalization(.none)
|
||||
.disableAutocorrection(true)
|
||||
|
|
|
|||
|
|
@ -32,8 +32,8 @@ struct PowerConfig: View {
|
|||
Section {
|
||||
if (currentDevice?.architecture == .esp32 || currentDevice?.architecture == .esp32S3) || (currentDevice?.architecture == .nrf52840 && (node?.deviceConfig?.role ?? 0 == 5 || node?.deviceConfig?.role ?? 0 == 6)) {
|
||||
Toggle(isOn: $isPowerSaving) {
|
||||
Label("config.power.saving", systemImage: "bolt")
|
||||
Text("config.power.saving.description")
|
||||
Label("Power Saving", systemImage: "bolt")
|
||||
Text("Will sleep everything as much as possible, for the tracker and sensor role this will also include the lora radio. Don't use this setting if you want to use your device with the phone apps or are using a device without a user button.")
|
||||
}
|
||||
.toggleStyle(SwitchToggleStyle(tint: .accentColor))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue