Skip to content

Commit

Permalink
Quick fixups!!
Browse files Browse the repository at this point in the history
  • Loading branch information
n0shake committed Jan 30, 2021
1 parent c6f8371 commit 5f1fe44
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 30 deletions.
18 changes: 0 additions & 18 deletions Clocker/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,24 +61,6 @@ open class AppDelegate: NSObject, NSApplicationDelegate {
Fabric.with([Crashlytics.self])
checkIfRunFromApplicationsFolder()
#endif

logCurrentLanguagePreferences()
}

// Help us priortize our localization efforts
private func logCurrentLanguagePreferences() {
let firstLanguage = Locale.preferredLanguages.first ?? "en-US"

// We don't care if the language is English!
if firstLanguage.contains("en") {
return
}

let annotations = [
"Language": firstLanguage,
]

Logger.log(object: annotations, for: "Locale")
}

public func applicationDockMenu(_: NSApplication) -> NSMenu? {
Expand Down
22 changes: 14 additions & 8 deletions Clocker/Clocker.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@
9A20A04B1C4DEED200FB45AB /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A20A04A1C4DEED200FB45AB /* IOKit.framework */; };
9A24A1881ED902CC0095201E /* EventKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A24A1871ED902CC0095201E /* EventKit.framework */; };
9A3169C11D2CC5AA0079FDF8 /* com.abhishek.ClockerHelper.plist in Resources */ = {isa = PBXBuildFile; fileRef = 9A3169C01D2CC5AA0079FDF8 /* com.abhishek.ClockerHelper.plist */; };
9A3231C725C605DA00D1078F /* Keys.plist in Resources */ = {isa = PBXBuildFile; fileRef = 9A3231C625C605DA00D1078F /* Keys.plist */; };
9A3231C825C605DA00D1078F /* Keys.plist in Resources */ = {isa = PBXBuildFile; fileRef = 9A3231C625C605DA00D1078F /* Keys.plist */; };
9A3231C925C605DA00D1078F /* Keys.plist in Resources */ = {isa = PBXBuildFile; fileRef = 9A3231C625C605DA00D1078F /* Keys.plist */; };
9A4379271BEC223900F4E27F /* Fabric.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A4379231BEC223900F4E27F /* Fabric.framework */; };
9A43792A1BEC230A00F4E27F /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A4379291BEC230A00F4E27F /* libc++.tbd */; };
9A56DB801C1CFB73004CE6AF /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9A56DB7D1C1CFB73004CE6AF /* MainMenu.xib */; };
Expand Down Expand Up @@ -235,7 +238,6 @@
35B2FEB1259A1649005DA84D /* StartupKit */ = {isa = PBXFileReference; lastKnownFileType = folder; path = StartupKit; sourceTree = "<group>"; };
35B2FED4259A2244005DA84D /* CoreLoggerKit */ = {isa = PBXFileReference; lastKnownFileType = folder; path = CoreLoggerKit; sourceTree = "<group>"; };
35B2FEE4259A2C25005DA84D /* CoreModelKit */ = {isa = PBXFileReference; lastKnownFileType = folder; path = CoreModelKit; sourceTree = "<group>"; };
35B2FF02259A3F69005DA84D /* Keys.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Keys.plist; path = ../Internal/Keys.plist; sourceTree = "<group>"; };
35C11E2024873A550031F18C /* VersionUpdateHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VersionUpdateHandler.swift; sourceTree = "<group>"; };
35C36EE822595F13002FA5C6 /* OnboardingPermissionsViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OnboardingPermissionsViewController.swift; sourceTree = "<group>"; };
35C36EE922595F13002FA5C6 /* OnboardingWelcomeViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OnboardingWelcomeViewController.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -309,6 +311,7 @@
9A20A06F1C4E804D00FB45AB /* ServiceManagement.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ServiceManagement.framework; path = System/Library/Frameworks/ServiceManagement.framework; sourceTree = SDKROOT; };
9A24A1871ED902CC0095201E /* EventKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = EventKit.framework; path = System/Library/Frameworks/EventKit.framework; sourceTree = SDKROOT; };
9A3169C01D2CC5AA0079FDF8 /* com.abhishek.ClockerHelper.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = com.abhishek.ClockerHelper.plist; path = Clocker/com.abhishek.ClockerHelper.plist; sourceTree = "<group>"; };
9A3231C625C605DA00D1078F /* Keys.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Keys.plist; path = Internal/Keys.plist; sourceTree = "<group>"; };
9A4379231BEC223900F4E27F /* Fabric.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Fabric.framework; sourceTree = "<group>"; };
9A4379291BEC230A00F4E27F /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; };
9A43792B1BEC231100F4E27F /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; };
Expand Down Expand Up @@ -819,7 +822,7 @@
DD4F7BF913C30F9F00825C6E = {
isa = PBXGroup;
children = (
35B2FF02259A3F69005DA84D /* Keys.plist */,
9A3231C625C605DA00D1078F /* Keys.plist */,
35B2FEE4259A2C25005DA84D /* CoreModelKit */,
35B2FED4259A2244005DA84D /* CoreLoggerKit */,
35B2FEB1259A1649005DA84D /* StartupKit */,
Expand Down Expand Up @@ -1097,13 +1100,15 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
9A3231C925C605DA00D1078F /* Keys.plist in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
C2BFE3E12049F82300825BE5 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
9A3231C825C605DA00D1078F /* Keys.plist in Resources */,
9A8B256A232EFAD300204CAD /* Localizable.strings in Resources */,
9AA522C023415BDD00C9E005 /* InfoPlist.strings in Resources */,
);
Expand All @@ -1113,6 +1118,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
9A3231C725C605DA00D1078F /* Keys.plist in Resources */,
9A13BAEA1CA88A76007C6CBE /* Localizable.strings in Resources */,
357391882507277500D30819 /* HourMarkerViewItem.xib in Resources */,
9AB6F15E2259D08300A44663 /* iVersion.bundle in Resources */,
Expand Down Expand Up @@ -1461,7 +1467,7 @@
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 86;
CURRENT_PROJECT_VERSION = 88;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
FRAMEWORK_SEARCH_PATHS = (
Expand Down Expand Up @@ -1489,7 +1495,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.12;
MARKETING_VERSION = 20.10.03;
MARKETING_VERSION = 20.10.04;
OTHER_LDFLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = com.abhishek.Clocker;
PRODUCT_NAME = Clocker;
Expand Down Expand Up @@ -1995,7 +2001,7 @@
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 86;
CURRENT_PROJECT_VERSION = 88;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
Expand Down Expand Up @@ -2025,7 +2031,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.12;
MARKETING_VERSION = 20.10.03;
MARKETING_VERSION = 20.10.04;
ONLY_ACTIVE_ARCH = NO;
OTHER_LDFLAGS = "";
"OTHER_SWIFT_FLAGS[arch=*]" = "-D DEBUG";
Expand Down Expand Up @@ -2064,7 +2070,7 @@
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 86;
CURRENT_PROJECT_VERSION = 88;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
FRAMEWORK_SEARCH_PATHS = (
Expand Down Expand Up @@ -2092,7 +2098,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.12;
MARKETING_VERSION = 20.10.03;
MARKETING_VERSION = 20.10.04;
OTHER_LDFLAGS = "";
"OTHER_SWIFT_FLAGS[arch=*]" = "-D RELEASE";
PRODUCT_BUNDLE_IDENTIFIER = com.abhishek.Clocker;
Expand Down
2 changes: 1 addition & 1 deletion Clocker/ClockerUITests/AboutUsTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class AboutUsTests: XCTestCase {
tapAboutTab()

let appDisplayName = "CFBundleDisplayName".localizedString()
let expectedVersion = "\(appDisplayName) 20.10.03 (86)"
let expectedVersion = "\(appDisplayName) 20.10.04 (88)"

guard let presentVersion = app.windows["Clocker"].staticTexts["ClockerVersion"].value as? String else {
XCTFail("Present version not present")
Expand Down
4 changes: 2 additions & 2 deletions Clocker/Overall App/Themer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ extension Themer {

return
themeIndex == .light
? NSImage(named: NSImage.Name("Settings"))!
: NSImage(named: NSImage.Name("Settings-White"))!
? NSImage(named: NSImage.Name("Settings"))!
: NSImage(named: NSImage.Name("Settings-White"))!
}

func pinImage() -> NSImage {
Expand Down
8 changes: 8 additions & 0 deletions Clocker/Panel/Keys.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>GeocodingKey</key>
<string>AIzaSyDN2GruXMEwkVHIzPKu4zPyWprKgUETVME</string>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class PreferencesViewController: ParentViewController {
guard let path = Bundle.main.path(forResource: "Keys", ofType: "plist"),
let dictionary = NSDictionary(contentsOfFile: path),
let apiKey = dictionary["GeocodingKey"] as? String else {
// assertionFailure("Unable to find the API key")
assertionFailure("Unable to find the API key")
return ""
}
return apiKey
Expand Down

0 comments on commit 5f1fe44

Please sign in to comment.