Improved localizations

release
Laurent 3 years ago
parent dcf8eb7684
commit c5bd812620
  1. 2
      LeCountdown.xcodeproj/project.pbxproj
  2. 3
      LeCountdown/Conductor.swift
  3. 6
      LeCountdown/CountdownScheduler.swift
  4. 4
      LeCountdown/fr.lproj/Localizable.strings

@ -79,6 +79,7 @@
C473C31929A926F50056B38A /* LaunchWidget.intentdefinition in Sources */ = {isa = PBXBuildFile; fileRef = C473C31C29A926F50056B38A /* LaunchWidget.intentdefinition */; };
C473C31A29A926F50056B38A /* LaunchWidget.intentdefinition in Sources */ = {isa = PBXBuildFile; fileRef = C473C31C29A926F50056B38A /* LaunchWidget.intentdefinition */; };
C473C32C29AA330E0056B38A /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = C473C32A29AA330E0056B38A /* Localizable.strings */; };
C473C33029ACADC80056B38A /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = C473C32A29AA330E0056B38A /* Localizable.strings */; };
C4742B5729840F6400D5D950 /* CoolPic.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4742B5629840F6400D5D950 /* CoolPic.swift */; };
C4742B59298411E800D5D950 /* CountdownFormView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4742B58298411E800D5D950 /* CountdownFormView.swift */; };
C4742B5B298414B000D5D950 /* ImageSelectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4742B5A298414B000D5D950 /* ImageSelectionView.swift */; };
@ -934,6 +935,7 @@
buildActionMask = 2147483647;
files = (
C473C30529A91BB90056B38A /* en.xcloc in Resources */,
C473C33029ACADC80056B38A /* Localizable.strings in Resources */,
C473C30929A91BCC0056B38A /* fr.xcloc in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;

@ -235,8 +235,9 @@ class Conductor: ObservableObject {
fileprivate func _createTimerIntent(_ timer: AbstractTimer) {
let intent = LaunchTimerIntent()
intent.suggestedInvocationPhrase = "\(NSLocalizedString("Launch", comment: "")) \(timer.displayName)"
let invocationPhrase = NSLocalizedString("Launch %@", comment: "")
intent.suggestedInvocationPhrase = String(format: invocationPhrase, timer.displayName)
intent.timer = TimerIdentifier(identifier: timer.stringId, display: timer.displayName)
let interaction = INInteraction(intent: intent, response: nil)

@ -36,9 +36,11 @@ class CountdownScheduler {
let duration = countdown.duration
let body: String
if let name = countdown.activity?.name {
body = NSLocalizedString("Time's up for \(name)!", comment: "")
let timesup = NSLocalizedString("Time's up for %@!", comment: "")
body = String(format: timesup, name)
} else {
body = NSLocalizedString("Your \(duration.minuteSecond) countdown is over!", comment: "")
let timesup = NSLocalizedString("Your %@ countdown is over!", comment: "")
body = String(format: timesup, duration.minuteSecond)
}
content.body = body

@ -206,7 +206,7 @@
"Time" = "Temps";
/* No comment provided by engineer. */
"Time's up for (name)!" = "C'est l'heure pour (name) !";
"Time's up for %@!" = "C'est l'heure pour %@ !";
/* No comment provided by engineer. */
"Tooth brushing" = "Brossage de dent";
@ -236,7 +236,7 @@
"You need to accept notifications, please check your settings" = "Vous devez accepter les notifications, veuillez vérifier vos réglages";
/* No comment provided by engineer. */
"Your (duration.minuteSecond) countdown is over!" = "Votre minuteur de (duration.minuteSecond) est terminé !";
"Your %@ countdown is over!" = "Votre minuteur de %@ est terminé !";
"Launch" = "Démarrer";

Loading…
Cancel
Save