diff --git a/Onyx.xcodeproj/project.pbxproj b/Onyx.xcodeproj/project.pbxproj index 3cee73e..eec3382 100644 --- a/Onyx.xcodeproj/project.pbxproj +++ b/Onyx.xcodeproj/project.pbxproj @@ -12,6 +12,7 @@ 1C17FA5C3C6B3938F95B9440 /* OnboardingWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5FCD3B382484AE4E9EF2F4B6 /* OnboardingWindowController.swift */; }; 1E2D654EFDDF55AEA75DBB7C /* WeatherProvider in Frameworks */ = {isa = PBXBuildFile; productRef = D4578EB64F7A3372B49BC50C /* WeatherProvider */; }; 2BB6AFD10DFB13FC4467BE6B /* SMCAccess.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4D6DE2FA3022423D80A867C9 /* SMCAccess.swift */; }; + 3636D37F49B08DF6221A2C39 /* WidgetOptionsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16F2B1B9A74594526F34F5C9 /* WidgetOptionsView.swift */; }; 378A5A417112CCB31EF3F774 /* OnyxNotch in Frameworks */ = {isa = PBXBuildFile; productRef = 3A32CAE6CC4D01D660F0016F /* OnyxNotch */; }; 3991CB2BF41C6C014EF4528F /* chip.svg in Resources */ = {isa = PBXBuildFile; fileRef = 085D860E654E09E4CD6E535A /* chip.svg */; }; 39E29ADC71D4860543AD25EB /* SettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45BD2DF1B775C733C8F75635 /* SettingsView.swift */; }; @@ -56,6 +57,7 @@ 055263008CB3306A8D09E6D4 /* AppIcon.icon */ = {isa = PBXFileReference; lastKnownFileType = wrapper.icon; path = AppIcon.icon; sourceTree = ""; }; 0804288DC4A8146DD9F3FC3E /* Onyx.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Onyx.app; sourceTree = BUILT_PRODUCTS_DIR; }; 085D860E654E09E4CD6E535A /* chip.svg */ = {isa = PBXFileReference; path = chip.svg; sourceTree = ""; }; + 16F2B1B9A74594526F34F5C9 /* WidgetOptionsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WidgetOptionsView.swift; sourceTree = ""; }; 1E6A1C208C7EA56971A055E1 /* graphic-card.svg */ = {isa = PBXFileReference; path = "graphic-card.svg"; sourceTree = ""; }; 24ADD22F5CE30B27020B479B /* MenuBarIcon.svg */ = {isa = PBXFileReference; path = MenuBarIcon.svg; sourceTree = ""; }; 41C778876BEF3D8B04F7C3C9 /* LaunchAtLogin.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LaunchAtLogin.swift; sourceTree = ""; }; @@ -177,6 +179,7 @@ 45BD2DF1B775C733C8F75635 /* SettingsView.swift */, 8E43384BA603C866D148D9D8 /* SettingsWindowController.swift */, 8BCDFD427ACD83B8AA7BA39E /* sound-waves.svg */, + 16F2B1B9A74594526F34F5C9 /* WidgetOptionsView.swift */, ); path = Onyx; sourceTree = ""; @@ -354,6 +357,7 @@ 9C2E419014B7E04630FDF151 /* OnyxApp.swift in Sources */, 39E29ADC71D4860543AD25EB /* SettingsView.swift in Sources */, 0B27E91E0F9BF29005B0ED64 /* SettingsWindowController.swift in Sources */, + 3636D37F49B08DF6221A2C39 /* WidgetOptionsView.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/Onyx/Localizable.xcstrings b/Onyx/Localizable.xcstrings index fb8f3ef..2156b9f 100644 --- a/Onyx/Localizable.xcstrings +++ b/Onyx/Localizable.xcstrings @@ -1,2015 +1,2271 @@ { - "sourceLanguage" : "en", - "strings" : { - "%@" : { - "comment" : "A label showing the minimum RPM of a fan.", - "isCommentAutoGenerated" : true, - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "%@" + "sourceLanguage": "en", + "strings": { + "%@": { + "comment": "A label showing the minimum RPM of a fan.", + "isCommentAutoGenerated": true, + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "%@" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "%@" + "en": { + "stringUnit": { + "state": "translated", + "value": "%@" } } } }, - "%@ °C" : { - "comment" : "A label showing the temperature of the hottest fan in the report, in degrees Celsius. The argument is the temperature in degrees Celsius.", - "isCommentAutoGenerated" : true, - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "%@ °C" + "%@ U/min": { + "comment": "A label that shows the current speed of a fan. The argument is the current speed of the fan.", + "isCommentAutoGenerated": true, + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "%@ U/min" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "%@ °C" + "en": { + "stringUnit": { + "state": "translated", + "value": "%@ U/min" } } } }, - "%@ U/min" : { - "comment" : "A label that shows the current speed of a fan. The argument is the current speed of the fan.", - "isCommentAutoGenerated" : true, - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "%@ U/min" + "%@ °C": { + "comment": "A label showing the temperature of the hottest fan in the report, in degrees Celsius. The argument is the temperature in degrees Celsius.", + "isCommentAutoGenerated": true, + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "%@ °C" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "%@ U/min" + "en": { + "stringUnit": { + "state": "translated", + "value": "%@ °C" } } } }, - "%@°" : { - "comment" : "A temperature in °C.", - "isCommentAutoGenerated" : true, - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "%@°" + "%@°": { + "comment": "A temperature in °C.", + "isCommentAutoGenerated": true, + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "%@°" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "%@°" + "en": { + "stringUnit": { + "state": "translated", + "value": "%@°" } } } }, - "charge.limit" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Ladelimit" + "charge.limit": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Ladelimit" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Charge limit" + "en": { + "stringUnit": { + "state": "translated", + "value": "Charge limit" } } } }, - "charge.limit.hint" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Ein Akku, der dauerhaft bei 100 % am Netz hängt, altert schneller. 80 bis 100 % ist der Bereich, den macOS selbst anbietet — darunter ist für dieses Gerät ungemessen." + "charge.limit.hint": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Ein Akku, der dauerhaft bei 100 % am Netz hängt, altert schneller. 80 bis 100 % ist der Bereich, den macOS selbst anbietet — darunter ist für dieses Gerät ungemessen." } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "A battery kept at 100 % on power ages faster. 80 to 100 % is the range macOS itself offers — below that is untested for this machine." + "en": { + "stringUnit": { + "state": "translated", + "value": "A battery kept at 100 % on power ages faster. 80 to 100 % is the range macOS itself offers — below that is untested for this machine." } } } }, - "charge.limit.off" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Aus" + "charge.limit.off": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Aus" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Off" + "en": { + "stringUnit": { + "state": "translated", + "value": "Off" } } } }, - "charge.section" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Akku" + "charge.section": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Akku" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Battery" + "en": { + "stringUnit": { + "state": "translated", + "value": "Battery" } } } }, - "fans.approval.needed" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "macOS wartet auf deine Freigabe. Öffne die Systemeinstellungen und erlaube den Hintergrunddienst von Onyx." + "fans.approval.needed": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "macOS wartet auf deine Freigabe. Öffne die Systemeinstellungen und erlaube den Hintergrunddienst von Onyx." } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "macOS is waiting for your approval. Open System Settings and allow Onyx's background service." + "en": { + "stringUnit": { + "state": "translated", + "value": "macOS is waiting for your approval. Open System Settings and allow Onyx's background service." } } } }, - "fans.approval.open" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Systemeinstellungen öffnen" + "fans.approval.open": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Systemeinstellungen öffnen" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Open System Settings" + "en": { + "stringUnit": { + "state": "translated", + "value": "Open System Settings" } } } }, - "fans.approval.recheck" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Erneut prüfen" + "fans.approval.recheck": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Erneut prüfen" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Check again" + "en": { + "stringUnit": { + "state": "translated", + "value": "Check again" } } } }, - "fans.auto" : { - "comment" : "A button to set a fan to automatic mode.", - "isCommentAutoGenerated" : true, - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Auto" + "fans.auto": { + "comment": "A button to set a fan to automatic mode.", + "isCommentAutoGenerated": true, + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Auto" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Auto" + "en": { + "stringUnit": { + "state": "translated", + "value": "Auto" } } } }, - "fans.connecting" : { - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Verbinde mit dem Hilfsdienst …" + "fans.connecting": { + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Verbinde mit dem Hilfsdienst …" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Connecting to the helper…" + "en": { + "stringUnit": { + "state": "translated", + "value": "Connecting to the helper…" } } } }, - "fans.fan %@" : { - "comment" : "A label showing the index of a fan. The argument is the index of the fan.", - "isCommentAutoGenerated" : true, - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Lüfter %@" + "fans.fan %@": { + "comment": "A label showing the index of a fan. The argument is the index of the fan.", + "isCommentAutoGenerated": true, + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Lüfter %@" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Fan %@" + "en": { + "stringUnit": { + "state": "translated", + "value": "Fan %@" } } } }, - "fans.fan %lld" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Lüfter %lld" + "fans.fan %lld": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Lüfter %lld" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Fan %lld" + "en": { + "stringUnit": { + "state": "translated", + "value": "Fan %lld" } } } }, - "fans.hottest" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Wärmster Kern" + "fans.hottest": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Wärmster Kern" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Hottest core" + "en": { + "stringUnit": { + "state": "translated", + "value": "Hottest core" } } } }, - "fans.install" : { - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Installieren" + "fans.install": { + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Installieren" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Install" + "en": { + "stringUnit": { + "state": "translated", + "value": "Install" } } } }, - "fans.intro" : { - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Onyx kann die Lüfterdrehzahl fest vorgeben, statt sie macOS zu überlassen. Dafür wird ein Hilfsdienst mit Systemrechten eingerichtet — Schreibzugriff auf den SMC geht nicht anders." + "fans.intro": { + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Onyx kann die Lüfterdrehzahl fest vorgeben, statt sie macOS zu überlassen. Dafür wird ein Hilfsdienst mit Systemrechten eingerichtet — Schreibzugriff auf den SMC geht nicht anders." } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Onyx can set a fixed fan speed instead of leaving it to macOS. This requires a helper service with system privileges — writing to the SMC is not possible otherwise." + "en": { + "stringUnit": { + "state": "translated", + "value": "Onyx can set a fixed fan speed instead of leaving it to macOS. This requires a helper service with system privileges — writing to the SMC is not possible otherwise." } } } }, - "fans.left" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Lüfter links" + "fans.left": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Lüfter links" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Left fan" + "en": { + "stringUnit": { + "state": "translated", + "value": "Left fan" } } } }, - "fans.manual" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Manuell" + "fans.manual": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Manuell" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Manual" + "en": { + "stringUnit": { + "state": "translated", + "value": "Manual" } } } }, - "fans.menubar.short" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Lüfter" + "fans.menubar.short": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Lüfter" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Fan" + "en": { + "stringUnit": { + "state": "translated", + "value": "Fan" } } } }, - "fans.mode.auto" : { - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Automatik" + "fans.mode.auto": { + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Automatik" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Automatic" + "en": { + "stringUnit": { + "state": "translated", + "value": "Automatic" } } } }, - "fans.mode.manual" : { - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Manuell" + "fans.mode.manual": { + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Manuell" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Manual" + "en": { + "stringUnit": { + "state": "translated", + "value": "Manual" } } } }, - "fans.noData" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Noch keine Lüfterdaten." + "fans.noData": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Noch keine Lüfterdaten." } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "No fan data yet." + "en": { + "stringUnit": { + "state": "translated", + "value": "No fan data yet." } } } }, - "fans.noRange" : { - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Kein Regelbereich" + "fans.noRange": { + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Kein Regelbereich" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "No adjustable range" + "en": { + "stringUnit": { + "state": "translated", + "value": "No adjustable range" } } } }, - "fans.notInstalled" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Die Lüftersteuerung braucht einen kleinen privilegierten Dienst." + "fans.notInstalled": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Die Lüftersteuerung braucht einen kleinen privilegierten Dienst." } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Fan control needs a small privileged service." + "en": { + "stringUnit": { + "state": "translated", + "value": "Fan control needs a small privileged service." } } } }, - "fans.reason.noTemperature" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Zurück auf Automatik: keine Temperatur messbar, damit lässt sich Sicherheit nicht beurteilen." + "fans.reason.noTemperature": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Zurück auf Automatik: keine Temperatur messbar, damit lässt sich Sicherheit nicht beurteilen." } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Back to automatic: no temperature reading, so safety cannot be judged." + "en": { + "stringUnit": { + "state": "translated", + "value": "Back to automatic: no temperature reading, so safety cannot be judged." } } } }, - "fans.reason.other" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Zurück auf Automatik." + "fans.reason.other": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Zurück auf Automatik." } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Back to automatic." + "en": { + "stringUnit": { + "state": "translated", + "value": "Back to automatic." } } } }, - "fans.reason.temperature" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Zurück auf Automatik: zu heiß für eine feste Drehzahl." + "fans.reason.temperature": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Zurück auf Automatik: zu heiß für eine feste Drehzahl." } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Back to automatic: too hot for a fixed speed." + "en": { + "stringUnit": { + "state": "translated", + "value": "Back to automatic: too hot for a fixed speed." } } } }, - "fans.reason.unknownLimits" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Zurück auf Automatik: der erlaubte Drehzahlbereich ist nicht lesbar." + "fans.reason.unknownLimits": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Zurück auf Automatik: der erlaubte Drehzahlbereich ist nicht lesbar." } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Back to automatic: the permitted speed range cannot be read." + "en": { + "stringUnit": { + "state": "translated", + "value": "Back to automatic: the permitted speed range cannot be read." } } } }, - "fans.reason.watchdog" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Zurück auf Automatik: Onyx hat sich zu lange nicht gemeldet." + "fans.reason.watchdog": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Zurück auf Automatik: Onyx hat sich zu lange nicht gemeldet." } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Back to automatic: Onyx went silent for too long." + "en": { + "stringUnit": { + "state": "translated", + "value": "Back to automatic: Onyx went silent for too long." } } } }, - "fans.right" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Lüfter rechts" + "fans.right": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Lüfter rechts" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Right fan" + "en": { + "stringUnit": { + "state": "translated", + "value": "Right fan" } } } }, - "fans.rpm %@" : { - "comment" : "A label displaying the current RPM of a fan. The argument is the current RPM.", - "isCommentAutoGenerated" : true + "fans.rpm %@": { + "comment": "A label displaying the current RPM of a fan. The argument is the current RPM.", + "isCommentAutoGenerated": true }, - "fans.rpm %lld" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "%lld U/min" + "fans.rpm %lld": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "%lld U/min" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "%lld rpm" + "en": { + "stringUnit": { + "state": "translated", + "value": "%lld rpm" } } } }, - "fans.safety" : { - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Deshalb greift ein Sicherheitsnetz, das sich nicht abschalten lässt: nie unter das Minimum der Firmware, Rückfall auf Automatik ab 95 °C, Rückfall wenn Onyx sich fünf Sekunden nicht meldet, und Rückfall beim Beenden." + "fans.safety": { + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Deshalb greift ein Sicherheitsnetz, das sich nicht abschalten lässt: nie unter das Minimum der Firmware, Rückfall auf Automatik ab 95 °C, Rückfall wenn Onyx sich fünf Sekunden nicht meldet, und Rückfall beim Beenden." } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "A safety net you cannot switch off is therefore always active: never below the firmware minimum, back to automatic above 95 °C, back to automatic if Onyx goes silent for five seconds, and back to automatic on quit." + "en": { + "stringUnit": { + "state": "translated", + "value": "A safety net you cannot switch off is therefore always active: never below the firmware minimum, back to automatic above 95 °C, back to automatic if Onyx goes silent for five seconds, and back to automatic on quit." } } } }, - "fans.safety.active" : { - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Das Sicherheitsnetz läuft im Hilfsdienst, nicht in Onyx. Es greift auch dann, wenn Onyx abstürzt oder beendet wird." + "fans.safety.active": { + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Das Sicherheitsnetz läuft im Hilfsdienst, nicht in Onyx. Es greift auch dann, wenn Onyx abstürzt oder beendet wird." } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "The safety net runs in the helper, not in Onyx. It works even if Onyx crashes or is quit." + "en": { + "stringUnit": { + "state": "translated", + "value": "The safety net runs in the helper, not in Onyx. It works even if Onyx crashes or is quit." } } } }, - "fans.uninstall" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Hilfsdienst entfernen" + "fans.uninstall": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Hilfsdienst entfernen" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Remove helper" + "en": { + "stringUnit": { + "state": "translated", + "value": "Remove helper" } } } }, - "fans.warning" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Eine zu niedrige Drehzahl kann den Rechner überhitzen lassen. Die Automatik regelt nach Temperatur, ein fester Wert nicht." + "fans.warning": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Eine zu niedrige Drehzahl kann den Rechner überhitzen lassen. Die Automatik regelt nach Temperatur, ein fester Wert nicht." } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "A fan speed set too low can let the Mac overheat. The automatic control adjusts to temperature; a fixed value does not." + "en": { + "stringUnit": { + "state": "translated", + "value": "A fan speed set too low can let the Mac overheat. The automatic control adjusts to temperature; a fixed value does not." } } } }, - "menu.openPanel" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Panel öffnen" + "menu.openPanel": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Panel öffnen" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Open Panel" + "en": { + "stringUnit": { + "state": "translated", + "value": "Open Panel" } } } }, - "menu.quit" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Onyx beenden" + "menu.quit": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Onyx beenden" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Quit Onyx" + "en": { + "stringUnit": { + "state": "translated", + "value": "Quit Onyx" } } } }, - "menu.settings" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Einstellungen …" + "menu.settings": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Einstellungen …" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Settings…" + "en": { + "stringUnit": { + "state": "translated", + "value": "Settings…" } } } }, - "metric.battery" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Akku" + "metric.battery": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Akku" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Battery" + "en": { + "stringUnit": { + "state": "translated", + "value": "Battery" } } } }, - "metric.cpu" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "CPU" + "metric.cpu": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "CPU" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "CPU" + "en": { + "stringUnit": { + "state": "translated", + "value": "CPU" } } } }, - "metric.gpu" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "GPU" + "metric.gpu": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "GPU" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "GPU" + "en": { + "stringUnit": { + "state": "translated", + "value": "GPU" } } } }, - "metric.memory" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Speicher" + "metric.memory": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Speicher" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Memory" + "en": { + "stringUnit": { + "state": "translated", + "value": "Memory" } } } }, - "metric.mode.temperature" : { - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Temperatur" + "metric.mode.temperature": { + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Temperatur" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Temperature" + "en": { + "stringUnit": { + "state": "translated", + "value": "Temperature" } } } }, - "metric.mode.usage" : { - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Auslastung" + "metric.mode.usage": { + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Auslastung" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Usage" + "en": { + "stringUnit": { + "state": "translated", + "value": "Usage" } } } }, - "metric.sensors" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Sensoren" + "metric.sensors": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Sensoren" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Sensors" + "en": { + "stringUnit": { + "state": "translated", + "value": "Sensors" } } } }, - "mixer.menubar.name" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Lautstärkemixer" + "mixer.menubar.name": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Lautstärkemixer" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Volume mixer" + "en": { + "stringUnit": { + "state": "translated", + "value": "Volume mixer" } } } }, - "mixer.menubar.short" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Mix" + "mixer.menubar.short": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Mix" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Mix" + "en": { + "stringUnit": { + "state": "translated", + "value": "Mix" } } } }, - "network.name" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Netzwerk" + "network.name": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Netzwerk" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Network" + "en": { + "stringUnit": { + "state": "translated", + "value": "Network" } } } }, - "onboarding.allow" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Erlauben" + "onboarding.allow": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Erlauben" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Allow" + "en": { + "stringUnit": { + "state": "translated", + "value": "Allow" } } } }, - "onboarding.audio" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Systemton" + "onboarding.audio": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Systemton" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "System audio" + "en": { + "stringUnit": { + "state": "translated", + "value": "System audio" } } } }, - "onboarding.audio.why" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Nötig für die Lautstärke einzelner Programme. Onyx leitet den Ton der geregelten Programme um — und nur deren." + "onboarding.audio.why": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Nötig für die Lautstärke einzelner Programme. Onyx leitet den Ton der geregelten Programme um — und nur deren." } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Needed for per-app volume. Onyx routes the audio of the apps you control, and only those." + "en": { + "stringUnit": { + "state": "translated", + "value": "Needed for per-app volume. Onyx routes the audio of the apps you control, and only those." } } } }, - "onboarding.calendar" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Kalender" + "onboarding.calendar": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Kalender" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Calendar" + "en": { + "stringUnit": { + "state": "translated", + "value": "Calendar" } } } }, - "onboarding.calendar.why" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Zeigt deine Termine im Panel. Nur lesend — Onyx ändert nie einen Kalender." + "onboarding.calendar.why": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Zeigt deine Termine im Panel. Nur lesend — Onyx ändert nie einen Kalender." } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Shows your appointments in the panel. Read-only — Onyx never changes a calendar." + "en": { + "stringUnit": { + "state": "translated", + "value": "Shows your appointments in the panel. Read-only — Onyx never changes a calendar." } } } }, - "onboarding.done" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Fertig" + "onboarding.done": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Fertig" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Done" + "en": { + "stringUnit": { + "state": "translated", + "value": "Done" } } } }, - "onboarding.helper" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Lüftersteuerung" + "onboarding.helper": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Lüftersteuerung" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Fan control" + "en": { + "stringUnit": { + "state": "translated", + "value": "Fan control" } } } }, - "onboarding.helper.why" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Installiert einen kleinen privilegierten Dienst. Er setzt nur Lüfterdrehzahlen und fällt auf Automatik zurück, wenn Onyx schweigt." + "onboarding.helper.why": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Installiert einen kleinen privilegierten Dienst. Er setzt nur Lüfterdrehzahlen und fällt auf Automatik zurück, wenn Onyx schweigt." } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Installs a small privileged service. It only sets fan speeds and falls back to automatic if Onyx goes silent." + "en": { + "stringUnit": { + "state": "translated", + "value": "Installs a small privileged service. It only sets fan speeds and falls back to automatic if Onyx goes silent." } } } }, - "onboarding.launchAtLogin" : { - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Onyx beim Anmelden starten" + "onboarding.launchAtLogin": { + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Onyx beim Anmelden starten" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Start Onyx at login" + "en": { + "stringUnit": { + "state": "translated", + "value": "Start Onyx at login" } } } }, - "onboarding.location" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Standort" + "onboarding.location": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Standort" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Location" + "en": { + "stringUnit": { + "state": "translated", + "value": "Location" } } } }, - "onboarding.location.why" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Wetter für deinen Aufenthaltsort. Alternativ lässt sich je Widget ein fester Ort einstellen." + "onboarding.location.why": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Wetter für deinen Aufenthaltsort. Alternativ lässt sich je Widget ein fester Ort einstellen." } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Weather for where you are. You can also set a fixed place per widget instead." + "en": { + "stringUnit": { + "state": "translated", + "value": "Weather for where you are. You can also set a fixed place per widget instead." } } } }, - "onboarding.openSettings" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Systemeinstellungen öffnen" + "onboarding.openSettings": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Systemeinstellungen öffnen" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Open System Settings" + "en": { + "stringUnit": { + "state": "translated", + "value": "Open System Settings" } } } }, - "onboarding.subtitle" : { - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Onyx braucht vier Dinge vom System. Jedes für etwas anderes, und keines davon ist Pflicht — erlaube, was du nutzen möchtest." + "onboarding.subtitle": { + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Onyx braucht vier Dinge vom System. Jedes für etwas anderes, und keines davon ist Pflicht — erlaube, was du nutzen möchtest." } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Onyx needs four things from the system. Each one is for something different, and none of them is required — grant what you want to use." + "en": { + "stringUnit": { + "state": "translated", + "value": "Onyx needs four things from the system. Each one is for something different, and none of them is required — grant what you want to use." } } } }, - "onboarding.title" : { - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Willkommen bei Onyx" + "onboarding.title": { + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Willkommen bei Onyx" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Welcome to Onyx" + "en": { + "stringUnit": { + "state": "translated", + "value": "Welcome to Onyx" } } } }, - "settings.display.all" : { - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Allen Displays" + "options.calendar": { + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Kalender" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "All displays" + "en": { + "stringUnit": { + "state": "translated", + "value": "Calendar" } } } }, - "settings.display.builtInOnly" : { - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Nur dem internen Display" + "options.calendar.agenda": { + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Terminliste" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Built-in display only" + "en": { + "stringUnit": { + "state": "translated", + "value": "Upcoming events" } } } }, - "settings.display.dockIcon" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Symbol im Dock anzeigen" + "options.calendar.calendarrEvents %lld": { + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "%lld Termine aus Calendarr" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Show icon in the Dock" + "en": { + "stringUnit": { + "state": "translated", + "value": "%lld events from Calendarr" } } } }, - "settings.display.dockIcon.hint" : { - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Standardmäßig aus. Onyx lebt in der Notch und in der Menüleiste und hat kein Hauptfenster — im Dock wäre es ein Symbol, das beim Anklicken nichts öffnet, und es stünde im Programmumschalter zwischen den Programmen, mit denen du arbeitest." + "options.calendar.display": { + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Anzeige" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Off by default. Onyx lives in the notch and the menu bar and has no main window — in the Dock it would be an icon that opens nothing, and it would sit in the app switcher among the apps you actually work with." + "en": { + "stringUnit": { + "state": "translated", + "value": "Show" } } } }, - "settings.display.hint" : { - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Auf Displays ohne echte Notch erscheint oben mittig ein Balken, der sich genauso verhält. Ist der Deckel geschlossen und kein internes Display vorhanden, erscheint das Panel trotzdem auf einem externen — sonst wäre Onyx nicht erreichbar." + "options.calendar.month": { + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Monatsraster" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "On displays without a real notch, a bar appears at the top centre and behaves the same. With the lid closed and no built-in display present, the panel still appears on an external one — otherwise Onyx would be unreachable." + "en": { + "stringUnit": { + "state": "translated", + "value": "Month grid" } } } }, - "settings.display.menuBarIcon" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Symbol in der Menüleiste anzeigen" + "options.calendar.noneFound": { + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Noch keine Kalender — Zugriff erteilen oder Calendarr einmal öffnen." } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Show icon in the menu bar" + "en": { + "stringUnit": { + "state": "translated", + "value": "No calendars yet — grant access or open Calendarr once." } } } }, - "settings.display.menuBarIcon.hint" : { - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Über das Symbol erreichst du Panel, Einstellungen und Beenden. Ohne es kommst du nur über die Notch an Onyx heran." + "options.calendar.source": { + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Daten aus" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "The icon gives you the panel, settings and quit. Without it, the notch is the only way to reach Onyx." + "en": { + "stringUnit": { + "state": "translated", + "value": "Data from" } } } }, - "settings.display.policy" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Panel anzeigen auf" + "options.shelf": { + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Ablage" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Show panel on" + "en": { + "stringUnit": { + "state": "translated", + "value": "Shelf" } } } }, - "settings.general" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Allgemein" + "options.weather": { + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Wetter" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "General" + "en": { + "stringUnit": { + "state": "translated", + "value": "Weather" } } } }, - "settings.launchAtLogin" : { - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Beim Anmelden starten" + "options.weather.automatic": { + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Meinem Standort folgen" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Start at login" + "en": { + "stringUnit": { + "state": "translated", + "value": "Follow my location" } } } }, - "settings.launchAtLogin.blocked" : { - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Anmeldeobjekte wurden für Onyx in den Systemeinstellungen abgeschaltet." + "options.weather.needsLocation": { + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Der Ortungszugriff ist verweigert — unter Berechtigungen erteilen oder einen festen Ort wählen." } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Login items were turned off for Onyx in System Settings." + "en": { + "stringUnit": { + "state": "translated", + "value": "Location access is denied — grant it under Permissions, or set a fixed place." } } } }, - "settings.menubar.bars" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Balken" + "options.weather.notFound": { + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Dazu wurde kein Ort gefunden." } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Bars" + "en": { + "stringUnit": { + "state": "translated", + "value": "No place found for that." } } } }, - "settings.menubar.graph" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Verlauf" + "options.weather.place": { + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Fester Ort" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Graph" + "en": { + "stringUnit": { + "state": "translated", + "value": "Fixed place" } } } }, - "settings.menubar.hint" : { - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Jedes Modul erscheint als eigenes Symbol in der Menüleiste und teilt sich die Messung mit dem Widget im Panel. Standardmäßig ist keines an — die Menüleiste ist knapp, auf einem Notch-Display zusätzlich in der Mitte blockiert." + "options.weather.search": { + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Stadt oder Postleitzahl" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Each module appears as its own menu bar icon and shares its measurement with the panel widget. None are on by default — the menu bar is tight, and on a notched display the middle is blocked as well." + "en": { + "stringUnit": { + "state": "translated", + "value": "City or postcode" } } } }, - "settings.menubar.labelAndValue" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Kürzel + Wert" + "options.weather.set": { + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Übernehmen" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Label + value" + "en": { + "stringUnit": { + "state": "translated", + "value": "Use" } } } }, - "settings.menubar.sensor" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Sensor" + "settings.display.all": { + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Allen Displays" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Sensor" + "en": { + "stringUnit": { + "state": "translated", + "value": "All displays" } } } }, - "settings.menubar.sensor.hottest" : { - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Wärmster Punkt" + "settings.display.builtInOnly": { + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Nur dem internen Display" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Hottest point" + "en": { + "stringUnit": { + "state": "translated", + "value": "Built-in display only" } } } }, - "settings.menubar.symbol" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Nur Symbol" + "settings.display.dockIcon": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Symbol im Dock anzeigen" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Symbol only" + "en": { + "stringUnit": { + "state": "translated", + "value": "Show icon in the Dock" } } } }, - "settings.menubar.symbolAndValue" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Symbol + Wert" + "settings.display.dockIcon.hint": { + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Standardmäßig aus. Onyx lebt in der Notch und in der Menüleiste und hat kein Hauptfenster — im Dock wäre es ein Symbol, das beim Anklicken nichts öffnet, und es stünde im Programmumschalter zwischen den Programmen, mit denen du arbeitest." } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Symbol + value" + "en": { + "stringUnit": { + "state": "translated", + "value": "Off by default. Onyx lives in the notch and the menu bar and has no main window — in the Dock it would be an icon that opens nothing, and it would sit in the app switcher among the apps you actually work with." } } } }, - "settings.menubar.value" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Wert" + "settings.display.hint": { + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Auf Displays ohne echte Notch erscheint oben mittig ein Balken, der sich genauso verhält. Ist der Deckel geschlossen und kein internes Display vorhanden, erscheint das Panel trotzdem auf einem externen — sonst wäre Onyx nicht erreichbar." } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Value" + "en": { + "stringUnit": { + "state": "translated", + "value": "On displays without a real notch, a bar appears at the top centre and behaves the same. With the lid closed and no built-in display present, the panel still appears on an external one — otherwise Onyx would be unreachable." } } } }, - "settings.menubar.valueAndGraph" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Wert und Verlauf" + "settings.display.menuBarIcon": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Symbol in der Menüleiste anzeigen" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Value and graph" + "en": { + "stringUnit": { + "state": "translated", + "value": "Show icon in the menu bar" } } } }, - "settings.onboarding.show" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Einrichtung erneut zeigen" + "settings.display.menuBarIcon.hint": { + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Über das Symbol erreichst du Panel, Einstellungen und Beenden. Ohne es kommst du nur über die Notch an Onyx heran." } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Show setup again" + "en": { + "stringUnit": { + "state": "translated", + "value": "The icon gives you the panel, settings and quit. Without it, the notch is the only way to reach Onyx." } } } }, - "settings.permissions.calendar" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Kalender" + "settings.display.policy": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Panel anzeigen auf" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Calendar" + "en": { + "stringUnit": { + "state": "translated", + "value": "Show panel on" } } } }, - "settings.permissions.calendar.why" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Onyx zeigt deine Termine im Kalender-Widget an. Es wird ausschließlich gelesen, nie geschrieben." + "settings.general": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Allgemein" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Onyx shows your events in the calendar widget. It only ever reads, never writes." + "en": { + "stringUnit": { + "state": "translated", + "value": "General" } } } }, - "settings.permissions.granted" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Erteilt" + "settings.launchAtLogin": { + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Beim Anmelden starten" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Granted" + "en": { + "stringUnit": { + "state": "translated", + "value": "Start at login" } } } }, - "settings.permissions.location" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Standort" + "settings.launchAtLogin.blocked": { + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Anmeldeobjekte wurden für Onyx in den Systemeinstellungen abgeschaltet." } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Location" + "en": { + "stringUnit": { + "state": "translated", + "value": "Login items were turned off for Onyx in System Settings." } } } }, - "settings.permissions.location.why" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Onyx zeigt das Wetter an deinem aktuellen Standort. Ohne Zugriff kannst du stattdessen einen festen Ort wählen." + "settings.menubar.bars": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Balken" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Onyx shows the weather for your current location. Without access you can pick a fixed place instead." + "en": { + "stringUnit": { + "state": "translated", + "value": "Bars" } } } }, - "settings.permissions.openSystem" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Systemeinstellungen öffnen" + "settings.menubar.graph": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Verlauf" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Open System Settings" + "en": { + "stringUnit": { + "state": "translated", + "value": "Graph" } } } }, - "settings.permissions.request" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Anfragen" + "settings.menubar.hint": { + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Jedes Modul erscheint als eigenes Symbol in der Menüleiste und teilt sich die Messung mit dem Widget im Panel. Standardmäßig ist keines an — die Menüleiste ist knapp, auf einem Notch-Display zusätzlich in der Mitte blockiert." } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Request" + "en": { + "stringUnit": { + "state": "translated", + "value": "Each module appears as its own menu bar icon and shares its measurement with the panel widget. None are on by default — the menu bar is tight, and on a notched display the middle is blocked as well." } } } }, - "settings.shelf.cleanup" : { - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Automatisch löschen" + "settings.menubar.labelAndValue": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Kürzel + Wert" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Delete automatically" + "en": { + "stringUnit": { + "state": "translated", + "value": "Label + value" } } } }, - "settings.shelf.count %@" : { - "comment" : "A label showing the number of items in the shelf. The argument is the number of items in the shelf.", - "isCommentAutoGenerated" : true, - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "%@ Dateien abgelegt" + "settings.menubar.sensor": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Sensor" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "%@ files parked" + "en": { + "stringUnit": { + "state": "translated", + "value": "Sensor" } } } }, - "settings.shelf.count %lld" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "%lld Dateien abgelegt" + "settings.menubar.sensor.hottest": { + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Wärmster Punkt" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "%lld files parked" + "en": { + "stringUnit": { + "state": "translated", + "value": "Hottest point" } } } }, - "settings.shelf.days %@" : { - "comment" : "A label that lets the user select how many days to wait before automatically removing items from the shelf. The argument is the number of days.", - "isCommentAutoGenerated" : true, - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Nach %@ Tagen" + "settings.menubar.symbol": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Nur Symbol" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "After %@ days" + "en": { + "stringUnit": { + "state": "translated", + "value": "Symbol only" } } } }, - "settings.shelf.days %lld" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Nach %lld Tagen" + "settings.menubar.symbolAndValue": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Symbol + Wert" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "After %lld days" + "en": { + "stringUnit": { + "state": "translated", + "value": "Symbol + value" } } } }, - "settings.shelf.never" : { - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Nie" + "settings.menubar.value": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Wert" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Never" + "en": { + "stringUnit": { + "state": "translated", + "value": "Value" } } } }, - "settings.shelf.reveal" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Im Finder zeigen" + "settings.menubar.valueAndGraph": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Wert und Verlauf" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Show in Finder" + "en": { + "stringUnit": { + "state": "translated", + "value": "Value and graph" } } } }, - "settings.shelf.title" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Ablage" + "settings.onboarding.show": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Einrichtung erneut zeigen" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Shelf" + "en": { + "stringUnit": { + "state": "translated", + "value": "Show setup again" } } } }, - "settings.size.large" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Groß (2×2)" + "settings.permissions.calendar": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Kalender" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Large (2×2)" + "en": { + "stringUnit": { + "state": "translated", + "value": "Calendar" } } } }, - "settings.size.medium" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Mittel (2×1)" + "settings.permissions.calendar.why": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Onyx zeigt deine Termine im Kalender-Widget an. Es wird ausschließlich gelesen, nie geschrieben." } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Medium (2×1)" + "en": { + "stringUnit": { + "state": "translated", + "value": "Onyx shows your events in the calendar widget. It only ever reads, never writes." } } } }, - "settings.size.small" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Klein (1×1)" + "settings.permissions.granted": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Erteilt" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Small (1×1)" + "en": { + "stringUnit": { + "state": "translated", + "value": "Granted" } } } }, - "settings.size.wide" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Breit (4×1)" + "settings.permissions.location": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Standort" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Wide (4×1)" + "en": { + "stringUnit": { + "state": "translated", + "value": "Location" } } } }, - "settings.tab.display" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Anzeige" + "settings.permissions.location.why": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Onyx zeigt das Wetter an deinem aktuellen Standort. Ohne Zugriff kannst du stattdessen einen festen Ort wählen." } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Display" + "en": { + "stringUnit": { + "state": "translated", + "value": "Onyx shows the weather for your current location. Without access you can pick a fixed place instead." } } } }, - "settings.tab.fans" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Lüfter" + "settings.permissions.openSystem": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Systemeinstellungen öffnen" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Fans" + "en": { + "stringUnit": { + "state": "translated", + "value": "Open System Settings" } } } }, - "settings.tab.menubar" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Menüleiste" + "settings.permissions.request": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Anfragen" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Menu bar" + "en": { + "stringUnit": { + "state": "translated", + "value": "Request" } } } }, - "settings.tab.permissions" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Berechtigungen" + "settings.shelf.cleanup": { + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Automatisch löschen" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Permissions" + "en": { + "stringUnit": { + "state": "translated", + "value": "Delete automatically" } } } }, - "settings.tab.sources" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Quellen" + "settings.shelf.count %@": { + "comment": "A label showing the number of items in the shelf. The argument is the number of items in the shelf.", + "isCommentAutoGenerated": true, + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "%@ Dateien abgelegt" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Sources" + "en": { + "stringUnit": { + "state": "translated", + "value": "%@ files parked" } } } }, - "settings.tab.widgets" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Widgets" + "settings.shelf.count %lld": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "%lld Dateien abgelegt" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Widgets" + "en": { + "stringUnit": { + "state": "translated", + "value": "%lld files parked" } } } }, - "settings.widgets.add" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Hinzufügen" + "settings.shelf.days %@": { + "comment": "A label that lets the user select how many days to wait before automatically removing items from the shelf. The argument is the number of days.", + "isCommentAutoGenerated": true, + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Nach %@ Tagen" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Add" + "en": { + "stringUnit": { + "state": "translated", + "value": "After %@ days" } } } }, - "settings.widgets.available" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Verfügbar" + "settings.shelf.days %lld": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Nach %lld Tagen" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Available" + "en": { + "stringUnit": { + "state": "translated", + "value": "After %lld days" } } } }, - "settings.widgets.empty" : { - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Keine Widgets im Panel. Das Panel bleibt leer, bis du eins hinzufügst." + "settings.shelf.never": { + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Nie" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "No widgets in the panel. It stays empty until you add one." + "en": { + "stringUnit": { + "state": "translated", + "value": "Never" } } } }, - "settings.widgets.hint" : { - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Die Reihenfolge bestimmt die Anordnung im Panel. Jedes Widget rückt an die erste Stelle, an die es passt." + "settings.shelf.reveal": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Im Finder zeigen" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "The order determines the arrangement in the panel. Each widget takes the first spot it fits into." + "en": { + "stringUnit": { + "state": "translated", + "value": "Show in Finder" } } } }, - "settings.widgets.hint.order" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Alle Kacheln sind gleich groß. Die Reihenfolge hier ist die Reihenfolge im Panel — zum Sortieren ziehen." + "settings.shelf.title": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Ablage" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "All tiles are the same size. The order here is the order in the panel — drag to sort." + "en": { + "stringUnit": { + "state": "translated", + "value": "Shelf" } } } }, - "settings.widgets.inPanel" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Im Panel" + "settings.size.large": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Groß (2×2)" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "In the panel" + "en": { + "stringUnit": { + "state": "translated", + "value": "Large (2×2)" } } } }, - "settings.widgets.remove" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Aus dem Panel entfernen" + "settings.size.medium": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Mittel (2×1)" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Remove from panel" + "en": { + "stringUnit": { + "state": "translated", + "value": "Medium (2×1)" } } } }, - "widget.fans.name" : { - "extractionState" : "stale", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Lüfter" + "settings.size.small": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Klein (1×1)" } }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Fans" + "en": { + "stringUnit": { + "state": "translated", + "value": "Small (1×1)" + } + } + } + }, + "settings.size.wide": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Breit (4×1)" + } + }, + "en": { + "stringUnit": { + "state": "translated", + "value": "Wide (4×1)" + } + } + } + }, + "settings.tab.display": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Anzeige" + } + }, + "en": { + "stringUnit": { + "state": "translated", + "value": "Display" + } + } + } + }, + "settings.tab.fans": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Lüfter" + } + }, + "en": { + "stringUnit": { + "state": "translated", + "value": "Fans" + } + } + } + }, + "settings.tab.menubar": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Menüleiste" + } + }, + "en": { + "stringUnit": { + "state": "translated", + "value": "Menu bar" + } + } + } + }, + "settings.tab.options": { + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Widget-Optionen" + } + }, + "en": { + "stringUnit": { + "state": "translated", + "value": "Widget options" + } + } + } + }, + "settings.tab.permissions": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Berechtigungen" + } + }, + "en": { + "stringUnit": { + "state": "translated", + "value": "Permissions" + } + } + } + }, + "settings.tab.sources": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Quellen" + } + }, + "en": { + "stringUnit": { + "state": "translated", + "value": "Sources" + } + } + } + }, + "settings.tab.widgets": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Widgets" + } + }, + "en": { + "stringUnit": { + "state": "translated", + "value": "Widgets" + } + } + } + }, + "settings.widgets.add": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Hinzufügen" + } + }, + "en": { + "stringUnit": { + "state": "translated", + "value": "Add" + } + } + } + }, + "settings.widgets.available": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Verfügbar" + } + }, + "en": { + "stringUnit": { + "state": "translated", + "value": "Available" + } + } + } + }, + "settings.widgets.empty": { + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Keine Widgets im Panel. Das Panel bleibt leer, bis du eins hinzufügst." + } + }, + "en": { + "stringUnit": { + "state": "translated", + "value": "No widgets in the panel. It stays empty until you add one." + } + } + } + }, + "settings.widgets.hint": { + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Die Reihenfolge bestimmt die Anordnung im Panel. Jedes Widget rückt an die erste Stelle, an die es passt." + } + }, + "en": { + "stringUnit": { + "state": "translated", + "value": "The order determines the arrangement in the panel. Each widget takes the first spot it fits into." + } + } + } + }, + "settings.widgets.hint.order": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Alle Kacheln sind gleich groß. Die Reihenfolge hier ist die Reihenfolge im Panel — zum Sortieren ziehen." + } + }, + "en": { + "stringUnit": { + "state": "translated", + "value": "All tiles are the same size. The order here is the order in the panel — drag to sort." + } + } + } + }, + "settings.widgets.inPanel": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Im Panel" + } + }, + "en": { + "stringUnit": { + "state": "translated", + "value": "In the panel" + } + } + } + }, + "settings.widgets.remove": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Aus dem Panel entfernen" + } + }, + "en": { + "stringUnit": { + "state": "translated", + "value": "Remove from panel" + } + } + } + }, + "widget.fans.name": { + "extractionState": "stale", + "localizations": { + "de": { + "stringUnit": { + "state": "translated", + "value": "Lüfter" + } + }, + "en": { + "stringUnit": { + "state": "translated", + "value": "Fans" } } } } }, - "version" : "1.1" -} \ No newline at end of file + "version": "1.1" +} diff --git a/Onyx/SettingsView.swift b/Onyx/SettingsView.swift index 45fc6fb..cd9cbbb 100644 --- a/Onyx/SettingsView.swift +++ b/Onyx/SettingsView.swift @@ -32,8 +32,9 @@ struct SettingsView: View { DisplaySettings(model: model) .tabItem { Label("settings.tab.display", systemImage: "macbook") } .tag(SettingsTab.display) - CalendarSourceSettings(model: calendarModel) - .tabItem { Label("settings.tab.sources", systemImage: "calendar.badge.clock") } + WidgetOptionsView(calendarModel: calendarModel, weatherModel: weatherModel, + shelfStore: shelfStore) + .tabItem { Label("settings.tab.options", systemImage: "slider.horizontal.3") } .tag(SettingsTab.sources) MenuBarSettings(model: model, metricsModel: metricsModel) .tabItem { Label("settings.tab.menubar", systemImage: "menubar.rectangle") } @@ -410,11 +411,6 @@ private struct WidgetSettings: View { } } - if let shelfStore { - Section("settings.shelf.title") { - ShelfSettingsRows(store: shelfStore) - } - } } .listStyle(.inset) } diff --git a/Onyx/SettingsWindowController.swift b/Onyx/SettingsWindowController.swift index 73e2559..03c2fb6 100644 --- a/Onyx/SettingsWindowController.swift +++ b/Onyx/SettingsWindowController.swift @@ -57,10 +57,15 @@ final class SettingsWindowController: NSObject, NSWindowDelegate { let window = NSWindow(contentViewController: hosting) window.title = "Onyx" - // Der Titelbalken geht in den Inhalt über, statt ihn mit einer - // Linie abzuschneiden — sonst liegt die Reiterleiste direkt auf - // dieser Linie. + // Der Titelbalken geht in den Inhalt über, **und** seine Trennlinie + // verschwindet. + // + // `titlebarAppearsTransparent` allein reichte nicht: macOS zieht + // unter dem Titelbalken zusätzlich einen Trenner quer durchs + // Fenster, und die Reiterleiste saß mittig darauf. Man setzt keinen + // Titel auf eine Trennlinie. window.titlebarAppearsTransparent = true + window.titlebarSeparatorStyle = .none // Veränderbar, und das ist keine Kür: der Bereich „Displays" mit // der Vorschau der Auslösefläche passt in 420 Punkte Höhe nicht // mehr, und ein Fenster, in dem man scrollen muss, obwohl der diff --git a/Onyx/WidgetOptionsView.swift b/Onyx/WidgetOptionsView.swift new file mode 100644 index 0000000..1fb213f --- /dev/null +++ b/Onyx/WidgetOptionsView.swift @@ -0,0 +1,230 @@ +import SwiftUI +import CalendarProvider +import WeatherProvider +import ShelfProvider + +/// Die Stellschrauben der einzelnen Widgets, an einem Ort. +/// +/// Vorher hieß der Bereich „Quellen" und enthielt nur die Kalenderquelle. Das +/// war die Sicht des Programmierers: für den Nutzer ist die Quelle eine +/// Einstellung **des Kalenderwidgets** unter mehreren — welche Kalender +/// mitzählen, gehört genauso dazu, und beim Wetter der Ort. Ein Abschnitt je +/// Widget ist die Ordnung, die man sucht. +struct WidgetOptionsView: View { + let calendarModel: CalendarModel + let weatherModel: WeatherModel + let shelfStore: ShelfStore? + + var body: some View { + Form { + Section("options.calendar") { + CalendarOptions(model: calendarModel) + } + + Section("options.weather") { + WeatherOptions(model: weatherModel) + } + + if let shelfStore { + Section("options.shelf") { + ShelfOptions(store: shelfStore) + } + } + } + .formStyle(.grouped) + .padding() + } +} + +// MARK: - Kalender + +private struct CalendarOptions: View { + @Bindable var model: CalendarModel + @State private var calendarrState: CalendarSourceState? + + var body: some View { + Picker(selection: $model.kind) { + ForEach(CalendarSourceKind.allCases, id: \.self) { kind in + Text(kind.localizedName).tag(kind) + } + } label: { + Text("options.calendar.source") + } + .pickerStyle(.menu) + + Picker(selection: $model.showsMonthGrid) { + Text("options.calendar.agenda").tag(false) + Text("options.calendar.month").tag(true) + } label: { + Text("options.calendar.display") + } + .pickerStyle(.menu) + + // Welche Kalender mitzählen. Gespeichert werden die **abgewählten**: + // kommt ein neuer dazu, ist er automatisch dabei, statt dass man ihn + // suchen muss, ohne zu wissen, dass es ihn gibt. + if model.availableCalendars.isEmpty { + Text("options.calendar.noneFound") + .font(.callout).foregroundStyle(.secondary) + } else { + ForEach(model.availableCalendars) { calendar in + Toggle(isOn: Binding( + get: { !model.hiddenCalendarIDs.contains(calendar.id) }, + set: { shown in + if shown { model.hiddenCalendarIDs.remove(calendar.id) } + else { model.hiddenCalendarIDs.insert(calendar.id) } + })) { + Label { + Text(calendar.title) + } icon: { + Circle() + .fill(Color(hex: calendar.colorHex) ?? .secondary) + .frame(width: 9, height: 9) + } + } + } + } + + if model.kind != .appleCalendar { + CalendarrStatus(state: calendarrState) + .task(id: model.kind) { + guard model.kind != .appleCalendar else { return } + let now = Date() + calendarrState = await CalendarrSource().load( + DateInterval(start: now.addingTimeInterval(-14 * 86_400), + end: now.addingTimeInterval(60 * 86_400))) + } + } + } +} + +/// Was Calendarr gerade liefert. Bleibt das Widget leer, steht hier das Warum. +private struct CalendarrStatus: View { + let state: CalendarSourceState? + + var body: some View { + switch state { + case .ready(let window): + LabeledContent { + Text(window.asOf?.formatted(date: .abbreviated, time: .shortened) ?? "–") + .foregroundStyle(.secondary) + } label: { + Text("options.calendar.calendarrEvents \(window.events.count)") + } + case .neverWritten: + Text("calendar.source.status.neverWritten").font(.callout).foregroundStyle(.secondary) + case .loggedOut: + Text("calendar.source.status.loggedOut").font(.callout).foregroundStyle(.secondary) + case .incompatible: + Text("calendar.source.status.incompatible").font(.callout).foregroundStyle(.orange) + case .unreadable(let reason): + Text(reason).font(.callout).foregroundStyle(.orange) + case .denied, .none: + ProgressView().controlSize(.small) + } + } +} + +// MARK: - Wetter + +private struct WeatherOptions: View { + let model: WeatherModel + @State private var query = "" + @State private var searching = false + @State private var notFound = false + + private var usesCurrentLocation: Bool { model.place.isCurrent } + + var body: some View { + Toggle(isOn: Binding( + get: { usesCurrentLocation }, + set: { model.place = $0 ? .current : model.place })) { + Text("options.weather.automatic") + } + .disabled(usesCurrentLocation) + + if usesCurrentLocation { + // Ohne Ortungsberechtigung nützt die Automatik nichts — und das + // steht hier, statt dass das Widget stumm leer bleibt. + if model.locationIsDenied { + Text("options.weather.needsLocation") + .font(.callout).foregroundStyle(.orange) + .fixedSize(horizontal: false, vertical: true) + } + } else if case .fixed(let name, _, _) = model.place { + LabeledContent { + Text(name).foregroundStyle(.secondary) + } label: { + Text("options.weather.place") + } + } + + HStack { + TextField("options.weather.search", text: $query) + .textFieldStyle(.roundedBorder) + .onSubmit { Task { await search() } } + if searching { + ProgressView().controlSize(.small) + } else { + Button("options.weather.set") { Task { await search() } } + .disabled(query.trimmingCharacters(in: .whitespaces).isEmpty) + } + } + + if notFound { + Text("options.weather.notFound").font(.callout).foregroundStyle(.orange) + } + } + + private func search() async { + searching = true + notFound = false + defer { searching = false } + if let found = await model.selectPlace(named: query) { + query = "" + _ = found + } else { + notFound = true + } + } +} + +// MARK: - Ablage + +private struct ShelfOptions: View { + @Bindable var store: ShelfStore + + private static let choices: [Int?] = [nil, 1, 7, 30, 90] + + var body: some View { + Picker(selection: $store.autoCleanupDays) { + ForEach(Self.choices, id: \.self) { days in + if let days { + Text("settings.shelf.days \(days)").tag(Optional(days)) + } else { + Text("settings.shelf.never").tag(Int?.none) + } + } + } label: { + Text("settings.shelf.cleanup") + } + + HStack { + Text("settings.shelf.count \(store.items.count)").foregroundStyle(.secondary) + Spacer() + Button("settings.shelf.reveal") { store.revealInFinder() } + .buttonStyle(.borderless) + } + } +} + +private extension Color { + /// Die Farbe eines Kalenders, wie die Quelle sie liefert. + init?(hex: String?) { + guard let hex, hex.hasPrefix("#"), hex.count == 7, + let value = Int(hex.dropFirst(), radix: 16) else { return nil } + self.init(red: Double((value >> 16) & 0xFF) / 255, + green: Double((value >> 8) & 0xFF) / 255, + blue: Double(value & 0xFF) / 255) + } +} diff --git a/Packages/OnyxKit/Sources/CalendarProvider/CalendarSourceKind.swift b/Packages/OnyxKit/Sources/CalendarProvider/CalendarSourceKind.swift index 23cc6a6..2311c1c 100644 --- a/Packages/OnyxKit/Sources/CalendarProvider/CalendarSourceKind.swift +++ b/Packages/OnyxKit/Sources/CalendarProvider/CalendarSourceKind.swift @@ -67,3 +67,18 @@ public extension EventWindow { return EventWindow(events: events, coverage: coverage, asOf: asOf) } } + +public extension CalendarSourceState { + /// Blendet die abgewählten Kalender aus. + /// + /// Die Abdeckung bleibt unangetastet: welche Kalender man sehen will, sagt + /// nichts darüber aus, für welchen Zeitraum Daten vorliegen. Ein Tag ohne + /// sichtbare Termine bleibt ein bekannter Tag. + func filteringHidden(_ hidden: Set) -> CalendarSourceState { + guard case .ready(let window) = self, !hidden.isEmpty else { return self } + return .ready(EventWindow( + events: window.events.filter { !hidden.contains($0.calendarID) }, + coverage: window.coverage, + asOf: window.asOf)) + } +} diff --git a/Packages/OnyxKit/Sources/CalendarProvider/CalendarWidget.swift b/Packages/OnyxKit/Sources/CalendarProvider/CalendarWidget.swift index 44c40e7..5e6f617 100644 --- a/Packages/OnyxKit/Sources/CalendarProvider/CalendarWidget.swift +++ b/Packages/OnyxKit/Sources/CalendarProvider/CalendarWidget.swift @@ -29,7 +29,24 @@ public final class CalendarModel { didSet { defaults.set(showsMonthGrid, forKey: Self.gridKey) } } + /// Welche Kalender Daten liefern. `nil` heißt: alle. + /// + /// Bewusst eine Liste der **abgewählten**, nicht der gewählten: kommt ein + /// neuer Kalender dazu, ist er dann automatisch dabei. Andersherum müsste + /// man ihn suchen und anhaken, ohne zu wissen, dass es ihn gibt. + public var hiddenCalendarIDs: Set { + didSet { + guard hiddenCalendarIDs != oldValue else { return } + defaults.set(Array(hiddenCalendarIDs), forKey: Self.hiddenKey) + refresh() + } + } + + /// Die Kalender, die zur Auswahl stehen. + public private(set) var availableCalendars: [OnyxCalendar] = [] + private static let kindKey = "calendar.source" + private static let hiddenKey = "calendar.hiddenCalendars" private static let gridKey = "calendar.showsMonthGrid" private let appleSource: CalendarSource @@ -51,6 +68,7 @@ public final class CalendarModel { self.kind = defaults.string(forKey: Self.kindKey) .flatMap(CalendarSourceKind.init(rawValue:)) ?? .appleCalendar self.showsMonthGrid = defaults.bool(forKey: Self.gridKey) + self.hiddenCalendarIDs = Set(defaults.stringArray(forKey: Self.hiddenKey) ?? []) observeCalendarrIfNeeded() } @@ -139,7 +157,16 @@ public final class CalendarModel { states.append(source.isAuthorized ? await source.load(interval) : .denied) } guard !Task.isCancelled else { return } - state = CalendarSourceKind.merge(states) + state = CalendarSourceKind.merge(states).filteringHidden(hiddenCalendarIDs) + + // Die Liste der wählbaren Kalender nebenbei mitführen — sie ändert + // sich, wenn jemand in Kalender einen anlegt oder die Quelle + // wechselt. + var found: [OnyxCalendar] = [] + for source in activeSources where source.isAuthorized { + found.append(contentsOf: await source.calendars()) + } + availableCalendars = found } } diff --git a/Packages/OnyxKit/Sources/ShelfProvider/Localizable.xcstrings b/Packages/OnyxKit/Sources/ShelfProvider/Localizable.xcstrings index c59cc7f..aa0ba48 100644 --- a/Packages/OnyxKit/Sources/ShelfProvider/Localizable.xcstrings +++ b/Packages/OnyxKit/Sources/ShelfProvider/Localizable.xcstrings @@ -1,166 +1,167 @@ { - "sourceLanguage": "en", - "strings": { - "airdrop.hint": { - "localizations": { - "de": { - "stringUnit": { - "state": "translated", - "value": "Zum Senden ablegen" + "sourceLanguage" : "en", + "strings" : { + "airdrop.hint" : { + "localizations" : { + "de" : { + "stringUnit" : { + "state" : "translated", + "value" : "Zum Senden ablegen" } }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Drop to send" + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Drop to send" } } } }, - "airdrop.name": { - "localizations": { - "de": { - "stringUnit": { - "state": "translated", - "value": "AirDrop" + "airdrop.name" : { + "extractionState" : "stale", + "localizations" : { + "de" : { + "stringUnit" : { + "state" : "translated", + "value" : "AirDrop" } }, - "en": { - "stringUnit": { - "state": "translated", - "value": "AirDrop" + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "AirDrop" } } } }, - "airdrop.unavailable": { - "localizations": { - "de": { - "stringUnit": { - "state": "translated", - "value": "AirDrop kann das nicht senden" + "airdrop.unavailable" : { + "localizations" : { + "de" : { + "stringUnit" : { + "state" : "translated", + "value" : "AirDrop kann das nicht senden" } }, - "en": { - "stringUnit": { - "state": "translated", - "value": "AirDrop cannot send this" + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "AirDrop cannot send this" } } } }, - "shelf.airdrop": { - "localizations": { - "de": { - "stringUnit": { - "state": "translated", - "value": "Per AirDrop senden" + "shelf.airdrop" : { + "localizations" : { + "de" : { + "stringUnit" : { + "state" : "translated", + "value" : "Per AirDrop senden" } }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Send via AirDrop" + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Send via AirDrop" } } } }, - "shelf.clear": { - "localizations": { - "de": { - "stringUnit": { - "state": "translated", - "value": "Alles leeren" + "shelf.clear" : { + "localizations" : { + "de" : { + "stringUnit" : { + "state" : "translated", + "value" : "Alles leeren" } }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Clear all" + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Clear all" } } } }, - "shelf.delete": { - "localizations": { - "de": { - "stringUnit": { - "state": "translated", - "value": "In den Papierkorb" + "shelf.delete" : { + "localizations" : { + "de" : { + "stringUnit" : { + "state" : "translated", + "value" : "In den Papierkorb" } }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Move to Trash" + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Move to Trash" } } } }, - "shelf.empty": { - "localizations": { - "de": { - "stringUnit": { - "state": "translated", - "value": "Dateien hierhin ziehen, um sie zu parken." + "shelf.empty" : { + "localizations" : { + "de" : { + "stringUnit" : { + "state" : "translated", + "value" : "Dateien hierhin ziehen, um sie zu parken." } }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Drop files here to park them." + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Drop files here to park them." } } } }, - "shelf.name": { - "localizations": { - "de": { - "stringUnit": { - "state": "translated", - "value": "Ablage & AirDrop" + "shelf.name" : { + "localizations" : { + "de" : { + "stringUnit" : { + "state" : "translated", + "value" : "Ablage & AirDrop" } }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Shelf & AirDrop" + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Shelf & AirDrop" } } } }, - "shelf.open": { - "localizations": { - "de": { - "stringUnit": { - "state": "translated", - "value": "Öffnen" + "shelf.open" : { + "localizations" : { + "de" : { + "stringUnit" : { + "state" : "translated", + "value" : "Öffnen" } }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Open" + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Open" } } } }, - "shelf.reveal": { - "localizations": { - "de": { - "stringUnit": { - "state": "translated", - "value": "Im Finder zeigen" + "shelf.reveal" : { + "localizations" : { + "de" : { + "stringUnit" : { + "state" : "translated", + "value" : "Im Finder zeigen" } }, - "en": { - "stringUnit": { - "state": "translated", - "value": "Show in Finder" + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Show in Finder" } } } } }, - "version": "1.1" -} + "version" : "1.1" +} \ No newline at end of file diff --git a/Packages/OnyxKit/Sources/WeatherProvider/WeatherKitSource.swift b/Packages/OnyxKit/Sources/WeatherProvider/WeatherKitSource.swift index 88bdf5e..e922bc4 100644 --- a/Packages/OnyxKit/Sources/WeatherProvider/WeatherKitSource.swift +++ b/Packages/OnyxKit/Sources/WeatherProvider/WeatherKitSource.swift @@ -174,6 +174,22 @@ public final class WeatherKitSource { return fetched } + /// Koordinaten zu einem Ortsnamen. + /// + /// Mit Zeitlimit wie alles andere hier: eine Ortssuche ohne Netz wartet + /// sonst, bis jemand das Fenster schließt. + public func coordinates(for query: String) async -> (name: String, + coordinate: CLLocationCoordinate2D)? { + let found = await withTimeout(seconds: 8) { + try? await CLGeocoder().geocodeAddressString(query).first + } ?? nil + guard let placemark = found, let location = placemark.location else { return nil } + let name = [placemark.locality, placemark.administrativeArea, placemark.country] + .compactMap { $0 } + .first ?? query + return (name, location.coordinate) + } + private func name(for location: CLLocation) async -> String { // Auch hier ein Zeitlimit: ohne Netz wartet die Umkehrsuche lange. // `CLGeocoder` ist nicht `Sendable`, also wird es im Aufruf angelegt diff --git a/Packages/OnyxKit/Sources/WeatherProvider/WeatherWidget.swift b/Packages/OnyxKit/Sources/WeatherProvider/WeatherWidget.swift index e9229dc..8e85423 100644 --- a/Packages/OnyxKit/Sources/WeatherProvider/WeatherWidget.swift +++ b/Packages/OnyxKit/Sources/WeatherProvider/WeatherWidget.swift @@ -19,16 +19,30 @@ public final class WeatherModel { /// liefert nur den Wert zum Zeitpunkt des Lesens. public private(set) var locationAuthorization: LocationAuthorization = .undetermined public var place: WeatherPlace { - didSet { guard place != oldValue else { return }; load(force: true) } + didSet { + guard place != oldValue else { return } + if let data = try? JSONEncoder().encode(place) { + defaults.set(data, forKey: Self.placeKey) + } + load(force: true) + } } + private static let placeKey = "weather.place" + private let source: WeatherKitSource + private let defaults: UserDefaults private var cache = WeatherCache() private var task: Task? - public init(source: WeatherKitSource = WeatherKitSource(), place: WeatherPlace = .current) { + public init(source: WeatherKitSource = WeatherKitSource(), + defaults: UserDefaults = .standard) { self.source = source - self.place = place + self.defaults = defaults + // Der gewählte Ort überlebt den Neustart — sonst steht nach jedem + // Start wieder das Wetter des Aufenthaltsorts da. + self.place = defaults.data(forKey: Self.placeKey) + .flatMap { try? JSONDecoder().decode(WeatherPlace.self, from: $0) } ?? .current // Sofort zeigen, was zuletzt bekannt war. Ein Wert von vor einer Stunde // mit Zeitstempel ist eine Auskunft; ein Rädchen ist keine. if let known = cache.lastKnown(for: place) { @@ -103,6 +117,23 @@ public final class WeatherModel { task?.cancel() task = nil } + + /// Sucht die Koordinaten zu einem Ortsnamen und übernimmt ihn. + /// + /// WeatherKit will Koordinaten, der Nutzer kennt Ortsnamen. Die Umsetzung + /// dazwischen passiert einmal beim Einstellen, nicht bei jedem Abruf. + /// + /// - Returns: der gefundene Ort, oder `nil` wenn es keinen gab. + @discardableResult + public func selectPlace(named query: String) async -> String? { + let trimmed = query.trimmingCharacters(in: .whitespacesAndNewlines) + guard !trimmed.isEmpty else { return nil } + guard let found = await source.coordinates(for: trimmed) else { return nil } + place = .fixed(name: found.name, + latitude: found.coordinate.latitude, + longitude: found.coordinate.longitude) + return found.name + } } // MARK: - Widget