localize save config string

This commit is contained in:
Garth Vander Houwen 2023-01-09 18:34:43 -08:00
parent 8b8108c5a3
commit cd0fdec368
14 changed files with 38 additions and 15 deletions

View file

@ -77,7 +77,9 @@ struct TelemetryConfig: View {
isPresented: $isPresentingSaveConfirm,
titleVisibility: .visible
) {
Button("Save Telemetry Module Config to \(bleManager.connectedPeripheral != nil ? bleManager.connectedPeripheral.longName : "Unknown")?") {
let nodeName = bleManager.connectedPeripheral != nil ? bleManager.connectedPeripheral.longName : NSLocalizedString("unknown", comment: "Unknown")
let buttonText = String.localizedStringWithFormat(NSLocalizedString("save.config %@", comment: "Save Config for %@"), nodeName)
Button(buttonText) {
var tc = ModuleConfig.TelemetryConfig()
tc.deviceUpdateInterval = UInt32(deviceUpdateInterval)
tc.environmentUpdateInterval = UInt32(environmentUpdateInterval)