Skip to content

Commit

Permalink
Localisation fixes + no restrictions on not supporting haptics
Browse files Browse the repository at this point in the history
  • Loading branch information
Snesnopic committed May 30, 2024
1 parent 7cd0d28 commit a57223d
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 14 deletions.
73 changes: 73 additions & 0 deletions Morser/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -2662,6 +2662,7 @@
}
},
"The torch will flash along the sounds" : {
"extractionState" : "stale",
"localizations" : {
"el" : {
"stringUnit" : {
Expand Down Expand Up @@ -2871,7 +2872,78 @@
}
}
},
"Time unit is espressed in ms (milliseconds).\nTimings:\n. = 1 time unit (%.0f ms)\n- = 3 time units (%.0f ms)\nSpace between same symbols = 1 time unit (%.0f ms)\nSpace between different symbols = 3 time units (%.0f ms)\nSpace between words = 7 time units (%.0f ms)" : {
"localizations" : {
"el" : {
"stringUnit" : {
"state" : "translated",
"value" : "Η μονάδα χρόνου εκφράζεται σε ms (χιλιοστά του δευτερολέπτου).\nΧρονισμοί:\n. = 1 μονάδα χρόνου (%1$.0f ms)\n- = 3 μονάδες χρόνου (%2$.0f ms)\nΔιάστημα μεταξύ των ίδιων συμβόλων = 1 μονάδα χρόνου (%3$.0f ms)\nΔιάστημα μεταξύ διαφορετικών συμβόλων = 3 μονάδες χρόνου (%4$.0f ms)\nΔιάστημα μεταξύ λέξεων = 7 μονάδες χρόνου (%5$.0f ms)"
}
},
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Time unit is espressed in ms (milliseconds).\nTimings:\n. = 1 time unit (%1$.0f ms)\n- = 3 time units (%2$.0f ms)\nSpace between same symbols = 1 time unit (%3$.0f ms)\nSpace between different symbols = 3 time units (%4$.0f ms)\nSpace between words = 7 time units (%5$.0f ms)"
}
},
"en-GB" : {
"stringUnit" : {
"state" : "translated",
"value" : "Time unit is espressed in ms (milliseconds).\nTimings:\n. = 1 time unit (%1$.0f ms)\n- = 3 time units (%2$.0f ms)\nSpace between same symbols = 1 time unit (%3$.0f ms)\nSpace between different symbols = 3 time units (%4$.0f ms)\nSpace between words = 7 time units (%5$.0f ms)"
}
},
"es-419" : {
"stringUnit" : {
"state" : "translated",
"value" : "La unidad de tiempo se expresa en ms (millisegundos).\nTiempos:\n. = 1 unidad de tiempo (%1$.0f ms)\n- = 3 unidades de tiempo (%2$.0f ms)\nEspacio entre los mismos símbolos = 1 unidad de tiempo (%3$.0f ms)\nEspacio entre diferentes símbolos = 3 unidades de tiempo (%4$.0f ms)\nEspacio entre palabras = 7 unidades de tiempo (%5$.0f ms)"
}
},
"fr" : {
"stringUnit" : {
"state" : "translated",
"value" : "Unité de temps exprimée en ms (millisecondes).\nDurées :\n. = 1 unité de temps (%1$.0f ms)\n- = 3 unités de temps (%2$.0f ms)\nEspace entre les mêmes symboles = 1 unité de temps (%3$.0f ms)\nEspace entre différents symboles = 3 unités de temps (%4$.0f ms)\nEspace entre les mots = 7 unités de temps (%5$.0f ms)"
}
},
"it" : {
"stringUnit" : {
"state" : "translated",
"value" : "Unità temporale espressa in ms (millisecondi).\nTempismi:\n. = 1 unità temporale (%1$.0f ms)\n- = 3 unità temporali (%2$.0f ms)\nSpazio tra simboli uguali = 1 unità temporale (%3$.0f ms)\nSpazio tra simboli diversi = 3 unità temporali (%4$.0f ms)\nSpazio tra parole = 7 unità temporali (%5$.0f ms)"
}
},
"ko" : {
"stringUnit" : {
"state" : "translated",
"value" : "시간 단위는 ms(밀리초) 단위로 표시됩니다.\n타이밍:\n. = 1 시간 단위(%.0f ms)\n- = 3시간 단위(%.0f ms)\n동일한 기호 사이의 간격 = 1 시간 단위(%.0f ms)\n서로 다른 기호 사이의 간격 = 3시간 단위(%.0f ms)\n단어 사이의 간격 = 7 시간 단위(%.0f ms)"
}
},
"nap" : {
"stringUnit" : {
"state" : "translated",
"value" : "L'unità 'e tiempo è espressa in ms (millisecondi).\nTempi:\n. = 1 unità 'e tiempo (%1$.0f ms)\n= 3 unità 'e tiempo (%2$.0f ms)\nSpazio tra stessi simboli = 1 unità 'e tiempo (%3$.0f ms)\nSpazio tra simboli differenti = 3 unità 'e tiempo (%4$.0f ms)\nSpazio tra parole = 7 unità 'e tiempo (%5$.0f ms)"
}
},
"ru" : {
"stringUnit" : {
"state" : "translated",
"value" : "Единицы времени выражены в мс (миллисекундах).\nВремя:
. = 1 единица времени (%1$.0f ms)
- = 3 единицы времени(%2$.0f ms)
Промежуток между одинаковыми символами = 1 единица времени (%3$.0f ms)\nПромежуток между разными символами = 3 единицы времени (%4$.0f ms)\nПромежуток между словами = 7 единиц времени (%5$.0f ms)"
}
},
"tr" : {
"stringUnit" : {
"state" : "translated",
"value" : "Zaman birimi ms (milisaniye) cinsinden ifade edilir.\nZamanlamalar:\n. = 1 zaman birimi (%1$.0f ms)\n- = 3 zaman birimi (%2$.0f ms)\nAynı semboller arasındaki boşluk = 1 zaman birimi (%3$.0f ms)\nFarklı semboller arasındaki boşluk = 3 zaman birimi (%4$.0f ms)\nKelimeler arasındaki boşluk = 7 zaman birimi (%5$.0f ms)"
}
},
"uk" : {
"stringUnit" : {
"state" : "translated",
"value" : "Одиниця часу виражається в мілісекундах (мс).\nЧасові інтервали:\n. = 1 одиниця часу (%1$.0f мс)\n= 3 одиниці часу (%2$.0f мс)\nПроміжок між однаковими символами = 1 одиниця часу (%3$.0f мс)\nПроміжок між різними символами = 3 одиниці часу (%4$.0f мс)\nПроміжок між словами = 7 одиниць часу (%5$.0f мс)"
}
}
}
},
"Time unit is expressed in ms (milliseconds).\nTimings:\n. = 1 time unit (%.0f ms)\n- = 3 time units (%.0f ms)\nSpace between same symbols = 1 time unit (%.0f ms)\nSpace between different symbols = 3 time units (%.0f ms)\nSpace between words = 7 time units (%.0f ms)" : {
"extractionState" : "stale",
"localizations" : {
"el" : {
"stringUnit" : {
Expand Down Expand Up @@ -3222,6 +3294,7 @@
}
},
"Your device does not support haptics!\n Only sound will be played." : {
"extractionState" : "stale",
"localizations" : {
"el" : {
"stringUnit" : {
Expand Down
18 changes: 9 additions & 9 deletions Morser/Views/EncodeView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,15 @@ struct EncodeView: View {
.font(.title3)
}
}
if !vibrationEngine.supportsHaptics {
HStack {
Image(systemName: "exclamationmark.circle.fill")
Text("Your device does not support haptics!\n Only sound will be played.")
.bold()
}
.foregroundStyle(.orange)
Spacer()
}
// if !vibrationEngine.supportsHaptics {
// HStack {
// Image(systemName: "exclamationmark.circle.fill")
// Text("Your device does not support haptics!\nOnly sound will be played.")
// .bold()
// }
// .foregroundStyle(.orange)
// Spacer()
// }
if !speechRecognizer.errorMessage.isEmpty {
HStack {
Image(systemName: "exclamationmark.circle.fill")
Expand Down
11 changes: 6 additions & 5 deletions Morser/Views/SettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ struct SettingsView: View {
Form {
Section {
Toggle("Sound Haptics", isOn: $soundEnabled)
.disabled(vibrationEngine.isListening || vibrationEngine.isVibrating() || !vibrationEngine.supportsHaptics)
.disabled(vibrationEngine.isListening || vibrationEngine.isVibrating()/* || !vibrationEngine.supportsHaptics*/)
if soundEnabled {
HStack {
Text("Sound Pitch")
Expand Down Expand Up @@ -92,15 +92,15 @@ struct SettingsView: View {
}
}
private enum flashlightCases {
case soundOnly
// case soundOnly
case hapticsOnly
case soundAndHaptics
case disabled
case notAvailable
var rawValue: String {
switch self {
case .soundOnly:
return String(localized: "The torch will flash along the sounds")
// case .soundOnly:
// return String(localized: "The torch will flash along the sounds")
case .hapticsOnly:
return String(localized: "The torch will flash along the haptics")
case .soundAndHaptics:
Expand All @@ -123,7 +123,8 @@ struct SettingsView: View {
} else if !soundEnabled {
return .hapticsOnly
} else {
return .soundOnly
// return .soundOnly
return .soundAndHaptics
}
}

Expand Down

0 comments on commit a57223d

Please sign in to comment.