]> repos.lx-s.de Git - winmute.git/commitdiff
Translated bluetooth settings
authorlx-s <lx-s@users.noreply.github.com>
Wed, 15 Nov 2023 16:41:14 +0000 (17:41 +0100)
committerlx-s <lx-s@users.noreply.github.com>
Wed, 15 Nov 2023 16:41:14 +0000 (17:41 +0100)
Translations/wm_de/resource.h
Translations/wm_de/wm_de.rc
WinMute/Settings_BluetoothDlg.cpp
WinMute/WinMute.rc
WinMute/resource.h

index c3122f1166c4855723dd6da77d4d32700da78072..c6ded3695a8740a7f2416a6e542e2fc0eb517af8 100644 (file)
 #define IDS_TRAYMENU_EXIT               412
 #define IDS_SETTINGS_BTN_SAVE           1000
 #define IDS_SETTINGS_BTN_CANCEL         1001
+#define IDS_SETTINGS_BTN_ADD            1002
+#define IDS_SETTINGS_BTN_EDIT           1003
+#define IDS_SETTINGS_BTN_REMOVE         1004
+#define IDS_SETTINGS_BTN_REMOVE_ALL     1005
 #define IDS_SETTINGS_TAB_GENERAL        1010
 #define IDS_SETTINGS_TAB_MUTE           1011
 #define IDS_SETTINGS_TAB_QUIET_HOURS    1012
 #define IDS_SETTINGS_BLUETOOTH_EDIT_DLG_TITLE 1102
 #define IDS_SETTINGS_BLUETOOTH_ADD_DLG_DEVICE_NAME_LABEL 1103
 #define IDS_SETTINGS_BLUETOOTH_ADD_DLG_ENTER_DEVICE_NAME_TEXT 1104
-#define IDS_SETTINGS_BLUETOOTH_ADD_POPUP_ENTER_DEVICE_NAME_TEXT 1105
+#define IDS_SETTINGS_BLUETOOTH_DESCRIPTION 1110
+#define IDS_SETTINGS_BLUETOOTH_ENABLE_MUTING 1111
+#define IDS_SETTINGS_BLUETOOTH_ENABLE_MUTING_FILTER 1112
+#define IDS_SETTINGS_BLUETOOTH_DISABLED_INFO 1113
 
 // Next default values for new objects
 // 
index 4f025cc2c1e9cd5580fc2098cc0fb723e0817521..70b0586295592f60c1542ea57e705f133947103c 100644 (file)
Binary files a/Translations/wm_de/wm_de.rc and b/Translations/wm_de/wm_de.rc differ
index bc0c368417f2f8a8576d3e6278985551cc0c8599..de7de56daf4949f6915c23d00f03122d547d6637 100644 (file)
@@ -181,6 +181,20 @@ static BOOL CALLBACK ShowChildWindow(HWND hWnd, LPARAM lParam) noexcept
    return TRUE;
 }
 
