From dcf8eb768493e48624ca9933eca1e1039c12e0d3 Mon Sep 17 00:00:00 2001 From: Laurent Date: Sat, 25 Feb 2023 13:53:20 +0100 Subject: [PATCH] Update --- LaunchIntents/fr.lproj/Localizable.strings | 15 ----- .../LaunchWidget.intentdefinition | 0 LaunchWidget/fr.lproj/LaunchWidget.strings | 0 LaunchWidget/fr.lproj/Localizable.strings | 18 ------ LeCountdown.xcodeproj/project.pbxproj | 59 +++++++------------ LeCountdown/AppDelegate.swift | 2 +- .../SiriIntents.intentdefinition | 4 +- LeCountdown/Conductor.swift | 2 + .../Views/Countdown/NewCountdownView.swift | 4 +- .../Views/Stopwatch/NewStopwatchView.swift | 1 - LeCountdown/fr.lproj/Localizable.strings | 11 +++- LeCountdown/fr.lproj/SiriIntents.strings | 7 +++ 12 files changed, 44 insertions(+), 79 deletions(-) delete mode 100644 LaunchIntents/fr.lproj/Localizable.strings rename LaunchWidget/{en.lproj => Base.lproj}/LaunchWidget.intentdefinition (100%) create mode 100644 LaunchWidget/fr.lproj/LaunchWidget.strings delete mode 100644 LaunchWidget/fr.lproj/Localizable.strings rename LeCountdown/{en.lproj => Base.lproj}/SiriIntents.intentdefinition (98%) create mode 100644 LeCountdown/fr.lproj/SiriIntents.strings diff --git a/LaunchIntents/fr.lproj/Localizable.strings b/LaunchIntents/fr.lproj/Localizable.strings deleted file mode 100644 index 4216c7e..0000000 --- a/LaunchIntents/fr.lproj/Localizable.strings +++ /dev/null @@ -1,15 +0,0 @@ -/* No comment provided by engineer. */ -"Custom" = "Personnalisé"; - -/* No comment provided by engineer. */ -"It's time!" = "C'est l'heure !"; - -/* No comment provided by engineer. */ -"Nature" = "Nature"; - -/* No comment provided by engineer. */ -"Time's up for (name)!" = "C'est l'heure pour (name) !"; - -/* No comment provided by engineer. */ -"Your (duration.minuteSecond) countdown is over!" = "Votre minuteur de (duration.minuteSecond) est terminé !"; - diff --git a/LaunchWidget/en.lproj/LaunchWidget.intentdefinition b/LaunchWidget/Base.lproj/LaunchWidget.intentdefinition similarity index 100% rename from LaunchWidget/en.lproj/LaunchWidget.intentdefinition rename to LaunchWidget/Base.lproj/LaunchWidget.intentdefinition diff --git a/LaunchWidget/fr.lproj/LaunchWidget.strings b/LaunchWidget/fr.lproj/LaunchWidget.strings new file mode 100644 index 0000000..e69de29 diff --git a/LaunchWidget/fr.lproj/Localizable.strings b/LaunchWidget/fr.lproj/Localizable.strings deleted file mode 100644 index 0418c89..0000000 --- a/LaunchWidget/fr.lproj/Localizable.strings +++ /dev/null @@ -1,18 +0,0 @@ -/* No comment provided by engineer. */ -"Configure me!" = "Configurez moi !"; - -/* No comment provided by engineer. */ -"Configure me!\n" = "Configurez moi !"; - -/* No comment provided by engineer. */ -"Launch Widget" = "Widget de lancement"; - -/* No comment provided by engineer. */ -"Min" = "Min"; - -/* No comment provided by engineer. */ -"Select and launch your timers" = "Sélectionnez et lancer vos minuteurs"; - -/* No comment provided by engineer. */ -"Stop" = "Arrêter"; - diff --git a/LeCountdown.xcodeproj/project.pbxproj b/LeCountdown.xcodeproj/project.pbxproj index 40c38a5..0e50acd 100644 --- a/LeCountdown.xcodeproj/project.pbxproj +++ b/LeCountdown.xcodeproj/project.pbxproj @@ -73,14 +73,12 @@ C473C30729A91BCC0056B38A /* fr.xcloc in Resources */ = {isa = PBXBuildFile; fileRef = C473C30629A91BCB0056B38A /* fr.xcloc */; }; C473C30829A91BCC0056B38A /* fr.xcloc in Resources */ = {isa = PBXBuildFile; fileRef = C473C30629A91BCB0056B38A /* fr.xcloc */; }; C473C30929A91BCC0056B38A /* fr.xcloc in Resources */ = {isa = PBXBuildFile; fileRef = C473C30629A91BCB0056B38A /* fr.xcloc */; }; - C473C30C29A9212E0056B38A /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = C473C30A29A9212E0056B38A /* Localizable.strings */; }; - C473C30F29A9212E0056B38A /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = C473C30D29A9212E0056B38A /* Localizable.strings */; }; - C473C31229A9212E0056B38A /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = C473C31029A9212E0056B38A /* Localizable.strings */; }; C473C31329A925D50056B38A /* SiriIntents.intentdefinition in Sources */ = {isa = PBXBuildFile; fileRef = C473C31629A925D50056B38A /* SiriIntents.intentdefinition */; }; C473C31429A925D50056B38A /* SiriIntents.intentdefinition in Sources */ = {isa = PBXBuildFile; fileRef = C473C31629A925D50056B38A /* SiriIntents.intentdefinition */; }; C473C31829A926F50056B38A /* LaunchWidget.intentdefinition in Sources */ = {isa = PBXBuildFile; fileRef = C473C31C29A926F50056B38A /* LaunchWidget.intentdefinition */; }; 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 */; }; 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 */; }; @@ -300,11 +298,11 @@ C473C2F829A8DC0A0056B38A /* LaunchWidgetAttributes.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LaunchWidgetAttributes.swift; sourceTree = ""; }; C473C30229A91BB90056B38A /* en.xcloc */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = en.xcloc; path = Localizations/en.xcloc; sourceTree = ""; }; C473C30629A91BCB0056B38A /* fr.xcloc */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = fr.xcloc; path = Localizations/fr.xcloc; sourceTree = ""; }; - C473C30B29A9212E0056B38A /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Localizable.strings; sourceTree = ""; }; - C473C30E29A9212E0056B38A /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Localizable.strings; sourceTree = ""; }; - C473C31129A9212E0056B38A /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Localizable.strings; sourceTree = ""; }; - C473C31729A9262A0056B38A /* en */ = {isa = PBXFileReference; lastKnownFileType = file.intentdefinition; name = en; path = en.lproj/SiriIntents.intentdefinition; sourceTree = ""; }; - C473C31D29A926F80056B38A /* en */ = {isa = PBXFileReference; lastKnownFileType = file.intentdefinition; name = en; path = en.lproj/LaunchWidget.intentdefinition; sourceTree = ""; }; + C473C32629AA307D0056B38A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.intentdefinition; name = Base; path = Base.lproj/SiriIntents.intentdefinition; sourceTree = ""; }; + C473C32729AA307D0056B38A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.intentdefinition; name = Base; path = Base.lproj/LaunchWidget.intentdefinition; sourceTree = ""; }; + C473C32829AA30890056B38A /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/SiriIntents.strings; sourceTree = ""; }; + C473C32929AA30890056B38A /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/LaunchWidget.strings; sourceTree = ""; }; + C473C32B29AA330E0056B38A /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Localizable.strings; sourceTree = ""; }; C4742B5629840F6400D5D950 /* CoolPic.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CoolPic.swift; sourceTree = ""; }; C4742B58298411E800D5D950 /* CountdownFormView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CountdownFormView.swift; sourceTree = ""; }; C4742B5A298414B000D5D950 /* ImageSelectionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageSelectionView.swift; sourceTree = ""; }; @@ -474,8 +472,8 @@ C473C30229A91BB90056B38A /* en.xcloc */, C473C30629A91BCB0056B38A /* fr.xcloc */, C473C31629A925D50056B38A /* SiriIntents.intentdefinition */, + C473C32A29AA330E0056B38A /* Localizable.strings */, C4060DCD297AE73D003FAB80 /* Info.plist */, - C473C31029A9212E0056B38A /* Localizable.strings */, C4060DC5297AE73D003FAB80 /* Preview Content */, ); path = LeCountdown; @@ -528,7 +526,6 @@ C473C31C29A926F50056B38A /* LaunchWidget.intentdefinition */, C438C7DC2981216300BF3EF9 /* Assets.xcassets */, C438C7DE2981216300BF3EF9 /* Info.plist */, - C473C30D29A9212E0056B38A /* Localizable.strings */, ); path = LaunchWidget; sourceTree = ""; @@ -539,7 +536,6 @@ C438C7F429812BB200BF3EF9 /* IntentHandler.swift */, C438C80329813B2500BF3EF9 /* LaunchIntents.entitlements */, C438C7F629812BB200BF3EF9 /* Info.plist */, - C473C30A29A9212E0056B38A /* Localizable.strings */, ); path = LaunchIntents; sourceTree = ""; @@ -870,6 +866,7 @@ knownRegions = ( en, fr, + Base, ); mainGroup = C4060DB3297AE73B003FAB80; productRefGroup = C4060DBD297AE73B003FAB80 /* Products */; @@ -893,7 +890,7 @@ C4060DC7297AE73D003FAB80 /* Preview Assets.xcassets in Resources */, C473C30729A91BCC0056B38A /* fr.xcloc in Resources */, C4BA2AEA2995AD1C00CB4FBA /* SEM_Synths_Loop4_Nothing_Like_You.wav in Resources */, - C473C31229A9212E0056B38A /* Localizable.strings in Resources */, + C473C32C29AA330E0056B38A /* Localizable.strings in Resources */, C4BA2AE42995AC0D00CB4FBA /* Arpeggio_Loop_River.wav in Resources */, C4F8B15929891528005C86A5 /* forest_stream.mp3 in Resources */, C4BA2AE22995ABE700CB4FBA /* SquareArp_Loop_River.wav in Resources */, @@ -925,7 +922,6 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - C473C30F29A9212E0056B38A /* Localizable.strings in Resources */, C445FA882984487F0054D761 /* Assets.xcassets in Resources */, C473C30429A91BB90056B38A /* en.xcloc in Resources */, C438C7DD2981216300BF3EF9 /* Assets.xcassets in Resources */, @@ -938,7 +934,6 @@ buildActionMask = 2147483647; files = ( C473C30529A91BB90056B38A /* en.xcloc in Resources */, - C473C30C29A9212E0056B38A /* Localizable.strings in Resources */, C473C30929A91BCC0056B38A /* fr.xcloc in Resources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -1176,46 +1171,32 @@ /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ - C473C30A29A9212E0056B38A /* Localizable.strings */ = { + C473C31629A925D50056B38A /* SiriIntents.intentdefinition */ = { isa = PBXVariantGroup; children = ( - C473C30B29A9212E0056B38A /* fr */, + C473C32629AA307D0056B38A /* Base */, + C473C32829AA30890056B38A /* fr */, ); - name = Localizable.strings; + name = SiriIntents.intentdefinition; sourceTree = ""; }; - C473C30D29A9212E0056B38A /* Localizable.strings */ = { + C473C31C29A926F50056B38A /* LaunchWidget.intentdefinition */ = { isa = PBXVariantGroup; children = ( - C473C30E29A9212E0056B38A /* fr */, + C473C32729AA307D0056B38A /* Base */, + C473C32929AA30890056B38A /* fr */, ); - name = Localizable.strings; + name = LaunchWidget.intentdefinition; sourceTree = ""; }; - C473C31029A9212E0056B38A /* Localizable.strings */ = { + C473C32A29AA330E0056B38A /* Localizable.strings */ = { isa = PBXVariantGroup; children = ( - C473C31129A9212E0056B38A /* fr */, + C473C32B29AA330E0056B38A /* fr */, ); name = Localizable.strings; sourceTree = ""; }; - C473C31629A925D50056B38A /* SiriIntents.intentdefinition */ = { - isa = PBXVariantGroup; - children = ( - C473C31729A9262A0056B38A /* en */, - ); - name = SiriIntents.intentdefinition; - sourceTree = ""; - }; - C473C31C29A926F50056B38A /* LaunchWidget.intentdefinition */ = { - isa = PBXVariantGroup; - children = ( - C473C31D29A926F80056B38A /* en */, - ); - name = LaunchWidget.intentdefinition; - sourceTree = ""; - }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ @@ -1223,6 +1204,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; @@ -1283,6 +1265,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; diff --git a/LeCountdown/AppDelegate.swift b/LeCountdown/AppDelegate.swift index a2db5ed..ffe6ae0 100644 --- a/LeCountdown/AppDelegate.swift +++ b/LeCountdown/AppDelegate.swift @@ -43,7 +43,7 @@ extension AppDelegate: UNUserNotificationCenterDelegate { func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) { print("willPresent notification") -// completionHandler([.banner]) +// completionHandler([.sound]) let timerId = self._timerId(notificationId: notification.request.identifier) Conductor.maestro.notifyUser(countdownId: timerId) diff --git a/LeCountdown/en.lproj/SiriIntents.intentdefinition b/LeCountdown/Base.lproj/SiriIntents.intentdefinition similarity index 98% rename from LeCountdown/en.lproj/SiriIntents.intentdefinition rename to LeCountdown/Base.lproj/SiriIntents.intentdefinition index 2116907..f44c4ab 100644 --- a/LeCountdown/en.lproj/SiriIntents.intentdefinition +++ b/LeCountdown/Base.lproj/SiriIntents.intentdefinition @@ -34,7 +34,7 @@ INIntentParameterCombinationIsPrimary INIntentParameterCombinationSubtitle - Starts immediately + Starts immediately INIntentParameterCombinationSubtitleID r4Ikzx INIntentParameterCombinationSupportsBackgroundExecution @@ -95,7 +95,7 @@ INIntentResponseCodeFormatString - Your ${timer} has been launched + ${timer} has been launched INIntentResponseCodeFormatStringID E3Sz5n INIntentResponseCodeName diff --git a/LeCountdown/Conductor.swift b/LeCountdown/Conductor.swift index 31e40ef..6d165dd 100644 --- a/LeCountdown/Conductor.swift +++ b/LeCountdown/Conductor.swift @@ -10,6 +10,7 @@ import ActivityKit import BackgroundTasks import SwiftUI import Intents +import AudioToolbox enum BGTaskIdentifier : String { case refresh = "com.staxriver.lecountdown.refresh" @@ -207,6 +208,7 @@ class Conductor: ObservableObject { if let coolSound { self.playSound(coolSound) + AudioServicesPlayAlertSound(SystemSoundID(kSystemSoundID_Vibrate)) } else { print("No sound to play!") } diff --git a/LeCountdown/Views/Countdown/NewCountdownView.swift b/LeCountdown/Views/Countdown/NewCountdownView.swift index 1d79e5a..7b53af6 100644 --- a/LeCountdown/Views/Countdown/NewCountdownView.swift +++ b/LeCountdown/Views/Countdown/NewCountdownView.swift @@ -304,9 +304,9 @@ struct CountdownEditView : View { dismiss() } - if self.preset != nil { +// if self.preset != nil { self.tabSelection?.wrappedValue = 1 - } +// } } diff --git a/LeCountdown/Views/Stopwatch/NewStopwatchView.swift b/LeCountdown/Views/Stopwatch/NewStopwatchView.swift index 6c95477..d178350 100644 --- a/LeCountdown/Views/Stopwatch/NewStopwatchView.swift +++ b/LeCountdown/Views/Stopwatch/NewStopwatchView.swift @@ -287,7 +287,6 @@ struct StopwatchEditView: View { } self.tabSelection?.wrappedValue = 1 - } fileprivate func _delete() { diff --git a/LeCountdown/fr.lproj/Localizable.strings b/LeCountdown/fr.lproj/Localizable.strings index b2265a5..4cd3ae8 100644 --- a/LeCountdown/fr.lproj/Localizable.strings +++ b/LeCountdown/fr.lproj/Localizable.strings @@ -1,5 +1,5 @@ /* No comment provided by engineer. */ -".create countdown" = ".Créer minuteur"; +".create countdown" = ".Créer un minuteur"; /* No comment provided by engineer. */ ".create stopwatch" = ".Créer un chrono"; @@ -238,4 +238,11 @@ /* No comment provided by engineer. */ "Your (duration.minuteSecond) countdown is over!" = "Votre minuteur de (duration.minuteSecond) est terminé !"; -"Launch ${timer}" = "Démarrer ${timer}"; +"Launch" = "Démarrer"; + +"Launch Timer" = "Démarrer un compteur"; +"Launch timers and stopwatches" = "Démarre des minuteurs et chronos"; +"Timer" = "Compteur"; +"Starts immediately" = "Démarre immédiatement"; +"Launch ${timer}" = "Démarre ${timer}"; +"${timer} has been launched" = "${timer} a démarré"; diff --git a/LeCountdown/fr.lproj/SiriIntents.strings b/LeCountdown/fr.lproj/SiriIntents.strings new file mode 100644 index 0000000..623b095 --- /dev/null +++ b/LeCountdown/fr.lproj/SiriIntents.strings @@ -0,0 +1,7 @@ + +"Launch Timer" = "Démarrer un compteur"; +"Launch timers and stopwatches" = "Démarre des minuteurs et chronos"; +"Timer" = "Compteur"; +"Starts immediately" = "Démarre immédiatement"; +"Launch ${timer}" = "Démarre ${timer}"; +"${timer} has been launched" = "${timer} a démarré";