Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polish Translation & Hide Tray Icon #55

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions AutoLaunchHelper/pl.lproj/InfoPlist.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/* Bundle name */
"CFBundleName" = "AutoLaunchHelper";

/* Copyright (human-readable) */
"NSHumanReadableCopyright" = "Copyright © 2020 Matthäus Szturc. Wszelkie Prawa zastrzeżone.";

3 changes: 3 additions & 0 deletions AutoLaunchHelper/pl.lproj/Main.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

/* Class = "NSMenu"; title = "Main Menu"; ObjectID = "AYu-sK-qS6"; */
"AYu-sK-qS6.title" = "Menu Główne";
2 changes: 1 addition & 1 deletion Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
PODFILE CHECKSUM: da4267f11d20800810ec0687a2dda4242b0874c4

COCOAPODS: 1.9.1
COCOAPODS: 1.11.2
31 changes: 21 additions & 10 deletions ThinkpadAssistant.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "<group>"; };
2E123FCC27691C4D00050176 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/Main.strings; sourceTree = "<group>"; };
2E123FCD27691C4D00050176 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/Main.strings; sourceTree = "<group>"; };
2E123FD027691D6400050176 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/Localizable.strings; sourceTree = "<group>"; };
2E123FD127691F5400050176 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/InfoPlist.strings; sourceTree = "<group>"; };
2E123FD227691FCB00050176 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/InfoPlist.strings; sourceTree = "<group>"; };
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 = "<group>"; };
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 = "<group>"; };
Expand Down Expand Up @@ -270,7 +275,6 @@
TargetAttributes = {
FC56DEB91EE98AC7001ACE3F = {
CreatedOnToolsVersion = 8.3.2;
DevelopmentTeam = 2Y3274NQLX;
LastSwiftMigration = 1140;
ProvisioningStyle = Automatic;
SystemCapabilities = {
Expand All @@ -281,7 +285,6 @@
};
FC56DECF1EE98B3A001ACE3F = {
CreatedOnToolsVersion = 8.3.2;
DevelopmentTeam = 2Y3274NQLX;
LastSwiftMigration = 1140;
ProvisioningStyle = Automatic;
SystemCapabilities = {
Expand All @@ -303,6 +306,7 @@
"zh-Hans",
it,
cs,
pl,
);
mainGroup = FC56DEB11EE98AC7001ACE3F;
productRefGroup = FC56DEBB1EE98AC7001ACE3F /* Products */;
Expand Down Expand Up @@ -428,6 +432,7 @@
C9B503772463269300673FFA /* zh-Hans */,
F2567B322469343D007C3158 /* it */,
F31BF22E24718B3900F40D56 /* cs */,
2E123FD027691D6400050176 /* pl */,
);
name = Localizable.strings;
sourceTree = "<group>";
Expand All @@ -439,6 +444,7 @@
C9B503762463269300673FFA /* zh-Hans */,
F2567B312469343D007C3158 /* it */,
F31BF22D24718B3900F40D56 /* cs */,
2E123FD127691F5400050176 /* pl */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
Expand All @@ -450,6 +456,7 @@
C9B503782463269400673FFA /* zh-Hans */,
F2567B332469343E007C3158 /* it */,
F31BF22F24718B3900F40D56 /* cs */,
2E123FD227691FCB00050176 /* pl */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
Expand All @@ -462,6 +469,7 @@
C9B503742463269300673FFA /* zh-Hans */,
F2567B2F2469343D007C3158 /* it */,
F31BF22B24718B3900F40D56 /* cs */,
2E123FCC27691C4D00050176 /* pl */,
);
name = Main.storyboard;
sourceTree = "<group>";
Expand All @@ -474,6 +482,7 @@
C9B503752463269300673FFA /* zh-Hans */,
F2567B302469343D007C3158 /* it */,
F31BF22C24718B3900F40D56 /* cs */,
2E123FCD27691C4D00050176 /* pl */,
);
name = Main.storyboard;
sourceTree = "<group>";
Expand Down Expand Up @@ -599,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 = (
Expand All @@ -628,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 = (
Expand All @@ -655,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 = "";
Expand All @@ -679,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 = "";
Expand Down
26 changes: 23 additions & 3 deletions ThinkpadAssistant/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down Expand Up @@ -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
Expand Down
11 changes: 6 additions & 5 deletions ThinkpadAssistant/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="16096" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="19455" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="16096"/>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="19455"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
Expand Down Expand Up @@ -79,7 +80,7 @@
<scene sceneID="cZk-Md-USw">
<objects>
<viewController id="ahD-Xn-7zm" customClass="AboutViewController" customModule="ThinkpadAssistant" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" translatesAutoresizingMaskIntoConstraints="NO" id="xlW-zJ-aUL">
<view key="view" id="xlW-zJ-aUL">
<rect key="frame" x="0.0" y="0.0" width="400" height="200"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
Expand All @@ -101,7 +102,7 @@
<rect key="frame" x="20" y="18" width="360" height="15"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" lineBreakMode="clipping" alignment="center" title="Copyright © 2020 Matthäus Szturc. All rights reserved." id="Dsc-bK-vCJ">
<font key="font" metaFont="label" size="12"/>
<font key="font" metaFont="cellTitle"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
Expand All @@ -118,6 +119,6 @@
</scene>
</scenes>
<resources>
<image name="menuIcon" width="1024" height="1024"/>
<image name="menuIcon" width="64" height="64"/>
</resources>
</document>
2 changes: 2 additions & 0 deletions ThinkpadAssistant/cs.lproj/Main.strings
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@

/* Class = "NSWindow"; title = "About Thinkpad Assistant"; ObjectID = "eOf-uU-tUq"; */
"eOf-uU-tUq.title" = "O aplikaci Thinkpad Assistant";


1 change: 0 additions & 1 deletion ThinkpadAssistant/de.lproj/Main.strings
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@

/* Class = "NSTextFieldCell"; title = "Version 1.0.0"; ObjectID = "Yvs-Nm-uAg"; */
"Yvs-Nm-uAg.title" = "Version 1.0.0";

1 change: 1 addition & 0 deletions ThinkpadAssistant/it.lproj/Main.strings
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@

/* Class = "NSTextFieldCell"; title = "Version 1.0.0"; ObjectID = "Yvs-Nm-uAg"; */
"Yvs-Nm-uAg.title" = "Versione 1.0.0";

7 changes: 7 additions & 0 deletions ThinkpadAssistant/pl.lproj/InfoPlist.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/* Bundle name */
"CFBundleName" = "ThinkpadAssistant";

/* Copyright (human-readable) */
"NSHumanReadableCopyright" = "Copyright © 2020 Matthäus Szturc. Wszelkie Prawa
zastrzeżone.";

74 changes: 74 additions & 0 deletions ThinkpadAssistant/pl.lproj/Localizable.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
/* 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
Wyłączone";

/* No comment provided by engineer. */
"Wi-Fi\nenabled" =
"Wi-Fi
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";
24 changes: 24 additions & 0 deletions ThinkpadAssistant/pl.lproj/Main.strings
Original file line number Diff line number Diff line change
@@ -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";
1 change: 1 addition & 0 deletions ThinkpadAssistant/zh-Hans.lproj/Main.strings
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@

/* Class = "NSTextFieldCell"; title = "Version 1.0.0"; ObjectID = "Yvs-Nm-uAg"; */
"Yvs-Nm-uAg.title" = "版本 1.0.0";