+static void LoadBluetoothDlgTranslation(HWND hDlg)
+{
+   WMi18n &i18n = WMi18n::GetInstance();
+
+   i18n.SetItemText(hDlg, IDC_BLUETOOTH_DESCRIPTION_LABEL, IDS_SETTINGS_BLUETOOTH_DESCRIPTION);
+   i18n.SetItemText(hDlg, IDC_ENABLE_BLUETOOTH_MUTE, IDS_SETTINGS_BLUETOOTH_ENABLE_MUTING);
+   i18n.SetItemText(hDlg, IDC_ENABLE_BLUETOOTH_MUTE_DEVICE_LIST, IDS_SETTINGS_BLUETOOTH_ENABLE_MUTING_FILTER);
+   i18n.SetItemText(hDlg, IDC_BLUETOOTH_ADD, IDS_SETTINGS_BTN_ADD);
+   i18n.SetItemText(hDlg, IDC_BLUETOOTH_EDIT, IDS_SETTINGS_BTN_EDIT);
+   i18n.SetItemText(hDlg, IDC_BLUETOOTH_REMOVE, IDS_SETTINGS_BTN_REMOVE);
+   i18n.SetItemText(hDlg, IDC_BLUETOOTH_REMOVEALL, IDS_SETTINGS_BTN_REMOVE_ALL);
+   i18n.SetItemText(hDlg, IDC_STATIC_BLUETOOTH_NOT_AVAILABLE, IDS_SETTINGS_BLUETOOTH_DISABLED_INFO);
+}
+
 INT_PTR CALLBACK Settings_BluetoothDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
 {
    switch (msg) {
@@ -189,6 +203,8 @@ INT_PTR CALLBACK Settings_BluetoothDlgProc(HWND hDlg, UINT msg, WPARAM wParam, L
       if (IsAppThemed()) {
          EnableThemeDialogTexture(hDlg, ETDT_ENABLETAB);
       }
+      LoadBluetoothDlgTranslation(hDlg);
+
       WMSettings* settings = reinterpret_cast<WMSettings*>(lParam);
       assert(settings != nullptr);
       SetWindowLongPtr(hDlg, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(settings));
index a9cd8d040c8fafde445173ebea8869d99b9b7b4e..b33f85a52b7ed0811d10fb206c5d4dd83f4ed8dd 100644 (file)
@@ -184,18 +184,17 @@ STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
 EXSTYLE WS_EX_CONTROLPARENT
 FONT 8, "MS Shell Dlg", 400, 0, 0x1
 BEGIN
-    LISTBOX         IDC_BLUETOOTH_LIST,7,90,170,79,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
-    PUSHBUTTON      "Add",IDC_BLUETOOTH_ADD,179,89,56,16
-    PUSHBUTTON      "Edit",IDC_BLUETOOTH_EDIT,179,109,56,16
-    PUSHBUTTON      "Remove",IDC_BLUETOOTH_REMOVE,179,127,56,16
-    PUSHBUTTON      "Remove all",IDC_BLUETOOTH_REMOVEALL,179,147,56,16
-    LTEXT           "Note: Bluetooth is not available on your device, so some options have been disabled.",IDC_STATIC_BLUETOOTH_NOT_AVAILABLE,7,172,228,18
+    LISTBOX         IDC_BLUETOOTH_LIST,7,93,170,79,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
+    PUSHBUTTON      "Add",IDC_BLUETOOTH_ADD,179,92,56,16
+    PUSHBUTTON      "Edit",IDC_BLUETOOTH_EDIT,179,112,56,16
+    PUSHBUTTON      "Remove",IDC_BLUETOOTH_REMOVE,179,130,56,16
+    PUSHBUTTON      "Remove all",IDC_BLUETOOTH_REMOVEALL,179,150,56,16
+    LTEXT           "Note: Bluetooth is not available on your device, so some options have been disabled.",IDC_STATIC_BLUETOOTH_NOT_AVAILABLE,7,175,228,18
     CONTROL         "Enable Bluetooth based muting",IDC_ENABLE_BLUETOOTH_MUTE,
-                    "Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,7,52,228,14
+                    "Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,7,60,228,14
     CONTROL         "Only mute when one of the following devices connect to or disconnect from your PC.",IDC_ENABLE_BLUETOOTH_MUTE_DEVICE_LIST,
-                    "Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,20,66,215,18
-    LTEXT           """Bluetooth Muting"" allows disabling your PC-audio if an audio-class bluetooth device is disconnected, and re-enables your PC-audio if a device is reconnected to your computer.",IDC_STATIC,7,7,228,30
-    LTEXT           "You can enable this behaviour for all audio bluetooth devices or only for a specific set of devices.",IDC_STATIC,7,32,230,21
+                    "Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,20,74,215,18
+    LTEXT           "Description\nDescription\nDescription\nDescription\nDescription",IDC_BLUETOOTH_DESCRIPTION_LABEL,7,7,230,53
 END
 
 IDD_SETTINGS_BLUETOOTH_ADD DIALOGEX 0, 0, 201, 62
@@ -637,6 +636,10 @@ STRINGTABLE
 BEGIN
     IDS_SETTINGS_BTN_SAVE   "Save"
     IDS_SETTINGS_BTN_CANCEL "Cancel"
+    IDS_SETTINGS_BTN_ADD    "Add"
+    IDS_SETTINGS_BTN_EDIT   "Edit"
+    IDS_SETTINGS_BTN_REMOVE "Remove"
+    IDS_SETTINGS_BTN_REMOVE_ALL "Remove all"
 END
 
 STRINGTABLE
@@ -659,6 +662,13 @@ STRINGTABLE
 BEGIN
     IDS_SETTINGS_BLUETOOTH_ADD_DLG_ENTER_DEVICE_NAME_TEXT 
                             "Please enter a bluetooth device name"
+    IDS_SETTINGS_BLUETOOTH_DESCRIPTION 
+                            """Bluetooth Muting"" allows disabling your PC-audio if an audio-class bluetooth device is disconnected, and re-enables your PC-audio if a device is reconnected to your computer.\n\nYou can enable this behaviour for all audio bluetooth devices or only for a specific set of devices."
+    IDS_SETTINGS_BLUETOOTH_ENABLE_MUTING "Enable Bluetooth-based muting."
+    IDS_SETTINGS_BLUETOOTH_ENABLE_MUTING_FILTER 
+                            "Only mute when one of the following devices connect to or disconnect from your PC."
+    IDS_SETTINGS_BLUETOOTH_DISABLED_INFO 
+                            "Note: Bluetooth is not available on your device, so some options have been disabled."
 END
 
 #endif    // English (United Kingdom) resources
index 23fe7ca1eeae084b4566cd0a171dcd1e23a5ead7..a374101484f5f5152043085719451fd448e7f9d3 100644 (file)
 #define IDS_SETTINGS_BTN_CANCEL         1001
 #define IDC_LINK_SUPPORT                1002
 #define IDC_LINK_PROJECT                1002
+#define IDS_SETTINGS_BTN_ADD            1002
 #define IDC_ENABLEQUIETHOURS            1003
 #define IDC_LINK_TICKETS                1003
+#define IDS_SETTINGS_BTN_EDIT           1003
 #define IDC_QUIETHOURS_START            1004
+#define IDS_SETTINGS_BTN_REMOVE         1004
 #define IDC_QUIETHOURS_END              1005
+#define IDS_SETTINGS_BTN_REMOVE_ALL     1005
 #define IDC_FORCEUNMUTE                 1006
 #define IDC_SHOWNOTIFICATIONS           1007
 #define IDC_TREE1                       1008
 #define IDS_SETTINGS_GENERAL_ENABLE_LOGGING 1051
 #define IDC_LABEL_BT_DEVICE_NAME        1052
 #define IDS_SETTINGS_GENERAL_OPEN_LOG_FILE 1052
+#define IDC_BLUETOOTH_DESCRIPTION_LABEL 1053
 #define IDS_SETTINGS_BLUETOOTH_ADD_DLG_TITLE 1101
 #define IDS_SETTINGS_BLUETOOTH_EDIT_DLG_TITLE 1102
 #define IDS_SETTINGS_BLUETOOTH_ADD_DLG_DEVICE_NAME_LABEL 1103
 #define IDS_SETTINGS_BLUETOOTH_ADD_DLG_ENTER_DEVICE_NAME_TEXT 1104
-#define IDS_SETTINGS_BLUETOOTH_ADD_POPUP_ENTER_DEVICE_NAME_TEXT 1105
+#define IDS_SETTINGS_BLUETOOTH_DESCRIPTION 1110
+#define IDS_SETTINGS_BLUETOOTH_ENABLE_MUTING 1111
+#define IDS_SETTINGS_BLUETOOTH_ENABLE_MUTING_FILTER 1112
+#define IDS_SETTINGS_BLUETOOTH_DISABLED_INFO 1113
 #define ID_TRAYMENU_INFO                40001
 #define ID_TRAYMENU_                    40002
 #define ID_TRAYMENU_MUTEON              40003
 #ifndef APSTUDIO_READONLY_SYMBOLS
 #define _APS_NEXT_RESOURCE_VALUE        140
 #define _APS_NEXT_COMMAND_VALUE         40041
-#define _APS_NEXT_CONTROL_VALUE         1053
+#define _APS_NEXT_CONTROL_VALUE         1054
 #define _APS_NEXT_SYMED_VALUE           101
 #endif
 #endif