Skip to content

Commit c94f5fd

Browse files
committed
🌐 i18n
- Update AMCoreAudio deps - Fix swiftformat error (Display.swift) - Fix translations
1 parent 4c09ef1 commit c94f5fd

16 files changed

Lines changed: 231 additions & 102 deletions

File tree

Cartfile.resolved

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
github "reitermarkus/DDC.swift" "5c03666e17a1a850892c08a5db6f4a208f762f26"
2-
github "rnine/AMCoreAudio" "3.2.1"
2+
github "rnine/AMCoreAudio" "3.3"
33
github "shpakovski/MASPreferences" "1.3"
44
github "the0neyouseek/MediaKeyTap" "abfe09f53ccabb1aa14a0f4ab99cfb8812f41919"

MonitorControl.xcodeproj/project.pbxproj

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
F01B06A0228221B7008E64DB /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F01B0690228221B7008E64DB /* Main.storyboard */; };
3535
F01B06A1228221B7008E64DB /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = F01B0692228221B7008E64DB /* MainMenu.xib */; };
3636
F03A8DF21FFBAA6F0034DC27 /* Display.swift in Sources */ = {isa = PBXBuildFile; fileRef = F03A8DF11FFBAA6F0034DC27 /* Display.swift */; };
37+
F03FE4C0228DF62B001F59A4 /* FriendlyNameCellView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F03FE4BF228DF62A001F59A4 /* FriendlyNameCellView.swift */; };
3738
F0445D3820023E710025AE82 /* MainPrefsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F0445D3720023E710025AE82 /* MainPrefsViewController.swift */; };
3839
F0445D3D200254FA0025AE82 /* KeysPrefsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F0445D3B200254FA0025AE82 /* KeysPrefsViewController.swift */; };
3940
F0445D40200259C10025AE82 /* DisplayPrefsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F0445D3F200259C10025AE82 /* DisplayPrefsViewController.swift */; };
@@ -116,6 +117,7 @@
116117
F01B06A622822217008E64DB /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Main.strings; sourceTree = "<group>"; };
117118
F01B06A72282221B008E64DB /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Main.strings; sourceTree = "<group>"; };
118119
F03A8DF11FFBAA6F0034DC27 /* Display.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Display.swift; sourceTree = "<group>"; };
120+
F03FE4BF228DF62A001F59A4 /* FriendlyNameCellView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FriendlyNameCellView.swift; sourceTree = "<group>"; };
119121
F0445D3720023E710025AE82 /* MainPrefsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainPrefsViewController.swift; sourceTree = "<group>"; };
120122
F0445D3B200254FA0025AE82 /* KeysPrefsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeysPrefsViewController.swift; sourceTree = "<group>"; };
121123
F0445D3F200259C10025AE82 /* DisplayPrefsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DisplayPrefsViewController.swift; sourceTree = "<group>"; };
@@ -223,6 +225,7 @@
223225
F01B0687228221B6008E64DB /* UI */ = {
224226
isa = PBXGroup;
225227
children = (
228+
F03FE4BF228DF62A001F59A4 /* FriendlyNameCellView.swift */,
226229
F01B068E228221B6008E64DB /* ButtonCellView.swift */,
227230
F01B0690228221B7008E64DB /* Main.storyboard */,
228231
F01B0692228221B7008E64DB /* MainMenu.xib */,
@@ -307,13 +310,13 @@
307310
TargetAttributes = {
308311
56754EAA1D9A4016007BCDC5 = {
309312
CreatedOnToolsVersion = 8.0;
310-
DevelopmentTeam = KJ5F4KTDFH;
313+
DevelopmentTeam = KGY56RWR9A;
311314
LastSwiftMigration = 1020;
312315
ProvisioningStyle = Automatic;
313316
};
314317
F06792E6200A73460066C438 = {
315318
CreatedOnToolsVersion = 9.2;
316-
DevelopmentTeam = KJ5F4KTDFH;
319+
DevelopmentTeam = KGY56RWR9A;
317320
LastSwiftMigration = 1020;
318321
ProvisioningStyle = Automatic;
319322
};
@@ -441,6 +444,7 @@
441444
56754EAF1D9A4016007BCDC5 /* AppDelegate.swift in Sources */,
442445
F01B069E228221B7008E64DB /* ButtonCellView.swift in Sources */,
443446
2894D9B82280B30500DF58DA /* CGDirectDisplayID+Extension.swift in Sources */,
447+
F03FE4C0228DF62B001F59A4 /* FriendlyNameCellView.swift in Sources */,
444448
F01B067922822141008E64DB /* Display+Whitelist.swift in Sources */,
445449
F03A8DF21FFBAA6F0034DC27 /* Display.swift in Sources */,
446450
F0445D40200259C10025AE82 /* DisplayPrefsViewController.swift in Sources */,
@@ -618,7 +622,7 @@
618622
CODE_SIGN_IDENTITY = "Mac Developer";
619623
CODE_SIGN_STYLE = Automatic;
620624
COMBINE_HIDPI_IMAGES = YES;
621-
DEVELOPMENT_TEAM = KJ5F4KTDFH;
625+
DEVELOPMENT_TEAM = KGY56RWR9A;
622626
FRAMEWORK_SEARCH_PATHS = (
623627
"$(inherited)",
624628
"$(PROJECT_DIR)/Carthage/Build/Mac",
@@ -642,7 +646,7 @@
642646
CODE_SIGN_IDENTITY = "Mac Developer";
643647
CODE_SIGN_STYLE = Automatic;
644648
COMBINE_HIDPI_IMAGES = YES;
645-
DEVELOPMENT_TEAM = KJ5F4KTDFH;
649+
DEVELOPMENT_TEAM = KGY56RWR9A;
646650
FRAMEWORK_SEARCH_PATHS = (
647651
"$(inherited)",
648652
"$(PROJECT_DIR)/Carthage/Build/Mac",
@@ -670,7 +674,7 @@
670674
CODE_SIGN_IDENTITY = "Mac Developer";
671675
CODE_SIGN_STYLE = Automatic;
672676
COMBINE_HIDPI_IMAGES = YES;
673-
DEVELOPMENT_TEAM = KJ5F4KTDFH;
677+
DEVELOPMENT_TEAM = KGY56RWR9A;
674678
GCC_C_LANGUAGE_STANDARD = gnu11;
675679
INFOPLIST_FILE = MonitorControlHelper/Info.plist;
676680
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
@@ -692,7 +696,7 @@
692696
CODE_SIGN_IDENTITY = "Mac Developer";
693697
CODE_SIGN_STYLE = Automatic;
694698
COMBINE_HIDPI_IMAGES = YES;
695-
DEVELOPMENT_TEAM = KJ5F4KTDFH;
699+
DEVELOPMENT_TEAM = KGY56RWR9A;
696700
GCC_C_LANGUAGE_STANDARD = gnu11;
697701
INFOPLIST_FILE = MonitorControlHelper/Info.plist;
698702
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";

MonitorControl/AppDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
108108
os_log("The following supported displays were found:", type: .info)
109109

110110
for screen in filteredScreens {
111-
os_log(" - %{public}@", type: .info, "\(screen.displayName ?? NSLocalizedString("Unknown", comment: "unknown display name")) (Vendor: \(screen.vendorNumber ?? 0), Model: \(screen.modelNumber ?? 0))")
111+
os_log(" - %{public}@", type: .info, "\(screen.displayName ?? NSLocalizedString("Unknown", comment: "Unknown display name")) (Vendor: \(screen.vendorNumber ?? 0), Model: \(screen.modelNumber ?? 0))")
112112
self.addScreenToMenu(screen: screen, asSubMenu: filteredScreens.count > 1)
113113
}
114114
}

MonitorControl/Display.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class Display {
7070

7171
self.hideDisplayOsd()
7272
self.showOsd(command: .audioSpeakerVolume, value: value)
73-
self.playVolumeChangedSound()
73+
self.playVolumeChangedSound()
7474
}
7575

7676
if let slider = volumeSliderHandler?.slider {

MonitorControl/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<key>CFBundleShortVersionString</key>
2020
<string>1.5.1</string>
2121
<key>CFBundleVersion</key>
22-
<string>509</string>
22+
<string>514</string>
2323
<key>LSApplicationCategoryType</key>
2424
<string>public.app-category.utilities</string>
2525
<key>LSMinimumSystemVersion</key>

MonitorControl/Support/Utils.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ class Utils: NSObject {
115115
/// - Parameter edid: the EDID of a display
116116
/// - Returns: a string
117117
static func getDisplayName(forEdid edid: EDID) -> String {
118-
return edid.displayName() ?? NSLocalizedString("Unknown", comment: "")
118+
return edid.displayName() ?? NSLocalizedString("Unknown", comment: "Unknown display name")
119119
}
120120

121121
/// Get the main display from a list of display

MonitorControl/Support/de.lproj/Localizable.strings

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1+
12
/* Shown in menu */
23
"Brightness" = "Helligkeit";
34

5+
/* Build */
6+
"Build" = "Build";
7+
48
/* Shown in menu */
59
"Contrast" = "Kontrast";
610

@@ -31,12 +35,16 @@
3135
/* Shown in the alert dialog */
3236
"Shortcuts not available" = "Kurzbefehle nicht verfügbar";
3337

34-
/* unknown display name */
38+
/* unknown display name
39+
unknown model
40+
unknown vendor */
3541
"Unknown" = "Unbekannt";
3642

43+
/* Version */
44+
"Version" = "Version";
45+
3746
/* Shown in menu */
3847
"Volume" = "Lautstärke";
3948

4049
/* Shown in the alert dialog */
4150
"You need to enable MonitorControl in System Preferences > Security and Privacy > Accessibility for the keyboard shortcuts to work" = "Du musst MonitorControl in Systemeinstellungen > Sicherheit > Datenschutz > Bedienungshilfen aktivieren, damit die Kurzbefehle funktionieren.";
42-
Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1+
12
/* Sown in menu */
23
"Brightness" = "Brightness";
34

5+
/* Build */
6+
"Build" = "Build";
7+
48
/* Shown in menu */
59
"Contrast" = "Contrast";
610

@@ -10,32 +14,37 @@
1014
/* No comment provided by engineer. */
1115
"Display" = "Display";
1216

13-
/* Shown in menu */
14-
"No supported display found" = "No supported display found";
15-
16-
/* Shown in menu */
17-
"Set as default" = "Set as default";
17+
/* Shown in the main prefs window */
18+
"General" = "General";
1819

19-
/* No comment provided by engineer. */
20-
"Unknown" = "Unknown";
20+
/* Shown in the main prefs window */
21+
"Keys" = "Keys";
2122

2223
/* Shown in menu */
23-
"Volume" = "Volume";
24+
"No supported display found" = "No supported display found";
25+
26+
/* Shown in the alert dialog */
27+
"Ok" = "Ok";
2428

2529
/* Shown in Preferences window */
2630
"Preferences" = "Preferences";
2731

28-
/* Shown in the alert dialog */
29-
"Ok" = "Ok";
32+
/* Shown in menu */
33+
"Set as default" = "Set as default";
3034

3135
/* Shown in the alert dialog */
3236
"Shortcuts not available" = "Shortcuts not available";
3337

34-
/* Shown in the alert dialog */
35-
"You need to enable MonitorControl in System Preferences > Security and Privacy > Accessibility for the keyboard shortcuts to work" = "You need to enable MonitorControl in System Preferences > Security and Privacy > Accessibility for the keyboard shortcuts to work";
38+
/* Unknown display name
39+
Unknown model
40+
Unknown vendor */
41+
"Unknown" = "Unknown";
3642

37-
/* Shown in the main prefs window */
38-
"General" = "General";
43+
/* Version */
44+
"Version" = "Version";
3945

40-
/* Shown in the main prefs window */
41-
"Keys" = "Keys";
46+
/* Shown in menu */
47+
"Volume" = "Volume";
48+
49+
/* Shown in the alert dialog */
50+
"You need to enable MonitorControl in System Preferences > Security and Privacy > Accessibility for the keyboard shortcuts to work" = "You need to enable MonitorControl in System Preferences > Security and Privacy > Accessibility for the keyboard shortcuts to work";
Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,50 @@
1+
12
/* Sown in menu */
23
"Brightness" = "Luminosité";
34

5+
/* Build */
6+
"Build" = "Build";
7+
48
/* Shown in menu */
59
"Contrast" = "Contraste";
610

711
/* Shown in menu */
812
"Default" = "Écran par défaut";
913

1014
/* No comment provided by engineer. */
11-
"Display" = "Écran";
12-
13-
/* Shown in menu */
14-
"No supported display found" = "Aucun écran supporté trouvé";
15+
"Display" = "Écrans";
1516

16-
/* Shown in menu */
17-
"Set as default" = "Enregistrer comme écran par défaut";
17+
/* Shown in the main prefs window */
18+
"General" = "Général";
1819

19-
/* No comment provided by engineer. */
20-
"Unknown" = "Inconnu";
20+
/* Shown in the main prefs window */
21+
"Keys" = "Touches";
2122

2223
/* Shown in menu */
23-
"Volume" = "Volume";
24+
"No supported display found" = "Aucun écran supporté trouvé";
25+
26+
/* Shown in the alert dialog */
27+
"Ok" = "Ok";
2428

2529
/* Shown in Preferences window */
2630
"Preferences" = "Préférences";
2731

28-
/* Shown in the alert dialog */
29-
"Ok" = "Ok";
32+
/* Shown in menu */
33+
"Set as default" = "Enregistrer comme écran par défaut";
3034

3135
/* Shown in the alert dialog */
3236
"Shortcuts not available" = "Raccourcis non disponible";
3337

34-
/* Shown in the alert dialog */
35-
"You need to enable MonitorControl in System Preferences > Security and Privacy > Accessibility for the keyboard shortcuts to work" = "Vous devez activer MonitorControl dans Préférences Système > Sécurité et confidentialité > Accessibilité pour que les raccourcis clavier fonctionnes";
38+
/* Unknown display name
39+
Unknown model
40+
Unknown vendor */
41+
"Unknown" = "Inconnu";
3642

37-
/* Shown in the main prefs window */
38-
"General" = "Général";
43+
/* Version */
44+
"Version" = "Version";
3945

40-
/* Shown in the main prefs window */
41-
"Keys" = "Touches";
46+
/* Shown in menu */
47+
"Volume" = "Volume";
48+
49+
/* Shown in the alert dialog */
50+
"You need to enable MonitorControl in System Preferences > Security and Privacy > Accessibility for the keyboard shortcuts to work" = "Vous devez activer MonitorControl dans Préférences Système > Sécurité et confidentialité > Accessibilité pour que les raccourcis clavier fonctionnes";

MonitorControl/UI/de.lproj/Main.strings

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
1+
12
/* Class = "NSButtonCell"; title = "Change Brightness/Volume for all screens"; ObjectID = "0Z7-PQ-Bl8"; */
23
"0Z7-PQ-Bl8.title" = "Helligkeit/Lautstärke für alle Monitore ändern";
34

45
/* Class = "NSTableColumn"; headerCell.title = "Enabled"; ObjectID = "8U8-ec-Zbv"; */
56
"8U8-ec-Zbv.headerCell.title" = "Aktiv";
67

7-
/* Class = "NSTextFieldCell"; title = "Table View Cell"; ObjectID = "aSw-3H-uNa"; */
8-
"aSw-3H-uNa.title" = "Table View Cell";
9-
108
/* Class = "NSTableColumn"; headerCell.title = "Name"; ObjectID = "CHc-s5-4MN"; */
119
"CHc-s5-4MN.headerCell.title" = "Name";
1210

13-
/* Class = "NSTextFieldCell"; title = "Table View Cell"; ObjectID = "cnb-Li-1lE"; */
14-
"cnb-Li-1lE.title" = "Table View Cell";
15-
1611
/* Class = "NSTextFieldCell"; title = "Keys"; ObjectID = "Dcz-GG-1li"; */
1712
"Dcz-GG-1li.title" = "Tasten";
1813

@@ -43,6 +38,9 @@
4338
/* Class = "NSTableColumn"; headerCell.title = "Model"; ObjectID = "Nvp-hI-w4x"; */
4439
"Nvp-hI-w4x.headerCell.title" = "Modell";
4540

41+
/* Class = "NSTableColumn"; headerCell.title = "Friendly Name"; ObjectID = "uoI-1J-RdD"; */
42+
"uoI-1J-RdD.headerCell.title" = "Anzeigename";
43+
4644
/* Class = "NSTextFieldCell"; title = "Listen for"; ObjectID = "Vh8-06-U3K"; */
4745
"Vh8-06-U3K.title" = "Hören auf";
4846

@@ -52,3 +50,35 @@
5250
/* Class = "NSButtonCell"; title = "Show a slider for contrast"; ObjectID = "xSI-8W-Xd0"; */
5351
"xSI-8W-Xd0.title" = "Slider für Kontrast anzeigen";
5452

53+
/* Class = "NSTextFieldCell"; title = "Text Cell"; ObjectID = "2gr-xG-Byx"; */
54+
"2gr-xG-Byx.title" = "";
55+
56+
/* Class = "NSTextFieldCell"; title = "Table View Cell"; ObjectID = "4or-hS-WeW"; */
57+
"4or-hS-WeW.title" = "";
58+
59+
/* Class = "NSTextFieldCell"; title = "Text Cell"; ObjectID = "afl-95-ZJl"; */
60+
"afl-95-ZJl.title" = "";
61+
62+
/* Class = "NSTextFieldCell"; title = "Text Cell"; ObjectID = "as0-t3-Aub"; */
63+
"as0-t3-Aub.title" = "";
64+
65+
/* Class = "NSTextFieldCell"; title = "Table View Cell"; ObjectID = "aSw-3H-uNa"; */
66+
"aSw-3H-uNa.title" = "";
67+
68+
/* Class = "NSTextFieldCell"; title = "Table View Cell"; ObjectID = "cnb-Li-1lE"; */
69+
"cnb-Li-1lE.title" = "";
70+
71+
/* Class = "NSTextFieldCell"; title = "Table View Cell"; ObjectID = "DGv-iu-Jg1"; */
72+
"DGv-iu-Jg1.title" = "";
73+
74+
/* Class = "NSTextFieldCell"; title = "Version 0.0.0 (Build 0)"; ObjectID = "mBs-6m-13Q"; */
75+
"mBs-6m-13Q.title" = "";
76+
77+
/* Class = "NSTextFieldCell"; title = "Table View Cell"; ObjectID = "Pkk-Ce-Y6Q"; */
78+
"Pkk-Ce-Y6Q.title" = "";
79+
80+
/* Class = "NSTextFieldCell"; title = "Text Cell"; ObjectID = "vkG-RF-Yne"; */
81+
"vkG-RF-Yne.title" = "";
82+
83+
/* Class = "NSTextFieldCell"; title = "Text Cell"; ObjectID = "VPD-MR-IXg"; */
84+
"VPD-MR-IXg.title" = "";

0 commit comments

Comments
 (0)