|
|
@ -50,7 +50,7 @@ class AboutViewController: ParentViewController { |
|
|
|
let rangesInOrder = [NSRange(location: 3, length: 8), |
|
|
|
let rangesInOrder = [NSRange(location: 3, length: 8), |
|
|
|
NSRange(location: 7, length: privateFeedback.attributedTitle.length - 7), |
|
|
|
NSRange(location: 7, length: privateFeedback.attributedTitle.length - 7), |
|
|
|
NSRange(location: 27, length: 33), |
|
|
|
NSRange(location: 27, length: 33), |
|
|
|
NSRange(location: 32, length: 30)] |
|
|
|
NSRange(location: 42, length: 14)] |
|
|
|
|
|
|
|
|
|
|
|
let buttonsInOrder = [quickCommentAction, |
|
|
|
let buttonsInOrder = [quickCommentAction, |
|
|
|
privateFeedback, |
|
|
|
privateFeedback, |
|
|
@ -60,7 +60,7 @@ class AboutViewController: ParentViewController { |
|
|
|
let localizedKeys = ["1. @n0shake on Twitter for quick comments", |
|
|
|
let localizedKeys = ["1. @n0shake on Twitter for quick comments", |
|
|
|
"2. For Private Feedback", |
|
|
|
"2. For Private Feedback", |
|
|
|
"You can support Clocker by leaving a review on the App Store! :)", |
|
|
|
"You can support Clocker by leaving a review on the App Store! :)", |
|
|
|
"Clocker is Open Source. You can check out the source code here."] |
|
|
|
"Help localize Clocker in your language by clicking here!"] |
|
|
|
|
|
|
|
|
|
|
|
zip(buttonsInOrder, localizedKeys).forEach { arg in |
|
|
|
zip(buttonsInOrder, localizedKeys).forEach { arg in |
|
|
|
let (button, title) = arg |
|
|
|
let (button, title) = arg |
|
|
@ -129,13 +129,14 @@ class AboutViewController: ParentViewController { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@IBAction func openGitHub(_: Any) { |
|
|
|
@IBAction func openGitHub(_: Any) { |
|
|
|
guard let githubURL = URL(string: AboutUsConstants.GitHubURL), |
|
|
|
guard let localizationURL = URL(string: AboutUsConstants.CrowdInLocalizationLink), |
|
|
|
let countryCode = Locale.autoupdatingCurrent.regionCode else { return } |
|
|
|
let languageCode = Locale.preferredLanguages.first else { return } |
|
|
|
|
|
|
|
|
|
|
|
NSWorkspace.shared.open(githubURL) |
|
|
|
NSWorkspace.shared.open(localizationURL) |
|
|
|
|
|
|
|
|
|
|
|
let custom: [String: Any] = ["Country": countryCode] |
|
|
|
// Log this |
|
|
|
Logger.log(object: custom, for: "Opened GitHub") |
|
|
|
let custom: [String: Any] = ["Language": languageCode] |
|
|
|
|
|
|
|
Logger.log(object: custom, for: "Opened Localization Link") |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@IBOutlet var feedbackLabel: NSTextField! |
|
|
|
@IBOutlet var feedbackLabel: NSTextField! |
|
|
|