mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Remove more translation keys
This commit is contained in:
parent
21e86deb95
commit
da03814493
22 changed files with 796 additions and 1088 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -17,11 +17,11 @@ enum BluetoothModes: Int, CaseIterable, Identifiable {
|
|||
var description: String {
|
||||
switch self {
|
||||
case .randomPin:
|
||||
return "bluetooth.mode.randompin".localized
|
||||
return "Random Pin".localized
|
||||
case .fixedPin:
|
||||
return "bluetooth.mode.fixedpin".localized
|
||||
return "Fixed Pin".localized
|
||||
case .noPin:
|
||||
return "bluetooth.mode.nopin".localized
|
||||
return "No PIN (Just Works)".localized
|
||||
}
|
||||
}
|
||||
func protoEnumValue() -> Config.BluetoothConfig.PairingMode {
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ class BLEManager: NSObject, CBPeripheralDelegate, MqttClientProxyManagerDelegate
|
|||
}
|
||||
self.isConnected = false
|
||||
self.isConnecting = false
|
||||
self.lastConnectionError = "🚨 " + String.localizedStringWithFormat("ble.connection.timeout %d %@".localized, timeoutTimerCount, name)
|
||||
self.lastConnectionError = "🚨 " + String.localizedStringWithFormat("Connection failed after %d attempts to connect to %@. You may need to forget your device under Settings > Bluetooth.".localized, timeoutTimerCount, name)
|
||||
MeshLogger.log(lastConnectionError)
|
||||
self.timeoutTimerCount = 0
|
||||
self.startScanning()
|
||||
|
|
@ -241,7 +241,7 @@ class BLEManager: NSObject, CBPeripheralDelegate, MqttClientProxyManagerDelegate
|
|||
let errorCode = (e as NSError).code
|
||||
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)
|
||||
lastConnectionError = "🚨" + String.localizedStringWithFormat("%@ The app will automatically reconnect to the preferred radio if it comes back in range.".localized, e.localizedDescription)
|
||||
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.
|
||||
|
|
@ -262,7 +262,7 @@ class BLEManager: NSObject, CBPeripheralDelegate, MqttClientProxyManagerDelegate
|
|||
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)
|
||||
lastConnectionError = "🚨 " + String.localizedStringWithFormat("%@ This error usually cannot be fixed without forgetting the device unders Settings > Bluetooth and re-connecting to the radio.".localized, e.localizedDescription)
|
||||
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 {
|
||||
|
|
@ -575,7 +575,7 @@ class BLEManager: NSObject, CBPeripheralDelegate, MqttClientProxyManagerDelegate
|
|||
// BLE PIN connection errors
|
||||
// 5 CBATTErrorDomain Code=5 "Authentication is insufficient."
|
||||
// 15 CBATTErrorDomain Code=15 "Encryption is insufficient."
|
||||
lastConnectionError = "🚨" + String.localizedStringWithFormat("ble.errorcode.pin %@".localized, error.localizedDescription)
|
||||
lastConnectionError = "🚨" + String.localizedStringWithFormat("%@ Please try connecting again and check the PIN carefully.".localized, error.localizedDescription)
|
||||
Logger.services.error("🚫 [BLE] \(error.localizedDescription, privacy: .public) Please try connecting again and check the PIN carefully.")
|
||||
self.disconnectPeripheral(reconnect: false)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ struct Connect: View {
|
|||
if node != nil {
|
||||
Text(connectedPeripheral.longName).font(.title2)
|
||||
}
|
||||
Text("ble.name").font(.callout)+Text(": \(bleManager.connectedPeripheral?.peripheral.name ?? "unknown".localized)")
|
||||
Text("BLE Name").font(.callout)+Text(": \(bleManager.connectedPeripheral?.peripheral.name ?? "unknown".localized)")
|
||||
.font(.callout).foregroundColor(Color.gray)
|
||||
if node != nil {
|
||||
Text("firmware.version").font(.callout)+Text(": \(node?.metadata?.firmwareVersion ?? "unknown".localized)")
|
||||
|
|
@ -243,7 +243,7 @@ struct Connect: View {
|
|||
}
|
||||
|
||||
} else {
|
||||
Text("bluetooth.off")
|
||||
Text("Bluetooth is off")
|
||||
.foregroundColor(.red)
|
||||
.font(.title)
|
||||
}
|
||||
|
|
@ -282,7 +282,7 @@ struct Connect: View {
|
|||
}
|
||||
.padding(.bottom, 10)
|
||||
}
|
||||
.navigationTitle("bluetooth")
|
||||
.navigationTitle("Bluetooth")
|
||||
.navigationBarItems(
|
||||
leading: MeshtasticLogo(),
|
||||
trailing: ZStack {
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ struct ContentView: View {
|
|||
|
||||
Connect()
|
||||
.tabItem {
|
||||
Label("bluetooth", systemImage: "antenna.radiowaves.left.and.right")
|
||||
Label("Bluetooth", systemImage: "antenna.radiowaves.left.and.right")
|
||||
}
|
||||
.tag(NavigationState.Tab.bluetooth)
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ struct ConnectedDevice: View {
|
|||
.symbolRenderingMode(.hierarchical)
|
||||
}
|
||||
} else {
|
||||
Text("bluetooth.off").font(.subheadline).foregroundColor(.red)
|
||||
Text("Bluetooth is off").font(.subheadline).foregroundColor(.red)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ struct TextMessageSize: View {
|
|||
let totalBytes: Int
|
||||
|
||||
var body: some View {
|
||||
ProgressView("\("bytes".localized): \(totalBytes) / \(maxbytes)", value: Double(totalBytes), total: Double(maxbytes))
|
||||
ProgressView("\("Bytes".localized): \(totalBytes) / \(maxbytes)", value: Double(totalBytes), total: Double(maxbytes))
|
||||
.frame(width: 130)
|
||||
.padding(5)
|
||||
.font(.subheadline)
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ struct DeviceMetricsLog: View {
|
|||
if idiom == .phone {
|
||||
/// Single Cell Compact display for phones
|
||||
Table(deviceMetrics, selection: $selection, sortOrder: $sortOrder) {
|
||||
TableColumn("battery.level") { dm in
|
||||
TableColumn("Battery Level") { dm in
|
||||
HStack {
|
||||
Text(dm.time?.formattedDate(format: dateFormatString) ?? "unknown.age".localized)
|
||||
.font(.caption)
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ struct EnvironmentMetricsLog: View {
|
|||
Button(role: .destructive) {
|
||||
isPresentingClearLogConfirm = true
|
||||
} label: {
|
||||
Label("clear.log", systemImage: "trash.fill")
|
||||
Label("Clear", systemImage: "trash.fill")
|
||||
.imageScale(imageScale)
|
||||
}
|
||||
.buttonStyle(.bordered)
|
||||
|
|
@ -131,7 +131,7 @@ struct EnvironmentMetricsLog: View {
|
|||
.controlSize(buttonSize)
|
||||
.padding(.bottom)
|
||||
.confirmationDialog(
|
||||
"are.you.sure",
|
||||
"Are you sure?",
|
||||
isPresented: $isPresentingClearLogConfirm,
|
||||
titleVisibility: .visible
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ struct DeleteNodeButton: View {
|
|||
}
|
||||
}
|
||||
.alert(
|
||||
"are.you.sure",
|
||||
"Are you sure?",
|
||||
isPresented: $isPresentingAlert
|
||||
) {
|
||||
Button("OK") { }.keyboardShortcut(.defaultAction)
|
||||
|
|
@ -32,7 +32,7 @@ struct DeleteNodeButton: View {
|
|||
Text("Delete Node?")
|
||||
}
|
||||
.confirmationDialog(
|
||||
"are.you.sure",
|
||||
"Are you sure?",
|
||||
isPresented: $isPresentingAlert,
|
||||
titleVisibility: .visible
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -181,7 +181,7 @@ struct WaypointForm: View {
|
|||
Button(role: .cancel) {
|
||||
dismiss()
|
||||
} label: {
|
||||
Label("cancel", systemImage: "x.circle")
|
||||
Label("Cancel", systemImage: "x.circle")
|
||||
}
|
||||
.buttonStyle(.bordered)
|
||||
.buttonBorderShape(.capsule)
|
||||
|
|
|
|||
|
|
@ -426,7 +426,7 @@ struct NodeDetail: View {
|
|||
} label: {
|
||||
Label("Power Off", systemImage: "power")
|
||||
}.confirmationDialog(
|
||||
"are.you.sure",
|
||||
"Are you sure?",
|
||||
isPresented: $showingShutdownConfirm
|
||||
) {
|
||||
Button("Shutdown Node?", role: .destructive) {
|
||||
|
|
@ -449,7 +449,7 @@ struct NodeDetail: View {
|
|||
systemImage: "arrow.triangle.2.circlepath"
|
||||
)
|
||||
}.confirmationDialog(
|
||||
"are.you.sure",
|
||||
"Are you sure?",
|
||||
isPresented: $showingRebootConfirm
|
||||
) {
|
||||
Button("reboot.node", role: .destructive) {
|
||||
|
|
|
|||
|
|
@ -227,7 +227,7 @@ struct NodeList: View {
|
|||
Text("This could take a while, response will appear in the trace route log for the node it was sent to.")
|
||||
}
|
||||
.confirmationDialog(
|
||||
"are.you.sure",
|
||||
"Are you sure?",
|
||||
isPresented: $isPresentingDeleteNodeAlert,
|
||||
titleVisibility: .visible
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ struct PaxCounterLog: View {
|
|||
Button(role: .destructive) {
|
||||
isPresentingClearLogConfirm = true
|
||||
} label: {
|
||||
Label("clear.log", systemImage: "trash.fill")
|
||||
Label("Clear", systemImage: "trash.fill")
|
||||
}
|
||||
.buttonStyle(.bordered)
|
||||
.buttonBorderShape(.capsule)
|
||||
|
|
@ -170,7 +170,7 @@ struct PaxCounterLog: View {
|
|||
.padding(.bottom)
|
||||
.padding(.leading)
|
||||
.confirmationDialog(
|
||||
"are.you.sure",
|
||||
"Are you sure?",
|
||||
isPresented: $isPresentingClearLogConfirm,
|
||||
titleVisibility: .visible
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ struct AppSettings: View {
|
|||
.foregroundColor(.red)
|
||||
}
|
||||
.confirmationDialog(
|
||||
"are.you.sure",
|
||||
"Are you sure?",
|
||||
isPresented: $isPresentingCoreDataResetConfirm,
|
||||
titleVisibility: .visible
|
||||
) {
|
||||
|
|
@ -94,7 +94,7 @@ struct AppSettings: View {
|
|||
.foregroundColor(.red)
|
||||
}
|
||||
.confirmationDialog(
|
||||
"are.you.sure",
|
||||
"Are you sure?",
|
||||
isPresented: $isPresentingDeleteMapTilesConfirm,
|
||||
titleVisibility: .visible
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ struct BluetoothConfig: View {
|
|||
Label("enabled", systemImage: "antenna.radiowaves.left.and.right")
|
||||
}
|
||||
.toggleStyle(SwitchToggleStyle(tint: .accentColor))
|
||||
Picker("bluetooth.pairingmode", selection: $mode ) {
|
||||
Picker("Pairing Mode", selection: $mode ) {
|
||||
ForEach(BluetoothModes.allCases) { bm in
|
||||
Text(bm.description)
|
||||
}
|
||||
|
|
@ -42,8 +42,8 @@ struct BluetoothConfig: View {
|
|||
.pickerStyle(DefaultPickerStyle())
|
||||
if mode == 1 {
|
||||
HStack {
|
||||
Label("bluetooth.mode.fixedpin", systemImage: "wallet.pass")
|
||||
TextField("bluetooth.mode.fixedpin", text: $fixedPin)
|
||||
Label("Fixed Pin", systemImage: "wallet.pass")
|
||||
TextField("Fixed Pin", text: $fixedPin)
|
||||
.foregroundColor(.gray)
|
||||
.onChange(of: fixedPin) {
|
||||
// Don't let the first character be 0 because it will get stripped when saving a UInt32
|
||||
|
|
@ -64,7 +64,7 @@ struct BluetoothConfig: View {
|
|||
}
|
||||
.keyboardType(.decimalPad)
|
||||
if shortPin {
|
||||
Text("bluetooth.pin.validation")
|
||||
Text("BLE Pin must be 6 digits long.")
|
||||
.font(.callout)
|
||||
.foregroundColor(.red)
|
||||
}
|
||||
|
|
@ -90,7 +90,7 @@ struct BluetoothConfig: View {
|
|||
}
|
||||
}
|
||||
|
||||
.navigationTitle("bluetooth.config")
|
||||
.navigationTitle("Bluetooth Config")
|
||||
.navigationBarItems(
|
||||
trailing: ZStack {
|
||||
ConnectedDevice(
|
||||
|
|
@ -103,7 +103,6 @@ struct BluetoothConfig: View {
|
|||
.onFirstAppear {
|
||||
// Need to request a BluetoothConfig from the remote node before allowing changes
|
||||
if let connectedPeripheral = bleManager.connectedPeripheral, let node {
|
||||
|
||||
let connectedNode = getNodeInfo(id: connectedPeripheral.num, context: context)
|
||||
if let connectedNode {
|
||||
if node.num != connectedNode.num {
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ struct DeviceConfig: View {
|
|||
.controlSize(.regular)
|
||||
.padding(.leading)
|
||||
.confirmationDialog(
|
||||
"are.you.sure",
|
||||
"Are you sure?",
|
||||
isPresented: $isPresentingNodeDBResetConfirm,
|
||||
titleVisibility: .visible
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ struct SaveConfigButton: View {
|
|||
.controlSize(.large)
|
||||
.padding()
|
||||
.confirmationDialog(
|
||||
"are.you.sure",
|
||||
"Are you sure?",
|
||||
isPresented: $isPresentingSaveConfirm,
|
||||
titleVisibility: .visible
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -208,7 +208,7 @@ struct Routes: View {
|
|||
}
|
||||
HStack {
|
||||
|
||||
Button("cancel", role: .cancel) {
|
||||
Button("Cancel", role: .cancel) {
|
||||
selectedRoute = nil
|
||||
}
|
||||
.buttonStyle(.bordered)
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ struct SaveChannelQRCode: View {
|
|||
Button {
|
||||
dismiss()
|
||||
} label: {
|
||||
Label("cancel", systemImage: "xmark")
|
||||
Label("Cancel", systemImage: "xmark")
|
||||
|
||||
}
|
||||
.buttonStyle(.bordered)
|
||||
|
|
@ -66,7 +66,7 @@ struct SaveChannelQRCode: View {
|
|||
Button {
|
||||
dismiss()
|
||||
} label: {
|
||||
Label("cancel", systemImage: "xmark")
|
||||
Label("Cancel", systemImage: "xmark")
|
||||
|
||||
}
|
||||
.buttonStyle(.bordered)
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ struct Settings: View {
|
|||
|
||||
NavigationLink(value: SettingsNavigationState.bluetooth) {
|
||||
Label {
|
||||
Text("bluetooth")
|
||||
Text("Bluetooth")
|
||||
} icon: {
|
||||
Image(systemName: "antenna.radiowaves.left.and.right")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ struct UserConfig: View {
|
|||
.controlSize(.large)
|
||||
.padding()
|
||||
.confirmationDialog(
|
||||
"are.you.sure",
|
||||
"Are you sure?",
|
||||
isPresented: $isPresentingSaveConfirm,
|
||||
titleVisibility: .visible
|
||||
) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue