From 2f783851ed5c2b1c199807b270b86020f2868c92 Mon Sep 17 00:00:00 2001 From: BlackOtton <52571671+BlackOtton@users.noreply.github.com> Date: Tue, 14 Dec 2021 20:43:56 +0100 Subject: [PATCH 1/3] Polish Language Added polish translation to ThinkPad Assistant. Check everything, seems to work perfectly. --- AutoLaunchHelper/pl.lproj/InfoPlist.strings | 6 ++ AutoLaunchHelper/pl.lproj/Main.strings | 3 + ThinkpadAssistant.xcodeproj/project.pbxproj | 26 +++++--- ThinkpadAssistant/pl.lproj/InfoPlist.strings | 7 +++ .../pl.lproj/Localizable.strings | 63 +++++++++++++++++++ ThinkpadAssistant/pl.lproj/Main.strings | 24 +++++++ 6 files changed, 122 insertions(+), 7 deletions(-) create mode 100644 AutoLaunchHelper/pl.lproj/InfoPlist.strings create mode 100644 AutoLaunchHelper/pl.lproj/Main.strings create mode 100644 ThinkpadAssistant/pl.lproj/InfoPlist.strings create mode 100644 ThinkpadAssistant/pl.lproj/Localizable.strings create mode 100644 ThinkpadAssistant/pl.lproj/Main.strings diff --git a/AutoLaunchHelper/pl.lproj/InfoPlist.strings b/AutoLaunchHelper/pl.lproj/InfoPlist.strings new file mode 100644 index 0000000..7141365 --- /dev/null +++ b/AutoLaunchHelper/pl.lproj/InfoPlist.strings @@ -0,0 +1,6 @@ +/* Bundle name */ +"CFBundleName" = "AutoLaunchHelper"; + +/* Copyright (human-readable) */ +"NSHumanReadableCopyright" = "Copyright © 2020 Matthäus Szturc. Wszelkie Prawa zastrzeżone."; + diff --git a/AutoLaunchHelper/pl.lproj/Main.strings b/AutoLaunchHelper/pl.lproj/Main.strings new file mode 100644 index 0000000..250f3d8 --- /dev/null +++ b/AutoLaunchHelper/pl.lproj/Main.strings @@ -0,0 +1,3 @@ + +/* Class = "NSMenu"; title = "Main Menu"; ObjectID = "AYu-sK-qS6"; */ +"AYu-sK-qS6.title" = "Menu Główne"; diff --git a/ThinkpadAssistant.xcodeproj/project.pbxproj b/ThinkpadAssistant.xcodeproj/project.pbxproj index 6b93847..a8446cc 100644 --- a/ThinkpadAssistant.xcodeproj/project.pbxproj +++ b/ThinkpadAssistant.xcodeproj/project.pbxproj @@ -51,6 +51,11 @@ /* Begin PBXFileReference section */ 1F4D64855DFDE6D7D5FD9F23 /* Pods-AutoLaunchHelper.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AutoLaunchHelper.debug.xcconfig"; path = "Target Support Files/Pods-AutoLaunchHelper/Pods-AutoLaunchHelper.debug.xcconfig"; sourceTree = ""; }; + 2E123FCC27691C4D00050176 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/Main.strings; sourceTree = ""; }; + 2E123FCD27691C4D00050176 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/Main.strings; sourceTree = ""; }; + 2E123FD027691D6400050176 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/Localizable.strings; sourceTree = ""; }; + 2E123FD127691F5400050176 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/InfoPlist.strings; sourceTree = ""; }; + 2E123FD227691FCB00050176 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/InfoPlist.strings; sourceTree = ""; }; A2D81A3D8A645E8C957C4863 /* Pods_ThinkpadAssistant.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ThinkpadAssistant.framework; sourceTree = BUILT_PRODUCTS_DIR; }; A7FFA5A32A931C74AFABA743 /* Pods-AutoLaunchHelper.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AutoLaunchHelper.release.xcconfig"; path = "Target Support Files/Pods-AutoLaunchHelper/Pods-AutoLaunchHelper.release.xcconfig"; sourceTree = ""; }; AE92EEF7DF0DF77FC8C1D8CC /* Pods-ThinkpadAssistant.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ThinkpadAssistant.release.xcconfig"; path = "Target Support Files/Pods-ThinkpadAssistant/Pods-ThinkpadAssistant.release.xcconfig"; sourceTree = ""; }; @@ -270,7 +275,6 @@ TargetAttributes = { FC56DEB91EE98AC7001ACE3F = { CreatedOnToolsVersion = 8.3.2; - DevelopmentTeam = 2Y3274NQLX; LastSwiftMigration = 1140; ProvisioningStyle = Automatic; SystemCapabilities = { @@ -303,6 +307,7 @@ "zh-Hans", it, cs, + pl, ); mainGroup = FC56DEB11EE98AC7001ACE3F; productRefGroup = FC56DEBB1EE98AC7001ACE3F /* Products */; @@ -428,6 +433,7 @@ C9B503772463269300673FFA /* zh-Hans */, F2567B322469343D007C3158 /* it */, F31BF22E24718B3900F40D56 /* cs */, + 2E123FD027691D6400050176 /* pl */, ); name = Localizable.strings; sourceTree = ""; @@ -439,6 +445,7 @@ C9B503762463269300673FFA /* zh-Hans */, F2567B312469343D007C3158 /* it */, F31BF22D24718B3900F40D56 /* cs */, + 2E123FD127691F5400050176 /* pl */, ); name = InfoPlist.strings; sourceTree = ""; @@ -450,6 +457,7 @@ C9B503782463269400673FFA /* zh-Hans */, F2567B332469343E007C3158 /* it */, F31BF22F24718B3900F40D56 /* cs */, + 2E123FD227691FCB00050176 /* pl */, ); name = InfoPlist.strings; sourceTree = ""; @@ -462,6 +470,7 @@ C9B503742463269300673FFA /* zh-Hans */, F2567B2F2469343D007C3158 /* it */, F31BF22B24718B3900F40D56 /* cs */, + 2E123FCC27691C4D00050176 /* pl */, ); name = Main.storyboard; sourceTree = ""; @@ -474,6 +483,7 @@ C9B503752463269300673FFA /* zh-Hans */, F2567B302469343D007C3158 /* it */, F31BF22C24718B3900F40D56 /* cs */, + 2E123FCD27691C4D00050176 /* pl */, ); name = Main.storyboard; sourceTree = ""; @@ -512,7 +522,7 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "-"; + CODE_SIGN_IDENTITY = "Apple Development"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -571,7 +581,7 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "-"; + CODE_SIGN_IDENTITY = "Apple Development"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; @@ -600,9 +610,10 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = ThinkpadAssistant/ThinkpadAssistant.entitlements; CODE_SIGN_IDENTITY = "Mac Developer"; + CODE_SIGN_STYLE = Manual; COMBINE_HIDPI_IMAGES = YES; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 2Y3274NQLX; + DEVELOPMENT_TEAM = JST6EXGEUE; ENABLE_HARDENED_RUNTIME = YES; INFOPLIST_FILE = ThinkpadAssistant/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -629,9 +640,10 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = ThinkpadAssistant/ThinkpadAssistant.entitlements; CODE_SIGN_IDENTITY = "Mac Developer"; + CODE_SIGN_STYLE = Manual; COMBINE_HIDPI_IMAGES = YES; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 2Y3274NQLX; + DEVELOPMENT_TEAM = JST6EXGEUE; ENABLE_HARDENED_RUNTIME = YES; INFOPLIST_FILE = ThinkpadAssistant/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -657,7 +669,7 @@ CODE_SIGN_ENTITLEMENTS = AutoLaunchHelper/AutoLaunchHelper.entitlements; CODE_SIGN_IDENTITY = "Mac Developer"; COMBINE_HIDPI_IMAGES = YES; - DEVELOPMENT_TEAM = 2Y3274NQLX; + DEVELOPMENT_TEAM = JST6EXGEUE; ENABLE_HARDENED_RUNTIME = YES; INFOPLIST_FILE = AutoLaunchHelper/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -681,7 +693,7 @@ CODE_SIGN_ENTITLEMENTS = AutoLaunchHelper/AutoLaunchHelper.entitlements; CODE_SIGN_IDENTITY = "Mac Developer"; COMBINE_HIDPI_IMAGES = YES; - DEVELOPMENT_TEAM = 2Y3274NQLX; + DEVELOPMENT_TEAM = JST6EXGEUE; ENABLE_HARDENED_RUNTIME = YES; INFOPLIST_FILE = AutoLaunchHelper/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( diff --git a/ThinkpadAssistant/pl.lproj/InfoPlist.strings b/ThinkpadAssistant/pl.lproj/InfoPlist.strings new file mode 100644 index 0000000..4d97aa0 --- /dev/null +++ b/ThinkpadAssistant/pl.lproj/InfoPlist.strings @@ -0,0 +1,7 @@ +/* Bundle name */ +"CFBundleName" = "ThinkpadAssistant"; + +/* Copyright (human-readable) */ +"NSHumanReadableCopyright" = "Copyright © 2020 Matthäus Szturc. Wszelkie Prawa +zastrzeżone."; + diff --git a/ThinkpadAssistant/pl.lproj/Localizable.strings b/ThinkpadAssistant/pl.lproj/Localizable.strings new file mode 100644 index 0000000..85161c5 --- /dev/null +++ b/ThinkpadAssistant/pl.lproj/Localizable.strings @@ -0,0 +1,63 @@ +/* No comment provided by engineer. */ +"Backlight\nbright" = "Podświetlenie
Jasne"; + +/* No comment provided by engineer. */ +"Backlight\ndimmed" = "Podświetlenie
Ciemne"; + +/* No comment provided by engineer. */ +"Backlight\noff" = "Podświetlenie
Wyłączone"; + +/* No comment provided by engineer. */ +"Bluetooth\ndisabled" = + "Bluetooth +Wyłączony"; + +/* No comment provided by engineer. */ +"Bluetooth\nenabled" = "Bluetooth +Włączony"; + +/* No comment provided by engineer. */ +"Capslock\ndisabled" = "Caps-Lock +Wyłączony"; + +/* No comment provided by engineer. */ +"Capslock\nenabled" = "Caps-Lock +Włączony"; + +/* No comment provided by engineer. */ +"Function\nKeys" = "Klawisze +Funkcyjne"; + +/* No comment provided by engineer. */ +"Media\nKeys" = "Klawisze +Multimedialne"; + +/* No comment provided by engineer. */ +"Microphone\nmuted" = +"Mikrofon +Wyciszony"; + +/* No comment provided by engineer. */ +"Microphone\nunmuted" = +"Mikrofon +Aktywny"; + +/* No comment provided by engineer. */ +"Screen\nextending" = "Rozszerzanie
Ekranu"; + +/* No comment provided by engineer. */ +"Screen\nmirroring" = "Klonowanie
Ekranu"; + +/* No comment provided by engineer. */ +"Version" = "Wersja"; + +/* No comment provided by engineer. */ +"Wi-Fi\ndisabled" = + "Wi-Fi +Włączone"; + +/* No comment provided by engineer. */ +"Wi-Fi\nenabled" = + "Wi-Fi +Wyłączone"; + diff --git a/ThinkpadAssistant/pl.lproj/Main.strings b/ThinkpadAssistant/pl.lproj/Main.strings new file mode 100644 index 0000000..2adcba8 --- /dev/null +++ b/ThinkpadAssistant/pl.lproj/Main.strings @@ -0,0 +1,24 @@ + +/* Class = "NSMenu"; title = "Main Menu"; ObjectID = "AYu-sK-qS6"; */ +"AYu-sK-qS6.title" = "Menu Główne"; + +/* Class = "NSTextFieldCell"; title = "Copyright © 2020 Matthäus Szturc. All rights reserved."; ObjectID = "Dsc-bK-vCJ"; */ +"Dsc-bK-vCJ.title" = "Copyright © 2020 Matthäus Szturc. Wszelkie Prawa zastrzeżone."; + +/* Class = "NSMenuItem"; title = "About Thinkpad Assistant"; ObjectID = "Kql-K9-yoI"; */ +"Kql-K9-yoI.title" = "O Thinkpad Assistant"; + +/* Class = "NSMenuItem"; title = "Launch on Login"; ObjectID = "Lcb-4h-zk2"; */ +"Lcb-4h-zk2.title" = "Uruchom przy starcie"; + +/* Class = "NSMenuItem"; title = "Monitor Capslock"; ObjectID = "Nth-Jo-BIN"; */ +"Nth-Jo-BIN.title" = "Pokaż Caps-Lock"; + +/* Class = "NSMenuItem"; title = "Quit"; ObjectID = "Q77-Nx-rEG"; */ +"Q77-Nx-rEG.title" = "Wyjdź"; + +/* Class = "NSTextFieldCell"; title = "Version 1.0.0"; ObjectID = "Yvs-Nm-uAg"; */ +"Yvs-Nm-uAg.title" = "Wersja 1.0.0"; + +/* Class = "NSWindow"; title = "About Thinkpad Assistant"; ObjectID = "eOf-uU-tUq"; */ +"eOf-uU-tUq.title" = "O Thinkpad Assistant"; From 5bdbf940666dc20eb61e7c13b834d91538eb1871 Mon Sep 17 00:00:00 2001 From: BlackOtton <52571671+BlackOtton@users.noreply.github.com> Date: Tue, 14 Dec 2021 20:50:51 +0100 Subject: [PATCH 2/3] Update project.pbxproj --- ThinkpadAssistant.xcodeproj/project.pbxproj | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/ThinkpadAssistant.xcodeproj/project.pbxproj b/ThinkpadAssistant.xcodeproj/project.pbxproj index a8446cc..5a5a720 100644 --- a/ThinkpadAssistant.xcodeproj/project.pbxproj +++ b/ThinkpadAssistant.xcodeproj/project.pbxproj @@ -522,7 +522,7 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_IDENTITY = "-"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -581,7 +581,7 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_IDENTITY = "-"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; @@ -610,10 +610,9 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = ThinkpadAssistant/ThinkpadAssistant.entitlements; CODE_SIGN_IDENTITY = "Mac Developer"; - CODE_SIGN_STYLE = Manual; COMBINE_HIDPI_IMAGES = YES; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = JST6EXGEUE; + DEVELOPMENT_TEAM = 2Y3274NQLX; ENABLE_HARDENED_RUNTIME = YES; INFOPLIST_FILE = ThinkpadAssistant/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -640,10 +639,9 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = ThinkpadAssistant/ThinkpadAssistant.entitlements; CODE_SIGN_IDENTITY = "Mac Developer"; - CODE_SIGN_STYLE = Manual; COMBINE_HIDPI_IMAGES = YES; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = JST6EXGEUE; + DEVELOPMENT_TEAM = 2Y3274NQLX; ENABLE_HARDENED_RUNTIME = YES; INFOPLIST_FILE = ThinkpadAssistant/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -669,7 +667,7 @@ CODE_SIGN_ENTITLEMENTS = AutoLaunchHelper/AutoLaunchHelper.entitlements; CODE_SIGN_IDENTITY = "Mac Developer"; COMBINE_HIDPI_IMAGES = YES; - DEVELOPMENT_TEAM = JST6EXGEUE; + DEVELOPMENT_TEAM = 2Y3274NQLX; ENABLE_HARDENED_RUNTIME = YES; INFOPLIST_FILE = AutoLaunchHelper/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -693,7 +691,7 @@ CODE_SIGN_ENTITLEMENTS = AutoLaunchHelper/AutoLaunchHelper.entitlements; CODE_SIGN_IDENTITY = "Mac Developer"; COMBINE_HIDPI_IMAGES = YES; - DEVELOPMENT_TEAM = JST6EXGEUE; + DEVELOPMENT_TEAM = 2Y3274NQLX; ENABLE_HARDENED_RUNTIME = YES; INFOPLIST_FILE = AutoLaunchHelper/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( From cd59732ebc9bd9ae727034aad769e7735532e3f4 Mon Sep 17 00:00:00 2001 From: BlackOtton <52571671+BlackOtton@users.noreply.github.com> Date: Thu, 16 Dec 2021 09:57:37 +0100 Subject: [PATCH 3/3] Fixed Wi-Fi translation & hide tray icon ability. I fixed Wi-Fi translation in Polish, and added a function that hides the tray icon. --- Podfile.lock | 2 +- ThinkpadAssistant.xcodeproj/project.pbxproj | 19 +++++++------- ThinkpadAssistant/AppDelegate.swift | 26 ++++++++++++++++--- ThinkpadAssistant/Base.lproj/Main.storyboard | 11 ++++---- ThinkpadAssistant/cs.lproj/Main.strings | 2 ++ ThinkpadAssistant/de.lproj/Main.strings | 1 - ThinkpadAssistant/it.lproj/Main.strings | 1 + .../pl.lproj/Localizable.strings | 15 +++++++++-- ThinkpadAssistant/zh-Hans.lproj/Main.strings | 1 + 9 files changed, 57 insertions(+), 21 deletions(-) diff --git a/Podfile.lock b/Podfile.lock index 030ec5f..2561a9c 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -1,3 +1,3 @@ PODFILE CHECKSUM: da4267f11d20800810ec0687a2dda4242b0874c4 -COCOAPODS: 1.9.1 +COCOAPODS: 1.11.2 diff --git a/ThinkpadAssistant.xcodeproj/project.pbxproj b/ThinkpadAssistant.xcodeproj/project.pbxproj index 5a5a720..87eabbe 100644 --- a/ThinkpadAssistant.xcodeproj/project.pbxproj +++ b/ThinkpadAssistant.xcodeproj/project.pbxproj @@ -285,7 +285,6 @@ }; FC56DECF1EE98B3A001ACE3F = { CreatedOnToolsVersion = 8.3.2; - DevelopmentTeam = 2Y3274NQLX; LastSwiftMigration = 1140; ProvisioningStyle = Automatic; SystemCapabilities = { @@ -609,10 +608,10 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = ThinkpadAssistant/ThinkpadAssistant.entitlements; - CODE_SIGN_IDENTITY = "Mac Developer"; + CODE_SIGN_IDENTITY = "-"; COMBINE_HIDPI_IMAGES = YES; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 2Y3274NQLX; + DEVELOPMENT_TEAM = ""; ENABLE_HARDENED_RUNTIME = YES; INFOPLIST_FILE = ThinkpadAssistant/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -638,10 +637,10 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = ThinkpadAssistant/ThinkpadAssistant.entitlements; - CODE_SIGN_IDENTITY = "Mac Developer"; + CODE_SIGN_IDENTITY = "-"; COMBINE_HIDPI_IMAGES = YES; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 2Y3274NQLX; + DEVELOPMENT_TEAM = ""; ENABLE_HARDENED_RUNTIME = YES; INFOPLIST_FILE = ThinkpadAssistant/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -665,15 +664,16 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = AutoLaunchHelper/AutoLaunchHelper.entitlements; - CODE_SIGN_IDENTITY = "Mac Developer"; + CODE_SIGN_IDENTITY = "-"; COMBINE_HIDPI_IMAGES = YES; - DEVELOPMENT_TEAM = 2Y3274NQLX; + DEVELOPMENT_TEAM = ""; ENABLE_HARDENED_RUNTIME = YES; INFOPLIST_FILE = AutoLaunchHelper/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/../Frameworks", ); + MACOSX_DEPLOYMENT_TARGET = 10.15; PRODUCT_BUNDLE_IDENTIFIER = de.mszturc.AutoLaunchHelper; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -689,15 +689,16 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = AutoLaunchHelper/AutoLaunchHelper.entitlements; - CODE_SIGN_IDENTITY = "Mac Developer"; + CODE_SIGN_IDENTITY = "-"; COMBINE_HIDPI_IMAGES = YES; - DEVELOPMENT_TEAM = 2Y3274NQLX; + DEVELOPMENT_TEAM = ""; ENABLE_HARDENED_RUNTIME = YES; INFOPLIST_FILE = AutoLaunchHelper/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/../Frameworks", ); + MACOSX_DEPLOYMENT_TARGET = 10.15; PRODUCT_BUNDLE_IDENTIFIER = de.mszturc.AutoLaunchHelper; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/ThinkpadAssistant/AppDelegate.swift b/ThinkpadAssistant/AppDelegate.swift index 152956d..deb14c6 100644 --- a/ThinkpadAssistant/AppDelegate.swift +++ b/ThinkpadAssistant/AppDelegate.swift @@ -16,12 +16,32 @@ class AppDelegate: NSObject, NSApplicationDelegate { let helperBundleName = "de.mszturc.AutoLaunchHelper" @IBOutlet weak var statusBarMenu: NSMenu! - @IBOutlet weak var monitorCapslocksMenuItem: NSMenuItem! @IBOutlet weak var launchAtLoginMenuItem: NSMenuItem! func applicationDidFinishLaunching(_ aNotification: Notification) { - setupMenuBar() + func dialog(question: String, text: String) -> Bool { + let alert: NSAlert = NSAlert() + alert.messageText = question + alert.informativeText = text + alert.alertStyle = NSAlert.Style.warning + alert.addButton(withTitle: NSLocalizedString("No", comment: "")) + alert.addButton(withTitle: NSLocalizedString("Yes", comment: "")) + let ask = alert.runModal() + if ask == NSApplication.ModalResponse.alertFirstButtonReturn { + setupMenuBar() + return true + } + else { + let notification = NSUserNotification() + notification.title = "ThinkPad Assistant" + notification.subtitle = NSLocalizedString("RiB", comment: "") + notification.soundName = NSUserNotificationDefaultSoundName + NSUserNotificationCenter.default.deliver(notification) + return false + } + } + _ = dialog(question: "ThinkPad Assistant", text: NSLocalizedString("TrayQuestion", comment: "")) ShortcutManager.register() CapslockMonitor.register() } @@ -57,7 +77,7 @@ class AppDelegate: NSObject, NSApplicationDelegate { statusItem.button?.image?.size = NSSize(width: 18, height: 18) statusItem.button?.alternateImage?.size = NSSize(width: 18, height: 18) - statusItem.menu = statusBarMenu + statusItem.menu = statusBarMenu let foundHelper = NSWorkspace.shared.runningApplications.contains { $0.bundleIdentifier == helperBundleName diff --git a/ThinkpadAssistant/Base.lproj/Main.storyboard b/ThinkpadAssistant/Base.lproj/Main.storyboard index 4920558..5aeaa64 100644 --- a/ThinkpadAssistant/Base.lproj/Main.storyboard +++ b/ThinkpadAssistant/Base.lproj/Main.storyboard @@ -1,7 +1,8 @@ - + - + + @@ -79,7 +80,7 @@ - + @@ -101,7 +102,7 @@ - + @@ -118,6 +119,6 @@ - + diff --git a/ThinkpadAssistant/cs.lproj/Main.strings b/ThinkpadAssistant/cs.lproj/Main.strings index 7a5d30d..807be5d 100644 --- a/ThinkpadAssistant/cs.lproj/Main.strings +++ b/ThinkpadAssistant/cs.lproj/Main.strings @@ -22,3 +22,5 @@ /* Class = "NSWindow"; title = "About Thinkpad Assistant"; ObjectID = "eOf-uU-tUq"; */ "eOf-uU-tUq.title" = "O aplikaci Thinkpad Assistant"; + + diff --git a/ThinkpadAssistant/de.lproj/Main.strings b/ThinkpadAssistant/de.lproj/Main.strings index 2e72bdf..c97d029 100644 --- a/ThinkpadAssistant/de.lproj/Main.strings +++ b/ThinkpadAssistant/de.lproj/Main.strings @@ -21,4 +21,3 @@ /* Class = "NSTextFieldCell"; title = "Version 1.0.0"; ObjectID = "Yvs-Nm-uAg"; */ "Yvs-Nm-uAg.title" = "Version 1.0.0"; - diff --git a/ThinkpadAssistant/it.lproj/Main.strings b/ThinkpadAssistant/it.lproj/Main.strings index 9823d0e..27d92e5 100644 --- a/ThinkpadAssistant/it.lproj/Main.strings +++ b/ThinkpadAssistant/it.lproj/Main.strings @@ -21,3 +21,4 @@ /* Class = "NSTextFieldCell"; title = "Version 1.0.0"; ObjectID = "Yvs-Nm-uAg"; */ "Yvs-Nm-uAg.title" = "Versione 1.0.0"; + diff --git a/ThinkpadAssistant/pl.lproj/Localizable.strings b/ThinkpadAssistant/pl.lproj/Localizable.strings index 85161c5..1b53c74 100644 --- a/ThinkpadAssistant/pl.lproj/Localizable.strings +++ b/ThinkpadAssistant/pl.lproj/Localizable.strings @@ -54,10 +54,21 @@ Aktywny"; /* No comment provided by engineer. */ "Wi-Fi\ndisabled" = "Wi-Fi -Włączone"; +Wyłączone"; /* No comment provided by engineer. */ "Wi-Fi\nenabled" = "Wi-Fi -Wyłączone"; +Włączone"; + +/* No comment provided by engineer. */ +"RiB" = "Asystent działa w tle."; +/* No comment provided by engineer. */ +"TrayQuestion" = "Czy chcesz ukryć ikonę asystenta na pasku?"; + +/* No comment provided by engineer. */ +"No" = "Nie"; + +/* No comment provided by engineer. */ +"Yes" = "Tak"; diff --git a/ThinkpadAssistant/zh-Hans.lproj/Main.strings b/ThinkpadAssistant/zh-Hans.lproj/Main.strings index 7ecf887..a36f4cd 100644 --- a/ThinkpadAssistant/zh-Hans.lproj/Main.strings +++ b/ThinkpadAssistant/zh-Hans.lproj/Main.strings @@ -21,3 +21,4 @@ /* Class = "NSTextFieldCell"; title = "Version 1.0.0"; ObjectID = "Yvs-Nm-uAg"; */ "Yvs-Nm-uAg.title" = "版本 1.0.0"; +