|
| 1 | +; ================================================================================================ |
| 2 | +; ZoomMate Translation Data - All Languages |
| 3 | +; ================================================================================================ |
| 4 | + |
| 5 | +Global Const $TRANSLATIONS = ObjCreate("Scripting.Dictionary") |
| 6 | + |
| 7 | +; Initialize translations for each language |
| 8 | +_InitializeTranslations() |
| 9 | + |
| 10 | +Func _InitializeTranslations() |
| 11 | + Local $en = ObjCreate("Scripting.Dictionary") |
| 12 | + Local $es = ObjCreate("Scripting.Dictionary") ; Spanish placeholder for future use |
| 13 | + |
| 14 | + ; Language metadata |
| 15 | + $en.Add("LANGNAME", "English") |
| 16 | + |
| 17 | + ; Configuration GUI |
| 18 | + $en.Add("CONFIG_TITLE", "ZoomMate Configuration") |
| 19 | + $en.Add("BTN_SAVE", "Save") |
| 20 | + $en.Add("BTN_QUIT", "Quit ZoomMate") |
| 21 | + |
| 22 | + ; Status messages |
| 23 | + $en.Add("TOOLTIP_IDLE", "Idle") |
| 24 | + $en.Add("INFO_ZOOM_LAUNCHING", "Launching Zoom...") |
| 25 | + $en.Add("INFO_ZOOM_LAUNCHED", "Zoom meeting launched") |
| 26 | + $en.Add("INFO_MEETING_STARTING_IN", "Meeting starting in {0} minute(s).") |
| 27 | + $en.Add("INFO_MEETING_STARTED_AGO", "Meeting started {0} minute(s) ago.") |
| 28 | + $en.Add("INFO_CONFIG_BEFORE_AFTER_START", "Configuring settings for before and after meetings...") |
| 29 | + $en.Add("INFO_CONFIG_BEFORE_AFTER_DONE", "Settings configured for before and after meetings.") |
| 30 | + $en.Add("INFO_MEETING_STARTING_SOON_CONFIG", "Meeting starting soon... Configuring settings.") |
| 31 | + $en.Add("INFO_CONFIG_DURING_MEETING_DONE", "Settings configured for during the meeting.") |
| 32 | + $en.Add("INFO_OUTSIDE_MEETING_WINDOW", "Outside of meeting window. Meeting started more than 2 hours ago.") |
| 33 | + $en.Add("INFO_CONFIG_LOADED", "Configuration loaded successfully.") |
| 34 | + $en.Add("INFO_NO_MEETING_SCHEDULED", "No meeting scheduled for today. Waiting for the next meeting day...") |
| 35 | + |
| 36 | + ; Labels |
| 37 | + $en.Add("LABEL_MEETING_ID", "Zoom Meeting ID") |
| 38 | + $en.Add("LABEL_MIDWEEK_DAY", "Midweek Day") |
| 39 | + $en.Add("LABEL_MIDWEEK_TIME", "Midweek Time (HH:MM)") |
| 40 | + $en.Add("LABEL_WEEKEND_DAY", "Weekend Day") |
| 41 | + $en.Add("LABEL_WEEKEND_TIME", "Weekend Time (HH:MM)") |
| 42 | + |
| 43 | + ; Zoom interface labels |
| 44 | + $en.Add("LABEL_HOST_TOOLS", "Host tools") |
| 45 | + $en.Add("LABEL_MORE_MEETING_CONTROLS", "More meeting controls") |
| 46 | + $en.Add("LABEL_PARTICIPANT", "Participant") |
| 47 | + $en.Add("LABEL_MUTE_ALL", "Mute All") |
| 48 | + $en.Add("LABEL_YES", "Yes") |
| 49 | + $en.Add("LABEL_UNCHECKED_VALUE", "Unchecked") |
| 50 | + $en.Add("LABEL_CURRENTLY_UNMUTED_VALUE", "Currently unmuted") |
| 51 | + $en.Add("LABEL_UNMUTE_AUDIO_VALUE", "Unmute my audio") |
| 52 | + $en.Add("LABEL_STOP_VIDEO_VALUE", "Stop my video") |
| 53 | + $en.Add("LABEL_START_VIDEO_VALUE", "Start my video") |
| 54 | + $en.Add("LABEL_ZOOM_SECURITY_UNMUTE", "Unmute themselves") |
| 55 | + $en.Add("LABEL_ZOOM_SECURITY_SHARE_SCREEN", "Share screen") |
| 56 | + |
| 57 | + ; Help text |
| 58 | + $en.Add("LABEL_HOST_TOOLS_EXPLAIN", "Enter the text that appears on the Host Tools button in your Zoom interface. This is used to locate and click the button automatically.") |
| 59 | + $en.Add("LABEL_PARTICIPANT_EXPLAIN", "Enter the text that appears on the Participants button in your Zoom interface. This is used to locate and open the participants panel.") |
| 60 | + $en.Add("LABEL_MUTE_ALL_EXPLAIN", "Enter the text that appears on the Mute All button in your Zoom interface. This is used to mute all participants automatically.") |
| 61 | + $en.Add("LABEL_YES_EXPLAIN", "Enter the text that appears on confirmation buttons (e.g., ""Yes"", ""OK"") in your Zoom interface. This is used to confirm actions.") |
| 62 | + $en.Add("LABEL_UNCHECKED_VALUE_EXPLAIN", "Enter the text that appears when a setting is unchecked/disabled in your Zoom interface. This is used to detect when settings are disabled.") |
| 63 | + $en.Add("LABEL_CURRENTLY_UNMUTED_VALUE_EXPLAIN", "Enter the text that appears on the audio button when you are currently unmuted in your Zoom interface. This is used to detect audio state.") |
| 64 | + $en.Add("LABEL_UNMUTE_AUDIO_VALUE_EXPLAIN", "Enter the text that appears on the button to unmute your audio in your Zoom interface. This is used to unmute yourself.") |
| 65 | + $en.Add("LABEL_STOP_VIDEO_VALUE_EXPLAIN", "Enter the text that appears on the button to stop your video in your Zoom interface. This is used to stop your video feed.") |
| 66 | + $en.Add("LABEL_START_VIDEO_VALUE_EXPLAIN", "Enter the text that appears on the button to start your video in your Zoom interface. This is used to start your video feed.") |
| 67 | + $en.Add("LABEL_ZOOM_SECURITY_UNMUTE_EXPLAIN", "Enter the text that appears on the Unmute permission setting in Zoom Security settings. This controls whether participants can unmute themselves.") |
| 68 | + $en.Add("LABEL_ZOOM_SECURITY_SHARE_SCREEN_EXPLAIN", "Enter the text that appears on the Share screen permission setting in Zoom Security settings. This controls whether participants can share their screen.") |
| 69 | + |
| 70 | + ; Settings |
| 71 | + $en.Add("LABEL_SNAP_ZOOM_TO", "Snap Zoom window to") |
| 72 | + $en.Add("SNAP_DISABLED", "Disabled") |
| 73 | + $en.Add("SNAP_LEFT", "Left") |
| 74 | + $en.Add("SNAP_RIGHT", "Right") |
| 75 | + $en.Add("LABEL_KEYBOARD_SHORTCUT", "Post-meeting Keyboard Shortcut") |
| 76 | + $en.Add("LABEL_KEYBOARD_SHORTCUT_EXPLAIN", "Enter a keyboard shortcut that will apply post-meeting settings (e.g., Ctrl+Alt+Z). Use ^ for Ctrl, ! for Alt, + for Shift, # for Win, followed by a letter or number.") |
| 77 | + |
| 78 | + ; Error messages |
| 79 | + $en.Add("ERROR_GET_DESKTOP_ELEMENT_FAILED", "Failed to get desktop element.") |
| 80 | + $en.Add("ERROR_ZOOM_LAUNCH", "Error launching Zoom") |
| 81 | + $en.Add("ERROR_ZOOM_WINDOW_NOT_FOUND", "Zoom window not found") |
| 82 | + $en.Add("ERROR_MEETING_ID_NOT_CONFIGURED", "Meeting ID not configured.") |
| 83 | + $en.Add("ERROR_MEETING_ID_FORMAT", "Enter 9–11 digits (no spaces)") |
| 84 | + $en.Add("ERROR_TIME_FORMAT", "Use 24h time HH:MM") |
| 85 | + $en.Add("ERROR_KEYBOARD_SHORTCUT_FORMAT", "Use format like ^!z (Ctrl+Alt+Z). Must include at least one modifier (^ Ctrl, ! Alt, + Shift, # Win) followed by a letter or number.") |
| 86 | + $en.Add("ERROR_REQUIRED", "This field is required") |
| 87 | + $en.Add("ERROR_FIELDS_REQUIRED", "Please complete all required fields") |
| 88 | + $en.Add("ERROR_INVALID_ELEMENT_OBJECT", "Invalid element object.") |
| 89 | + $en.Add("ERROR_FAILED_CLICK_ELEMENT", "Failed to click element") |
| 90 | + $en.Add("ERROR_SETTING_NOT_FOUND", "Setting not found") |
| 91 | + $en.Add("ERROR_UNKNOWN_FEED_TYPE", "Unknown feed type") |
| 92 | + |
| 93 | + ; Overlay messages |
| 94 | + $en.Add("PLEASE_WAIT_TITLE", "Please Wait") |
| 95 | + $en.Add("PLEASE_WAIT_TEXT", "Please wait...") |
| 96 | + $en.Add("POST_MEETING_HIT_KEY_TITLE", "Post-Meeting Settings") |
| 97 | + $en.Add("POST_MEETING_HIT_KEY_TEXT", "Are you ready to apply post-meeting settings? Press ENTER when the prayer is over to apply them, or ESC to cancel.") |
| 98 | + |
| 99 | + ; Section headers |
| 100 | + $en.Add("SECTION_MEETING_INFO", "Meeting Information") |
| 101 | + $en.Add("SECTION_ZOOM_LABELS", "Zoom Interface Labels") |
| 102 | + $en.Add("SECTION_GENERAL_SETTINGS", "General Settings") |
| 103 | + |
| 104 | + ; Day labels (1=Sunday .. 7=Saturday) |
| 105 | + $en.Add("DAY_1", "Sunday") |
| 106 | + $en.Add("DAY_2", "Monday") |
| 107 | + $en.Add("DAY_3", "Tuesday") |
| 108 | + $en.Add("DAY_4", "Wednesday") |
| 109 | + $en.Add("DAY_5", "Thursday") |
| 110 | + $en.Add("DAY_6", "Friday") |
| 111 | + $en.Add("DAY_7", "Saturday") |
| 112 | + |
| 113 | + ; Spanish translations (placeholder for future implementation) |
| 114 | + $es.Add("LANGNAME", "Español") |
| 115 | + $es.Add("CONFIG_TITLE", "Configuración de ZoomMate") |
| 116 | + $es.Add("BTN_SAVE", "Guardar") |
| 117 | + $es.Add("BTN_QUIT", "Salir de ZoomMate") |
| 118 | + ; Add more Spanish translations as needed... |
| 119 | + |
| 120 | + ; Add language dictionaries to main translations object |
| 121 | + $TRANSLATIONS.Add("en", $en) |
| 122 | + $TRANSLATIONS.Add("es", $es) |
| 123 | +EndFunc ;==>_InitializeTranslations |
| 124 | + |
| 125 | +; Helper function to get translations for a specific language |
| 126 | +; @param $langCode - Language code (e.g., "en", "es") |
| 127 | +; @return Object - Dictionary containing translations for the specified language |
| 128 | +Func _GetLanguageTranslations($langCode) |
| 129 | + If $TRANSLATIONS.Exists($langCode) Then |
| 130 | + Return $TRANSLATIONS.Item($langCode) |
| 131 | + Else |
| 132 | + ; Fallback to English if requested language not found |
| 133 | + Return $TRANSLATIONS.Item("en") |
| 134 | + EndIf |
| 135 | +EndFunc ;==>_GetLanguageTranslations |
| 136 | + |
| 137 | +; Builds a comma-separated list of available language display names |
| 138 | +; @return String - Comma-separated list of language names |
| 139 | +Func _ListAvailableLanguageNames() |
| 140 | + Local $list = "" |
| 141 | + For $langCode In $TRANSLATIONS.Keys |
| 142 | + Local $translations = _GetLanguageTranslations($langCode) |
| 143 | + If $translations.Exists("LANGNAME") Then |
| 144 | + Local $langName = $translations.Item("LANGNAME") |
| 145 | + $list &= ($list = "" ? $langName : "," & $langName) |
| 146 | + EndIf |
| 147 | + Next |
| 148 | + Return $list |
| 149 | +EndFunc ;==>_ListAvailableLanguageNames |
| 150 | + |
| 151 | +; Gets the display name for a language code |
| 152 | +; @param $code - Language code (e.g., "en", "es") |
| 153 | +; @return String - Display name or the code itself if not found |
| 154 | +Func _GetLanguageDisplayName($code) |
| 155 | + Local $translations = _GetLanguageTranslations($code) |
| 156 | + If $translations.Exists("LANGNAME") Then |
| 157 | + Return $translations.Item("LANGNAME") |
| 158 | + EndIf |
| 159 | + Return $code |
| 160 | +EndFunc ;==>_GetLanguageDisplayName |
0 commit comments