From 8109b733b180a4fbc9d8dc0f36cbe4cb9fde4ead Mon Sep 17 00:00:00 2001 From: Abhishek Date: Sat, 21 Sep 2019 12:03:56 -0700 Subject: [PATCH] Localization. --- Clocker/Overall App/AppDefaults.swift | 7 +++++++ .../Preferences/Appearance/AppearanceViewController.swift | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Clocker/Overall App/AppDefaults.swift b/Clocker/Overall App/AppDefaults.swift index 3c85e50..0814054 100644 --- a/Clocker/Overall App/AppDefaults.swift +++ b/Clocker/Overall App/AppDefaults.swift @@ -136,6 +136,13 @@ class AppDefaults { } extension UserDefaults { + // Use this with caution. Exposing this for debugging purposes only. + func wipe() { + if let bundleID = Bundle.main.bundleIdentifier { + removePersistentDomain(forName: bundleID) + } + } + func wipeIfNeccesary() { if let bundleID = Bundle.main.bundleIdentifier, object(forKey: "PreferencesHaveBeenWiped") == nil { removePersistentDomain(forName: bundleID) diff --git a/Clocker/Preferences/Appearance/AppearanceViewController.swift b/Clocker/Preferences/Appearance/AppearanceViewController.swift index a205f48..d047a5f 100644 --- a/Clocker/Preferences/Appearance/AppearanceViewController.swift +++ b/Clocker/Preferences/Appearance/AppearanceViewController.swift @@ -99,7 +99,8 @@ class AppearanceViewController: ParentViewController { private func setup() { headerLabel.stringValue = "Main Panel Options" timeFormatLabel.stringValue = "Time Format" - panelTheme.stringValue = "Panel Theme" + panelTheme.stringValue = NSLocalizedString("Panel Theme", + comment: "String for theme") dayDisplayOptionsLabel.stringValue = "Day Display Options" showSliderLabel.stringValue = "Show Future Slider" showSunriseLabel.stringValue = "Show Sunrise/Sunset"