mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Ringtone cleanup, translation strings
This commit is contained in:
parent
cfa4c03faa
commit
7e429b79eb
6 changed files with 19 additions and 8 deletions
|
|
@ -701,7 +701,7 @@ func upsertExternalNotificationModuleConfigPacket(config: Meshtastic.ModuleConfi
|
|||
|
||||
func upsertRtttlConfigPacket(ringtone: String, nodeNum: Int64, context: NSManagedObjectContext) {
|
||||
|
||||
let logString = String.localizedStringWithFormat(NSLocalizedString("mesh.log.rangetest.config %@", comment: "Range Test module config received: %@"), String(nodeNum))
|
||||
let logString = String.localizedStringWithFormat(NSLocalizedString("mesh.log.ringtone.config %@", comment: "RTTTL Ringtone config received: %@"), String(nodeNum))
|
||||
MeshLogger.log("⛰️ \(logString)")
|
||||
|
||||
let fetchNodeInfoRequest: NSFetchRequest<NSFetchRequestResult> = NSFetchRequest.init(entityName: "NodeInfoEntity")
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ struct Connect: View {
|
|||
#endif
|
||||
}
|
||||
} label: {
|
||||
Label("Mesh Live Activity", systemImage: liveActivityStarted ? "stop" : "play")
|
||||
Label("mesh.live.activity", systemImage: liveActivityStarted ? "stop" : "play")
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ struct RtttlConfig: View {
|
|||
|
||||
} else if node != nil && node?.num ?? 0 != bleManager.connectedPeripheral?.num ?? 0 {
|
||||
// Let users know what is going on if they are using remote admin and don't have the config yet
|
||||
if node?.rangeTestConfig == nil {
|
||||
if node?.rtttlConfig == nil {
|
||||
Text("RTTTL Ringtone config data was requested over the admin channel but no response has been returned from the remote node. You can check the status of admin message requests in the admin message log.")
|
||||
.font(.callout)
|
||||
.foregroundColor(.orange)
|
||||
|
|
@ -82,7 +82,7 @@ struct RtttlConfig: View {
|
|||
} label: {
|
||||
Label("save", systemImage: "square.and.arrow.down")
|
||||
}
|
||||
.disabled(bleManager.connectedPeripheral == nil || !hasChanges || !(node?.myInfo?.hasWifi ?? false))
|
||||
.disabled(bleManager.connectedPeripheral == nil || !hasChanges)
|
||||
.buttonStyle(.bordered)
|
||||
.buttonBorderShape(.capsule)
|
||||
.controlSize(.large)
|
||||
|
|
@ -111,7 +111,7 @@ struct RtttlConfig: View {
|
|||
message: {
|
||||
Text("config.save.confirm")
|
||||
}
|
||||
.navigationTitle("rtttl.config")
|
||||
.navigationTitle("ringtone.config")
|
||||
.navigationBarItems(trailing:
|
||||
ZStack {
|
||||
ConnectedDevice(bluetoothOn: bleManager.isSwitchedOn, deviceConnected: bleManager.connectedPeripheral != nil, name: (bleManager.connectedPeripheral != nil) ? bleManager.connectedPeripheral.shortName : "????")
|
||||
|
|
@ -119,9 +119,8 @@ struct RtttlConfig: View {
|
|||
.onAppear {
|
||||
self.bleManager.context = context
|
||||
setRtttLConfigValue()
|
||||
|
||||
// Need to request a Rtttl Config from the remote node before allowing changes
|
||||
if bleManager.connectedPeripheral != nil && node?.rtttlConfig == nil {
|
||||
if bleManager.connectedPeripheral != nil && (node?.rtttlConfig == nil || node?.rtttlConfig?.ringtone?.count ?? 0 == 0) {
|
||||
let connectedNode = getNodeInfo(id: bleManager.connectedPeripheral.num, context: context)
|
||||
if node != nil && connectedNode != nil {
|
||||
_ = bleManager.requestRtttlConfig(fromUser: connectedNode!.user!, toUser: node!.user!, adminIndex: connectedNode?.myInfo?.adminIndex ?? 0)
|
||||
|
|
|
|||
|
|
@ -144,6 +144,7 @@
|
|||
"map.usertrackingmode.none"="None";
|
||||
"map.usertrackingmode.follow"="Follow";
|
||||
"map.usertrackingmode.followwithheading"="Follow with heading";
|
||||
"mesh.live.activity"="Mesh Live Activity";
|
||||
"mesh.log"="Mesh Log";
|
||||
"mesh.log.bluetooth.config %@"="Bluetooth Konfiguration empfangen: %@";
|
||||
"mesh.log.cannedmessage.config %@"="Canned Message module config received: %@";
|
||||
|
|
@ -165,6 +166,7 @@
|
|||
"mesh.log.position.config %@"="Positions Konfiguration empfangen: %@";
|
||||
"mesh.log.position.received %@"="Positionspaket empfangen von Node: %@";
|
||||
"mesh.log.rangetest.config %@"="Range Test Modul konfiguration empfangen: %@";
|
||||
"mesh.log.ringtone.config %@"="RTTTL Ringtone config received: %@";
|
||||
"mesh.log.routing.message %@ %@"="Routing empfangen für RequestID: %@ Ack Status: %@";
|
||||
"mesh.log.serial.config %@"="Serial Modul Konfiguration empfangen: %@";
|
||||
"mesh.log.sharelocation %@"="Sent a Position Packet from the Apple device GPS to node: %@";
|
||||
|
|
@ -212,6 +214,8 @@
|
|||
"reply"="Antworten";
|
||||
"received.ack"="Empfangsbestätigung";
|
||||
"received.ack.real"="Recipient Ack";
|
||||
"ringtone"="Ringtone";
|
||||
"ringtone.config"="Ringtone Config";
|
||||
"routing.acknowledged"="Bestätigt";
|
||||
"routing.noroute"="Keine Route";
|
||||
"routing.gotnak"="Negative Empfangsbestätigung empfangen";
|
||||
|
|
|
|||
|
|
@ -49,8 +49,8 @@
|
|||
"clear.log"="Clear Log";
|
||||
"close"="Close";
|
||||
"config.save.confirm"="After config values save the node will reboot.";
|
||||
"connected.radio"="Connected Radio";
|
||||
"communicating"="Communicating with device. .";
|
||||
"connected.radio"="Connected Radio";
|
||||
"connected"="Currently Connected";
|
||||
"connecting"="Connecting . .";
|
||||
"contacts"="Contacts";
|
||||
|
|
@ -144,6 +144,7 @@
|
|||
"map.usertrackingmode.follow"="Follow";
|
||||
"map.usertrackingmode.followwithheading"="Follow with heading";
|
||||
"map.usertrackingmode.none"="None";
|
||||
"mesh.live.activity"="Mesh Live Activity";
|
||||
"mesh.log"="Mesh Log";
|
||||
"mesh.log.bluetooth.config %@"="Bluetooth config received: %@";
|
||||
"mesh.log.cannedmessage.config %@"="Canned Message module config received: %@";
|
||||
|
|
@ -165,6 +166,7 @@
|
|||
"mesh.log.position.config %@"="Positon config received: %@";
|
||||
"mesh.log.position.received %@"="Position Packet received from node: %@";
|
||||
"mesh.log.rangetest.config %@"="Range Test module config received: %@";
|
||||
"mesh.log.ringtone.config %@"="RTTTL Ringtone config received: %@";
|
||||
"mesh.log.routing.message %@ %@"="Routing received for RequestID: %@ Ack Status: %@";
|
||||
"mesh.log.serial.config %@"="Serial module config received: %@";
|
||||
"mesh.log.sharelocation %@"="Sent a Position Packet from the Apple device GPS to node: %@";
|
||||
|
|
@ -212,6 +214,8 @@
|
|||
"reboot.node"="Reboot node?";
|
||||
"received.ack"="Received Ack";
|
||||
"received.ack.real"="Recipient Ack";
|
||||
"ringtone"="Ringtone";
|
||||
"ringtone.config"="Ringtone Config";
|
||||
"routing.acknowledged"="Acknowledged";
|
||||
"routing.noroute"="No Route";
|
||||
"routing.gotnak"="Received a negative acknowledgment";
|
||||
|
|
|
|||
|
|
@ -144,6 +144,7 @@
|
|||
"map.usertrackingmode.none"="None";
|
||||
"map.usertrackingmode.follow"="Follow";
|
||||
"map.usertrackingmode.followwithheading"="Follow with heading";
|
||||
"mesh.live.activity"="Mesh Live Activity";
|
||||
"mesh.log"="Mesh 日志";
|
||||
"mesh.log.bluetooth.config %@"="Bluetooth config received: %@";
|
||||
"mesh.log.cannedmessage.config %@"="Canned Message module config received: %@";
|
||||
|
|
@ -165,6 +166,7 @@
|
|||
"mesh.log.position.config %@"="Positon config received: %@";
|
||||
"mesh.log.position.received %@"="Position Packet received from node: %@";
|
||||
"mesh.log.rangetest.config %@"="Range Test module config received: %@";
|
||||
"mesh.log.ringtone.config %@"="RTTTL Ringtone config received: %@";
|
||||
"mesh.log.routing.message %@ %@"="Routing received for RequestID: %@ Ack Status: %@";
|
||||
"mesh.log.serial.config %@"="Serial module config received: %@";
|
||||
"mesh.log.sharelocation %@"="Sent a Position Packet from the Apple device GPS to node: %@";
|
||||
|
|
@ -212,6 +214,8 @@
|
|||
"reboot.node"="重启节点?";
|
||||
"received.ack"="收到确认";
|
||||
"received.ack.real"="收件人确认";
|
||||
"ringtone"="Ringtone";
|
||||
"ringtone.config"="Ringtone Config";
|
||||
"routing.acknowledged"="确认";
|
||||
"routing.noroute"="找不到目标";
|
||||
"routing.gotnak"="收到否认";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue