Browse Source

Localization.

pull/92/head
Abhishek 5 years ago
parent
commit
8109b733b1
  1. 7
      Clocker/Overall App/AppDefaults.swift
  2. 3
      Clocker/Preferences/Appearance/AppearanceViewController.swift

7
Clocker/Overall App/AppDefaults.swift

@ -136,6 +136,13 @@ class AppDefaults {
} }
extension UserDefaults { 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() { func wipeIfNeccesary() {
if let bundleID = Bundle.main.bundleIdentifier, object(forKey: "PreferencesHaveBeenWiped") == nil { if let bundleID = Bundle.main.bundleIdentifier, object(forKey: "PreferencesHaveBeenWiped") == nil {
removePersistentDomain(forName: bundleID) removePersistentDomain(forName: bundleID)

3
Clocker/Preferences/Appearance/AppearanceViewController.swift

@ -99,7 +99,8 @@ class AppearanceViewController: ParentViewController {
private func setup() { private func setup() {
headerLabel.stringValue = "Main Panel Options" headerLabel.stringValue = "Main Panel Options"
timeFormatLabel.stringValue = "Time Format" timeFormatLabel.stringValue = "Time Format"
panelTheme.stringValue = "Panel Theme" panelTheme.stringValue = NSLocalizedString("Panel Theme",
comment: "String for theme")
dayDisplayOptionsLabel.stringValue = "Day Display Options" dayDisplayOptionsLabel.stringValue = "Day Display Options"
showSliderLabel.stringValue = "Show Future Slider" showSliderLabel.stringValue = "Show Future Slider"
showSunriseLabel.stringValue = "Show Sunrise/Sunset" showSunriseLabel.stringValue = "Show Sunrise/Sunset"

Loading…
Cancel
Save