From 53534edbfc7421ab607af38ceb70ffeab7167a1a Mon Sep 17 00:00:00 2001 From: jimmy-sketch Date: Fri, 19 Dec 2025 22:45:14 +0800 Subject: [PATCH 1/4] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=8E=86=E5=8F=B2?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E4=B8=8D=E6=98=BE=E7=A4=BA=E6=9D=83=E9=87=8D?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Language/modules/history.py | 5 --- .../history/roll_call_history_table.py | 41 +++++-------------- 2 files changed, 11 insertions(+), 35 deletions(-) diff --git a/app/Language/modules/history.py b/app/Language/modules/history.py index 5e52db35..a5d7d69b 100644 --- a/app/Language/modules/history.py +++ b/app/Language/modules/history.py @@ -46,11 +46,6 @@ "name": "选择奖池", "description": "选择要查看历史记录的奖池", }, - "select_weight": { - "name": "显示权重", - "description": "是否在表格中显示权重信息", - "switchbutton_name": {"enable": "", "disable": ""}, - }, "clear_lottery_history": { "name": "清除抽奖历史记录", "description": "清除选定奖池的抽奖历史记录", diff --git a/app/view/settings/history/roll_call_history_table.py b/app/view/settings/history/roll_call_history_table.py index 4cc17ea5..e60ab1aa 100644 --- a/app/view/settings/history/roll_call_history_table.py +++ b/app/view/settings/history/roll_call_history_table.py @@ -965,35 +965,16 @@ def update_table_headers(self): self.current_mode = 0 if self.current_mode == 0: - if readme_settings_async("history_management", "select_weight"): - headers = get_content_name_async( - "roll_call_history_table", "HeaderLabels_all_weight" - ) - else: - headers = get_content_name_async( - "roll_call_history_table", "HeaderLabels_all_not_weight" - ) - self.table.setColumnCount(len(headers)) - self.table.setHorizontalHeaderLabels(headers) + headers = get_content_name_async( + "roll_call_history_table", "HeaderLabels_all_weight" + ) elif self.current_mode == 1: - if readme_settings_async("history_management", "select_weight"): - headers = get_content_name_async( - "roll_call_history_table", "HeaderLabels_time_weight" - ) - else: - headers = get_content_name_async( - "roll_call_history_table", "HeaderLabels_time_not_weight" - ) - self.table.setColumnCount(len(headers)) - self.table.setHorizontalHeaderLabels(headers) + headers = get_content_name_async( + "roll_call_history_table", "HeaderLabels_time_weight" + ) else: - if readme_settings_async("history_management", "select_weight"): - headers = get_content_name_async( - "roll_call_history_table", "HeaderLabels_Individual_weight" - ) - else: - headers = get_content_name_async( - "roll_call_history_table", "HeaderLabels_Individual_not_weight" - ) - self.table.setColumnCount(len(headers)) - self.table.setHorizontalHeaderLabels(headers) + headers = get_content_name_async( + "roll_call_history_table", "HeaderLabels_Individual_weight" + ) + self.table.setColumnCount(len(headers)) + self.table.setHorizontalHeaderLabels(headers) \ No newline at end of file From 8dd4e05db5b1529490a791efaab03ff12943e4b5 Mon Sep 17 00:00:00 2001 From: jimmy-sketch Date: Fri, 19 Dec 2025 22:47:42 +0800 Subject: [PATCH 2/4] =?UTF-8?q?chore:=20=E4=BF=AE=E6=95=B4=E4=B8=80?= =?UTF-8?q?=E4=BA=9B=E7=A0=81=E9=A3=8E=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/view/settings/history/lottery_history_table.py | 8 ++------ app/view/settings/history/roll_call_history_table.py | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/app/view/settings/history/lottery_history_table.py b/app/view/settings/history/lottery_history_table.py index 1b930cda..6cc38942 100644 --- a/app/view/settings/history/lottery_history_table.py +++ b/app/view/settings/history/lottery_history_table.py @@ -872,17 +872,13 @@ def update_table_headers(self): headers = get_content_name_async( "lottery_history_table", "HeaderLabels_all_weight" ) - self.table.setColumnCount(len(headers)) - self.table.setHorizontalHeaderLabels(headers) elif self.current_mode == 1: headers = get_content_name_async( "lottery_history_table", "HeaderLabels_time_weight" ) - self.table.setColumnCount(len(headers)) - self.table.setHorizontalHeaderLabels(headers) else: headers = get_content_name_async( "lottery_history_table", "HeaderLabels_Individual_weight" ) - self.table.setColumnCount(len(headers)) - self.table.setHorizontalHeaderLabels(headers) + self.table.setColumnCount(len(headers)) + self.table.setHorizontalHeaderLabels(headers) diff --git a/app/view/settings/history/roll_call_history_table.py b/app/view/settings/history/roll_call_history_table.py index e60ab1aa..8ce43dd4 100644 --- a/app/view/settings/history/roll_call_history_table.py +++ b/app/view/settings/history/roll_call_history_table.py @@ -977,4 +977,4 @@ def update_table_headers(self): "roll_call_history_table", "HeaderLabels_Individual_weight" ) self.table.setColumnCount(len(headers)) - self.table.setHorizontalHeaderLabels(headers) \ No newline at end of file + self.table.setHorizontalHeaderLabels(headers) From d5e72c9e56fa8b4ba046ffa14d6007d8b62367ef Mon Sep 17 00:00:00 2001 From: jimmy-sketch Date: Fri, 19 Dec 2025 23:31:28 +0800 Subject: [PATCH 3/4] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=AF=AD=E8=A8=80?= =?UTF-8?q?=E6=96=87=E6=9C=AC=E5=AF=BC=E5=85=A5=E8=84=9A=E6=9C=AC=EF=BC=8C?= =?UTF-8?q?=E5=A4=A7=E9=87=8F=E6=9B=B4=E6=96=B0=E8=AF=AD=E8=A8=80=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Language/modules/basic_settings.py | 166 +++-- app/Language/modules/custom_settings.py | 196 ++++- app/Language/modules/extraction_settings.py | 552 +++++++++++++- app/Language/modules/fair_draw.py | 74 +- app/Language/modules/history.py | 190 ++++- app/Language/modules/list_management.py | 299 +++++++- app/Language/modules/lottery_list.py | 524 +++++++++++-- app/Language/modules/lottery_main.py | 46 +- app/Language/modules/more_settings.py | 58 +- app/Language/modules/notification_settings.py | 302 +++++++- app/Language/modules/remaining_list.py | 28 +- app/Language/modules/roll_call_list.py | 704 ++++++++++++++++-- app/Language/modules/roll_call_main.py | 38 +- app/Language/modules/safety_settings.py | 174 ++--- .../modules/sidebar_tray_management.py | 266 +++++-- app/Language/modules/update.py | 163 ++-- app/Language/modules/voice_settings.py | 122 ++- scripts/import_crowdin_language.py | 322 ++++++-- 18 files changed, 3566 insertions(+), 658 deletions(-) diff --git a/app/Language/modules/basic_settings.py b/app/Language/modules/basic_settings.py index 5989d7b5..73a4ed12 100644 --- a/app/Language/modules/basic_settings.py +++ b/app/Language/modules/basic_settings.py @@ -144,62 +144,62 @@ }, }, }, - "EN_US": { + "EN_US": { "title": { "name": "Basic settings", - "description": "Configure basic features and appearance of software", + "description": "Configure basic features and appearance of software" }, "basic_function": { "name": "Basic functions", - "description": "Configure software's core functions", + "description": "Configure software's core functions" }, "data_management": { "name": "Data management", - "description": "Import or export the software's data", + "description": "Import or export the software's data" }, "personalised": { "name": "Customization", - "description": "Customize the look and experience of software", + "description": "Customize the look and experience of software" }, "autostart": { "name": "Start on boot", - "description": "Set whether the software is running automatically with the system", - }, - "show_startup_window": { - "name": "Show main window on startup", - "description": "Set whether to automatically display the main window when the software starts", + "description": "Set whether the software is running automatically with the system" }, "check_update": { "name": "Check for updates on startup", - "description": "Set whether new versions will be checked automatically on boot", + "description": "Set whether to automatically check for new versions when software starts" + }, + "show_startup_window": { + "name": "Show splash screen", + "description": "Set whether to show the splash screen on boot" }, "export_diagnostic_data": { "name": "Export diagnostic data", "description": "Export Diagnostic Information on Exit", - "pushbutton_name": "Export diagnostic data", + "pushbutton_name": "Export diagnostic data" }, "export_settings": { "name": "Export settings", "description": "Export current settings to profile", - "pushbutton_name": "Export settings", + "pushbutton_name": "Export settings" }, "import_settings": { "name": "Import settings", "description": "Import settings from profile to overwrite the current profile", - "pushbutton_name": "Import settings", + "pushbutton_name": "Import settings" }, "export_all_data": { "name": "Export all data", - "description": "Export all data and settings on exit", - "pushbutton_name": "Export all data", + "description": "Export all data and settings when exit", + "pushbutton_name": "Export all data" }, "import_all_data": { "name": "Import all data", - "description": "Restore all data from backup file on boot", - "pushbutton_name": "Import all data", + "description": "Restore all data from backup file when software starts", + "pushbutton_name": "Import all data" }, "dpiScale": { - "name": "DPI Scale", + "name": "DPI scale settings", "description": "Resize the app interface (restart required)", "combo_items": { "0": "100%", @@ -207,37 +207,37 @@ "2": "150%", "3": "175%", "4": "200%", - "5": "Auto", - }, + "5": "Auto" + } }, "font": { "name": "Font", - "description": "Set the font to display (restart required)", + "description": "Set the font to display (restart required)" }, "theme": { "name": "Theme mode", - "description": "Select the theme for the software interface", + "description": "Select the software interface theme style", "combo_items": { "0": "Light", "1": "Dark", - "2": "Follow system", - }, + "2": "Follow system" + } }, "theme_color": { "name": "Theme color", - "description": "Set the theme color of the software", + "description": "Set the software interface theme color" }, "language": { "name": "Display language", - "description": "Switch the software interface language (restart required)", + "description": "Switch display language (restart required)" }, "background_resident": { - "name": "Parish in backend", - "description": "Whether to remain in the back office after closing all windows", + "name": "Run in background", + "description": "Whether to remain in the back office after closing all windows" }, "url_protocol": { - "name": "URL Protocol Registration", - "description": "Sign up for custom URL protocol (secrandom://), support to launch app via link", + "name": "URL protocol register", + "description": "Sign up for custom URL protocol (secrandom://), support to launch app via link" }, "log_level": { "name": "Log level", @@ -247,144 +247,146 @@ "1": "INFO", "2": "WARNING", "3": "ERROR", - "4": "CRITICAL", - }, + "4": "CRITICAL" + } }, "settings_import_export": { "export_success_title": { - "name": "Export settings", + "name": "Export settings" }, "export_success_content": { - "name": "设置已成功导出到:\n{path}", + "name": "Settings have been exported to:\n{path}" }, "export_failure_title": { - "name": "Export settings", + "name": "Export settings" }, "export_failure_content": { - "name": "导出设置失败:\n{error}", + "name": "Failed to export settings: \n{error}" }, "import_confirm_title": { - "name": "Import settings", + "name": "Import settings" }, "import_confirm_content": { - "name": "Are you sure you want to import these settings? This will overwrite the current settings", + "name": "Are you sure you want to import these settings? This will overwrite the current settings" }, "import_confirm_button": { - "name": "Confirm import", + "name": "Confirm import" }, "import_cancel_button": { - "name": "Cancel import", + "name": "Cancel import" }, "import_success_title": { - "name": "Import settings", + "name": "Import settings" }, "import_success_content": { - "name": "Settings successfully imported\napplication restarted for changes to take effect", + "name": "Settings successfully imported\nRestart to take effect" }, "import_success_button": { - "name": "I know", + "name": "Got it" }, "export_success_button": { - "name": "I know", + "name": "Got it" }, "import_failure_title": { - "name": "Import settings", + "name": "Import settings" }, "import_failure_content": { - "name": "导入设置失败:\n{error}", - }, - }, - "show_startup_window_notification": { - "success_enable_content": {"name": "Startup main window display enabled"}, - "info_disable_content": {"name": "Startup main window display disabled"}, + "name": "Failed to import settings: \n{error}" + } }, "data_import_export": { "export_success_title": { - "name": "Export all data", + "name": "Export all data" }, "export_success_content": { - "name": "所有数据已成功导出到:\n{path}", + "name": "All data has been exported to:\n{path}" }, "export_failure_title": { - "name": "Export all data", + "name": "Export all data" }, "export_failure_content": { - "name": "导出所有数据失败:\n{error}", + "name": "Failed to export all data: \n{error}" }, "import_confirm_title": { - "name": "Import all data", + "name": "Import all data" }, "import_confirm_content": { - "name": "Are you sure you want to import these data? This will overwrite the current data", + "name": "Are you sure you want to import these data? This will overwrite the current data" }, "import_confirm_button": { - "name": "Confirm import", + "name": "Confirm import" }, "import_cancel_button": { - "name": "Cancel import", + "name": "Cancel import" }, "import_success_title": { - "name": "Import all data", + "name": "Import all data" }, "import_success_content": { - "name": "Data imported successfully into\napplication restarted for changes to take effect", + "name": "Data imported successfully into\nRestart APP to take effect" }, "import_success_button": { - "name": "I know", + "name": "Got it" }, "import_failure_title": { - "name": "Import all data", + "name": "Import all data" }, "import_failure_content": { - "name": "导入所有数据失败:\n{error}", + "name": "Failed to import all data: \n{error}" }, "existing_files_count": { - "name": "\n... 还有 {len} 个文件", + "name": "\n... still have {len} files" }, "existing_files_title": { - "name": "File already exists", + "name": "File already exists" }, "existing_files_content": { - "name": "以下文件已存在:\n{files}\n\n是否覆盖这些文件?", + "name": "The following files already exist:\n{files}\n\nOverwrite these files?" }, "version_mismatch_title": { - "name": "Version mismatch", + "name": "Version mismatch" }, "version_mismatch_content": { - "name": "导出数据的软件版本与当前版本不一致:\n\n导出数据的软件: {software_name} {version}\n当前软件: SecRandom {current_version}\n\n是否继续导入?", + "name": "The version from imported data mismatches with current version:\n\nImported data is from: {software_name} {version}\nCurrent software is: SecRandom {current_version}\n\nContinue importing?" }, "export_warning_title": { - "name": "Export all data", + "name": "Export all data" }, "export_warning_content": { - "name": "即将导出所有数据,包括:\n\n软件版本、设置配置\n点名名单、抽奖名单\n历史记录、日志文件\n\n注意: 导出的数据可能包含敏感信息,请妥善保管。\n\n是否继续导出?", - }, + "name": "All data will soon be exported, including:\n\nsoftware version, settings,\nname list, prize list,\nhistory, log file\n\nNOTE: exported data may contain sensitive information, please keep it safe.\n\nContinue exporting?" + } }, "diagnostic_data_export": { "export_confirm_button": { - "name": "Confirm Export", + "name": "Confirm Export" }, "export_cancel_button": { - "name": "Cancel Export", + "name": "Cancel export" }, "export_success_title": { - "name": "Export diagnostic data", + "name": "Export diagnostic data" }, "export_success_content": { - "name": "诊断数据已成功导出到:\n{path}", + "name": "Diagnostic data has been exported to:\n{path}" }, "export_failure_title": { - "name": "Export diagnostic data", + "name": "Export diagnostic data" }, "export_failure_content": { - "name": "导出诊断数据失败:\n{error}", + "name": "Failed to export diagnostic data: \n{error}" }, "export_warning_title": { - "name": "Export diagnostic data", + "name": "Export diagnostic data" }, "export_warning_content": { - "name": "即将导出诊断数据,包括:\n\n软件信息、设置配置\n点名名单、抽奖名单\n历史记录、日志文件\n\n注意: 导出的数据可能包含敏感信息,请妥善保管。\n\n是否继续导出?", - }, + "name": "Diagnostic data will soon be exported, including:\n\nsoftware information, settings,\nname list, prize list,\nhistory, log file\n\nNOTE: exported data may contain sensitive information, please keep it safe.\n\nContinue exporting?" + } + }, + "success_enable_content": { + "name": "Enabled displaying main window when launching" }, + "info_disable_content": { + "name": "Disabled displaying main window when launching" + } }, } diff --git a/app/Language/modules/custom_settings.py b/app/Language/modules/custom_settings.py index 20a838e4..b1eb1456 100644 --- a/app/Language/modules/custom_settings.py +++ b/app/Language/modules/custom_settings.py @@ -2,11 +2,11 @@ custom_settings = { "ZH_CN": {"title": {"name": "个性设置", "description": "个性化设置选项"}}, - "EN_US": { + "EN_US": { "title": { - "name": "Profile settings", - "description": "Profile settings", - }, + "name": "Personal Settings", + "description": "Personalized Settings Options" + } }, } @@ -162,5 +162,191 @@ "description": "控制是否显示查看剩余名单按钮", "switchbutton_name": {"enable": "", "disable": ""}, }, - } + }, + "EN_US": { + "title": { + "name": "Page management", + "description": "Page management settings" + }, + "roll_call": { + "name": "Pick settings", + "description": "Pick function settings" + }, + "lottery": { + "name": "Lottery settings", + "description": "Lottery function settings" + }, + "custom": { + "name": "Custom pick settings", + "description": "Custom pick function settings" + }, + "roll_call_method": { + "name": "Picking control panel position", + "description": "Set the location of the picking control panel", + "combo_items": { + "0": "Left", + "1": "Right" + } + }, + "show_name": { + "name": "Name setting button", + "description": "When enabled, the software will display the name setting button", + "switchbutton_name": { + "enable": "Show", + "disable": "Hide" + } + }, + "reset_roll_call": { + "name": "Picking reset button", + "description": "When enabled, the software will display the picking reset button", + "switchbutton_name": { + "enable": "Show", + "disable": "Hide" + } + }, + "roll_call_quantity_control": { + "name": "Control bar of Picking quantity", + "description": "Control whether to display the control bar that adjusts the picking count" + }, + "roll_call_start_button": { + "name": "Start button", + "description": "Control whether to display a button to start the name" + }, + "roll_call_list": { + "name": "Name list switching down", + "description": "Control whether to display a name list switching down" + }, + "roll_call_range": { + "name": "Dropdown box of Picking range", + "description": "Controls whether to display the name range selection dropdown" + }, + "roll_call_gender": { + "name": "Dropdown box of picking gender range", + "description": "Control if you want to display the name gender range selection dropdown" + }, + "roll_call_quantity_label": { + "name": "Quantity label", + "description": "Control whether to display picked numbers/groups label" + }, + "roll_call_remaining_button": { + "name": "View remaining list button", + "description": "Control whether to display a button to view the remaining list" + }, + "lottery_method": { + "name": "Lottery control panel position", + "description": "Set the location of the lottery control panel", + "combo_items": { + "0": "Left", + "1": "Right" + } + }, + "show_lottery_name": { + "name": "Name set button", + "description": "Control whether to display the prize name setting button", + "switchbutton_name": { + "enable": "Show", + "disable": "Hide" + } + }, + "reset_lottery": { + "name": "Reset lottery button", + "description": "Control whether to display the lottery resetting button", + "switchbutton_name": { + "enable": "Show", + "disable": "Hide" + } + }, + "lottery_quantity_control": { + "name": "Control bar of Picking quantity", + "description": "Control whether to display the control bar that adjusts the number of lottery" + }, + "lottery_start_button": { + "name": "Start button", + "description": "Control whether to display a button to start the lottery" + }, + "lottery_list": { + "name": "Lottery list switching down", + "description": "Control whether to display a lottery list switching down" + }, + "lottery_quantity_label": { + "name": "Quantity label", + "description": "Control whether to display the number of meddles" + }, + "lottery_remaining_button": { + "name": "View remaining list button", + "description": "Control whether to display a button to view the remaining list" + }, + "custom_method": { + "name": "Custom pick control panel position", + "description": "Set the custom pick control panel display position", + "combo_items": { + "0": "Left", + "1": "Right" + } + }, + "reset_custom": { + "name": "Reset custom pick button", + "description": "Control whether to display the custom pick resetting button", + "switchbutton_name": { + "enable": "Show", + "disable": "Hide" + } + }, + "custom_quantity_control": { + "name": "Control bar of Picking quantity", + "description": "Control whether to display the control bar that adjusts the custom picking count" + }, + "custom_start_button": { + "name": "Start button", + "description": "Control whether to display the custom pick starting button" + }, + "custom_list": { + "name": "Custom picking list switching down", + "description": "Control whether to display a custom picking list switching down" + }, + "custom_range_start": { + "name": "Custom pick dropdown box", + "description": "Control whether to display custom extraction range selection box" + }, + "custom_range_end": { + "name": "Custom pick gender range dropdown box", + "description": "Control whether to display custom pick gender range selection box" + }, + "draw_custom_method": { + "name": "Custom pick control panel position", + "description": "Control whether to display custom pick control panel position" + }, + "custom_quantity_label": { + "name": "Quantity label", + "description": "Control whether to display custom pick numbers/groups label" + }, + "custom_remaining_button": { + "name": "View remaining list button", + "description": "Control whether to display a button to view the remaining list" + }, + "roll_call_reset_button": { + "name": "Reset picking button", + "description": "Show reset name buttons when enabled" + }, + "lottery_reset_button": { + "name": "Reset lottery button", + "description": "Control whether to display the lottery reset button" + }, + "lottery_roll_call_list": { + "name": "List of students in the prize switches drop-down", + "description": "Control whether to display the student list switching box in lottery" + }, + "lottery_roll_call_range": { + "name": "Pick up frame for student range in lottery", + "description": "Controls whether to display student name selection box in lottery" + }, + "lottery_roll_call_gender": { + "name": "Dropdown box of Gender range in Lottery", + "description": "Controls whether to show a gender naming box for students in lottery" + }, + "custom_reset_button": { + "name": "Reset custom pick button", + "description": "Controls whether to display custom pick reset buttons" + } + }, } diff --git a/app/Language/modules/extraction_settings.py b/app/Language/modules/extraction_settings.py index 50078a55..6156613a 100644 --- a/app/Language/modules/extraction_settings.py +++ b/app/Language/modules/extraction_settings.py @@ -1,6 +1,12 @@ # 抽取设置语言配置 extraction_settings = { - "ZH_CN": {"title": {"name": "抽取设置", "description": "抽取功能设置"}} + "ZH_CN": {"title": {"name": "抽取设置", "description": "抽取功能设置"}}, + "EN_US": { + "title": { + "name": "Pick settings", + "description": "Pick settings" + } + }, } # 点名设置语言配置 @@ -90,7 +96,131 @@ "name": "学生图片文件夹", "description": "管理学生图片文件,图片文件名需与学生姓名一致", }, - } + }, + "EN_US": { + "title": { + "name": "Picking settings", + "description": "Picking settings" + }, + "extraction_function": { + "name": "Picking function", + "description": "Set picking function" + }, + "display_settings": { + "name": "Display settings", + "description": "Set the method to display the pick results" + }, + "basic_animation_settings": { + "name": "Animation settings", + "description": "Set picking animations" + }, + "color_theme_settings": { + "name": "Color theme settings", + "description": "Set the color theme of pick results" + }, + "student_image_settings": { + "name": "Student image settings", + "description": "Set to show student avatars in the results" + }, + "music_settings": { + "name": "Music settings", + "description": "Set the music to play on picking" + }, + "draw_mode": { + "name": "Picking mode", + "description": "Set picking mode", + "combo_items": { + "0": "Pick with repeating", + "1": "Pick without repeating", + "2": "Semi-repeatedly pick" + } + }, + "clear_record": { + "name": "Clear history method", + "description": "Set the time to clean picking history", + "combo_items": { + "0": "Clear on restart", + "1": "Until all have been picked" + }, + "combo_items_other": { + "0": "Clear on restart", + "1": "Until all have been picked", + "2": "Do not clear" + } + }, + "half_repeat": { + "name": "Semi-repeated pick count", + "description": "Set the maximum picked times of each person to clean history" + }, + "draw_type": { + "name": "Picking method", + "description": "Set picking method", + "combo_items": { + "0": "Random pick", + "1": "Fair pick" + } + }, + "font_size": { + "name": "Font size", + "description": "Set picking result font size" + }, + "display_format": { + "name": "Result display format", + "description": "Set the results display format", + "combo_items": { + "0": "Student ID + Name", + "1": "Name", + "2": "Student ID" + } + }, + "show_random": { + "name": "Format of showing random group member", + "description": "Set random group member display format", + "combo_items": { + "0": "Hide", + "1": "Group[New line]Name", + "2": "Group name[Dash]name" + } + }, + "animation": { + "name": "Animation mode", + "description": "Set picking animations", + "combo_items": { + "0": "Manually stop animation", + "1": "Automatically play animation", + "2": "Directly show result" + } + }, + "animation_interval": { + "name": "Animation interval", + "description": "Set the interval between picking animations (ms)" + }, + "autoplay_count": { + "name": "Autoplay count", + "description": "Set the number of times to animate" + }, + "animation_color_theme": { + "name": "Animation/Result Color Theme", + "description": "Set the animate/result color theme", + "combo_items": { + "0": "Disabled", + "1": "Random color", + "2": "Fixed color" + } + }, + "animation_fixed_color": { + "name": "Animation/Result fixed color", + "description": "Set the animation/result color" + }, + "student_image": { + "name": "Show student images", + "description": "Set whether to show student images" + }, + "open_student_image_folder": { + "name": "Student image folder", + "description": "Manage student image files. Picture file names must match student name" + } + }, } # 闪抽设置 @@ -180,7 +310,144 @@ "name": "学生图片文件夹", "description": "管理学生图片文件,图片文件名需与学生姓名一致", }, - } + }, + "EN_US": { + "title": { + "name": "Quick Pick settings", + "description": "Quick Pick settings" + }, + "extraction_function": { + "name": "Picking function", + "description": "Set Quick Pick function" + }, + "display_settings": { + "name": "Display settings", + "description": "Set the method to display Quick Pick results" + }, + "basic_animation_settings": { + "name": "Animation settings", + "description": "Set Quick Pick animations" + }, + "color_theme_settings": { + "name": "Color theme settings", + "description": "Set the color theme of Quick Pick results" + }, + "student_image_settings": { + "name": "Student image settings", + "description": "Set to show student avatars in the Quick Pick results" + }, + "music_settings": { + "name": "Music settings", + "description": "Set the music to play when conducting Quick Pick" + }, + "draw_mode": { + "name": "Picking mode", + "description": "Set Quick Pick mode", + "combo_items": { + "0": "Pick with repeating", + "1": "Pick without repeating", + "2": "Semi-repeatedly pick" + } + }, + "clear_record": { + "name": "Clear history method", + "description": "Set the method to clear Quick Pick records", + "combo_items": { + "0": "Clear on restart", + "1": "Until all have been picked" + }, + "combo_items_other": { + "0": "Clear on restart", + "1": "Until all have been picked", + "2": "Do not clear" + } + }, + "half_repeat": { + "name": "Semi-repeated pick count", + "description": "Set the maximum picked times of each person to clean history" + }, + "draw_type": { + "name": "Picking method", + "description": "Set Quick Pick method", + "combo_items": { + "0": "Random pick", + "1": "Fair pick" + } + }, + "font_size": { + "name": "Font size", + "description": "Set Quick Pick result font size" + }, + "display_format": { + "name": "Result display format", + "description": "Set Quick Pick display format", + "combo_items": { + "0": "Student ID + Name", + "1": "Name", + "2": "Student ID" + } + }, + "show_random": { + "name": "Format of showing random group member", + "description": "Set random group member display format", + "combo_items": { + "0": "Hide", + "1": "Group[New line]Name", + "2": "Group name[Dash]name" + } + }, + "animation": { + "name": "Animation mode", + "description": "Set Quick Pick animations", + "combo_items": { + "0": "Manually stop animation", + "1": "Automatically play animation", + "2": "Directly show result" + } + }, + "animation_interval": { + "name": "Animation interval", + "description": "Set the interval between Quick Pick (ms)" + }, + "autoplay_count": { + "name": "Autoplay count", + "description": "Configure Quick Pick animation autoplay count" + }, + "animation_color_theme": { + "name": "Animation color theme", + "description": "Set the animate/result color theme of Quick Pick", + "combo_items": { + "0": "Disabled", + "1": "Random color", + "2": "Fixed color" + } + }, + "result_color_theme": { + "name": "Results color theme", + "description": "Set the color theme of Quick Pick results", + "combo_items": { + "0": "Disabled", + "1": "Random color", + "2": "Fixed color" + } + }, + "animation_fixed_color": { + "name": "Animation fixed color", + "description": "Set the animation/result color of Quick Pick" + }, + "result_fixed_color": { + "name": "Results fixed color", + "description": "Configure fixed color for Quick Pick result display" + }, + "student_image": { + "name": "Show student images", + "description": "Set whether to show student images" + }, + "open_student_image_folder": { + "name": "Student image folder", + "description": "Manage student image files. Picture file names must match student name" + } + }, } # 即抽设置 @@ -270,17 +537,154 @@ "name": "学生图片文件夹", "description": "管理学生图片文件,图片文件名需与学生姓名一致", }, - } + }, + "EN_US": { + "title": { + "name": "Instant Pick settings", + "description": "Instant Pick settings" + }, + "extraction_function": { + "name": "Picking function", + "description": "Set Instant Pick function" + }, + "display_settings": { + "name": "Display settings", + "description": "Set the method to display the Instant Pick results" + }, + "basic_animation_settings": { + "name": "Animation settings", + "description": "Set Instant Pick animations" + }, + "color_theme_settings": { + "name": "Color theme settings", + "description": "Set the color theme of Instant Pick results" + }, + "student_image_settings": { + "name": "Student image settings", + "description": "Set to show student avatars in the Instant Pick results" + }, + "music_settings": { + "name": "Music settings", + "description": "Set the music to play when conducting Instant Puck" + }, + "draw_mode": { + "name": "Picking mode", + "description": "Set Instant Pick mode", + "combo_items": { + "0": "Pick with repeating", + "1": "Pick without repeating", + "2": "Semi-repeatedly pick" + } + }, + "clear_record": { + "name": "Clear history method", + "description": "Sets the method to clear Instant Pick history", + "combo_items": { + "0": "Clear on restart", + "1": "Until all have been picked" + }, + "combo_items_other": { + "0": "Clear on restart", + "1": "Until all have been picked", + "2": "Do not clear" + } + }, + "half_repeat": { + "name": "Semi-repeated pick count", + "description": "Set how many times each is picked and clear the history" + }, + "draw_type": { + "name": "Picking method", + "description": "Set Instant Pick method", + "combo_items": { + "0": "Random pick", + "1": "Fair pick" + } + }, + "font_size": { + "name": "Font size", + "description": "Set the Instant Pick result font size" + }, + "display_format": { + "name": "Result display format", + "description": "Set the Instant Pick display format", + "combo_items": { + "0": "Student ID + Name", + "1": "Name", + "2": "Student ID" + } + }, + "show_random": { + "name": "Format of showing random group member", + "description": "Set random group member display format", + "combo_items": { + "0": "Hide", + "1": "Group[New line]Name", + "2": "Group name[Dash]name" + } + }, + "animation": { + "name": "Animation mode", + "description": "Set Instant Pick animations", + "combo_items": { + "0": "Manually stop animation", + "1": "Automatically play animation", + "2": "Directly show result" + } + }, + "animation_interval": { + "name": "Animation interval", + "description": "Set Instant Picking animation interval (ms)" + }, + "autoplay_count": { + "name": "Autoplay count", + "description": "Configure Instant Pick animation autoplay count" + }, + "animation_color_theme": { + "name": "Animation color theme", + "description": "Set Instant Pick animate/result color theme", + "combo_items": { + "0": "Disabled", + "1": "Random color", + "2": "Fixed color" + } + }, + "result_color_theme": { + "name": "Results color theme", + "description": "Set Instant Pick result color theme", + "combo_items": { + "0": "Disabled", + "1": "Random color", + "2": "Fixed color" + } + }, + "animation_fixed_color": { + "name": "Animation fixed color", + "description": "Set Instant Pick animation/result fixed color" + }, + "result_fixed_color": { + "name": "Results fixed color", + "description": "Set Instant Pick result fixed color" + }, + "student_image": { + "name": "Show student images", + "description": "Set whether to show student images" + }, + "open_student_image_folder": { + "name": "Student image folder", + "description": "Manage student image files. Picture file names must match student name" + } + }, } # 自定义抽设置 custom_draw_settings = { "ZH_CN": {"title": {"name": "自定义抽设置", "description": "自定义抽取功能设置"}}, - "EN_US": { + "EN_US": { "title": { "name": "Custom pick settings", - "description": "Custom pick settings", - }, + "description": "Custom pick settings" + } }, } @@ -366,5 +770,137 @@ "name": "奖品图片文件夹", "description": "管理奖品图片文件,图片文件名需与奖品名称一致", }, - } + }, + "EN_US": { + "title": { + "name": "Lottery settings", + "description": "Lottery settings" + }, + "extraction_function": { + "name": "Picking function", + "description": "Set lottery function" + }, + "display_settings": { + "name": "Display settings", + "description": "Set the method to display the lottery results" + }, + "basic_animation_settings": { + "name": "Animation settings", + "description": "Set lottery animations" + }, + "color_theme_settings": { + "name": "Color theme settings", + "description": "Set the color theme of lottery results" + }, + "student_image_settings": { + "name": "Prize image settings", + "description": "Set the prize image to display in lottery results" + }, + "music_settings": { + "name": "Music settings", + "description": "Set the music to play when lottery" + }, + "draw_mode": { + "name": "Picking mode", + "description": "Set lottery mode", + "combo_items": { + "0": "Pick with repeating", + "1": "Pick without repeating", + "2": "Semi-repeatedly pick" + } + }, + "clear_record": { + "name": "Clear history method", + "description": "Sets the method to clear lottery records", + "combo_items": { + "0": "Clear on restart", + "1": "Until all have been picked" + }, + "combo_items_other": { + "0": "Clear on restart", + "1": "Until all have been picked", + "2": "Do not clear" + } + }, + "half_repeat": { + "name": "Semi-repeated pick count", + "description": "Set the maximum picked times of each person to clean history" + }, + "draw_type": { + "name": "Picking method", + "description": "Set lottery function", + "combo_items": { + "0": "Random pick", + "1": "Fair pick" + } + }, + "font_size": { + "name": "Font size", + "description": "Set the lottery result font size" + }, + "display_format": { + "name": "Result display format", + "description": "Set the lottery results display format", + "combo_items": { + "0": "Serial + Name", + "1": "Name", + "2": "Serial" + } + }, + "animation": { + "name": "Animation mode", + "description": "Set lottery animations", + "combo_items": { + "0": "Manually stop animation", + "1": "Automatically play animation", + "2": "Directly show result (no animation)" + } + }, + "animation_interval": { + "name": "Animation interval", + "description": "Set the interval between lottery animations (ms)" + }, + "autoplay_count": { + "name": "Autoplay count", + "description": "Set the number of times to animate" + }, + "animation_color_theme": { + "name": "Animation color theme", + "description": "Set the animate/result color theme", + "combo_items": { + "0": "Disabled", + "1": "Theme color", + "2": "Fixed color" + } + }, + "result_color_theme": { + "name": "Results color theme", + "description": "Set the color theme of lottery results", + "combo_items": { + "0": "Disabled", + "1": "Random color", + "2": "Fixed color" + } + }, + "animation_fixed_color": { + "name": "Animation fixed color", + "description": "Set the animation/result color" + }, + "result_fixed_color": { + "name": "Results fixed color", + "description": "Configure fixed color for lottery result display" + }, + "lottery_image": { + "name": "Show prize images", + "description": "Set whether to show prize images" + }, + "open_lottery_image_folder": { + "name": "Prize image folder", + "description": "Manage s\nprize image files. Picture file names must match prize names" + }, + "lottery_image_settings": { + "name": "Prize image settings", + "description": "Set the prize image to display in lottery results" + } + }, } diff --git a/app/Language/modules/fair_draw.py b/app/Language/modules/fair_draw.py index 45871e80..2759449d 100644 --- a/app/Language/modules/fair_draw.py +++ b/app/Language/modules/fair_draw.py @@ -104,116 +104,116 @@ "combo_items": ["秒", "分钟", "小时"], }, }, - "EN_US": { + "EN_US": { "title": { - "name": "Fair Extraction Settings", - "description": "Fair extraction feature settings", + "name": "Fair pick settings", + "description": "Fair pick function settings" }, "fair_draw_set": { "name": "Fair pick", - "description": "Configure equitable extraction algorithm related settings", + "description": "Configure fair pick algorithm related settings" }, "basic_fair_settings": { - "name": "Basic Equity Settings", - "description": "Configure base calculation for equitable extraction", + "name": "Basic fair settings", + "description": "Configure base calculation for fair pick" }, "weight_range_settings": { "name": "Weight range settings", - "description": "Configure base value and range of weights", + "description": "Configure base value and range of weights" }, "shield_settings": { - "name": "Block when extracted", - "description": "Configure block rules after extraction.", + "name": "Block after pick", + "description": "Configure block rules after picking" }, "frequency_settings": { "name": "Frequency function settings", - "description": "Configure how frequency penalties are to be calculated", + "description": "Configure how frequency penalties are to be calculated" }, "balance_weight_settings": { "name": "Balanced weight settings", - "description": "Configure the weight of the balance factors", + "description": "Configure the weight of the balance factors" }, "cold_start_settings": { - "name": "Cold Boot Settings", - "description": "Configure cold start rules for the initial phase of a new class", + "name": "Cold boot settings", + "description": "Configure cold start rules for the initial phase of a new class" }, "fair_draw": { - "name": "Fair draw by number of withdrawals", - "description": "Enable to make fair drawings based on the total number of withdrawals", + "name": "Fair pick by total pick times", + "description": "Enable to make fair pickings based on the total pick times" }, "fair_draw_group": { "name": "Fair pick by group", - "description": "Enable when calculated by group participation", + "description": "Enable when calculated by group participation" }, "fair_draw_gender": { "name": "Fair pick by gender", - "description": "When enabled and calculated by gender participation", + "description": "When enabled and calculated by gender participation" }, "fair_draw_time": { "name": "Fair pick by time", - "description": "Enable to participate in fair extraction based on time", + "description": "Enable to participate in fair pick by time" }, "base_weight": { "name": "Base weight", - "description": "Set the base weight of each option", + "description": "Set the base weight of each option" }, "min_weight": { "name": "Minimum weight range", - "description": "Set minimum weight per option", + "description": "Set minimum weight per option" }, "max_weight": { "name": "Maximum weight range", - "description": "Set maximum weight per option", + "description": "Set maximum weight per option" }, "frequency_function": { - "name": "Frequency Punishment Function", + "name": "Frequency punishment function", "description": "Select the type of compute function for frequency punishment", "combo_items": { "0": "Linear", "1": "Square root", - "2": "Index", - }, + "2": "Index" + } }, "frequency_weight": { "name": "Frequency penalties weight", - "description": "Percentage of frequency penalties in total weight", + "description": "Percentage of frequency penalties in total weight" }, "group_weight": { "name": "Group balance weight", - "description": "Adjustment group balance as a percentage of total weight", + "description": "Adjustment group balance as a percentage of total weight" }, "gender_weight": { "name": "Gender balance weight", - "description": "Adjust the proportion of gender balance in total weight", + "description": "Adjust the proportion of gender balance in total weight" }, "time_weight": { "name": "Time factor weight", - "description": "Adjust the percentage of time factor in total weight", + "description": "Adjust the percentage of time factor in total weight" }, "cold_start_enabled": { "name": "Enable cold launch mode", - "description": "Use cold boot mode for new class or initial phase", + "description": "Use cold boot mode for new class or initial phase" }, "cold_start_rounds": { - "name": "Cold Boot Wheel", - "description": "Sets the number of rounds in cold boot mode", + "name": "Cold boot rounds", + "description": "Sets the number of rounds in cold boot mode" }, "shield_enabled": { "name": "Enable block after exam", - "description": "When enabled, extracted students will not be duplicated during the specified time", + "description": "When enabled, picked students will not be duplicated during the specified time" }, "shield_time": { "name": "Blocked time", - "description": "Set the length of time to block after extracting", + "description": "Set the time to block after picking" }, "shield_time_unit": { "name": "Block time units", "description": "Select time unit for block time", "combo_items": { "0": "Seconds", - "1": "minutes", - "2": "Hours", - }, - }, + "1": "Minutes", + "2": "Hours" + } + } }, } diff --git a/app/Language/modules/history.py b/app/Language/modules/history.py index a5d7d69b..842237fe 100644 --- a/app/Language/modules/history.py +++ b/app/Language/modules/history.py @@ -3,11 +3,11 @@ "ZH_CN": { "title": {"name": "历史记录", "description": "查看和管理点名、抽奖的历史记录"} }, - "EN_US": { + "EN_US": { "title": { "name": "History", - "description": "查看和管理点名、抽奖的历史记录", - }, + "description": "View and manage the pick and lottery history" + } }, } @@ -51,7 +51,51 @@ "description": "清除选定奖池的抽奖历史记录", "pushbutton_name": "清除", }, - } + }, + "EN_US": { + "title": { + "name": "History management", + "description": "Manage the pick and lottery history" + }, + "roll_call": { + "name": "Picking history", + "description": "View and manage the pick history" + }, + "lottery_history": { + "name": "Lottery history", + "description": "View and manage the lottery history" + }, + "show_roll_call_history": { + "name": "Enable picking history", + "description": "Control whether pick history is enabled" + }, + "select_class_name": { + "name": "Select class", + "description": "Choose a class to view history" + }, + "clear_roll_call_history": { + "name": "Clear pick history", + "description": "Clear the pick history of the selected class", + "pushbutton_name": "Clear" + }, + "show_lottery_history": { + "name": "Enable lottery history", + "description": "Control whether lottery history is enabled" + }, + "select_pool_name": { + "name": "Select pool", + "description": "Choose a class to view history" + }, + "clear_lottery_history": { + "name": "Clear lottery history", + "description": "Clear the lottery history of the selected pool", + "pushbutton_name": "Clear" + }, + "select_weight": { + "name": "Show weight", + "description": "Show or hide weight information in table" + } + }, } # 点名历史记录表格语言配置 @@ -101,7 +145,96 @@ ], "description": "点名历史记录表格列标题(个人记录,包含权重)", }, - } + }, + "EN_US": { + "title": { + "name": "Picking history table", + "description": "Display lists of pick history in table form" + }, + "select_class_name": { + "name": "Select class", + "description": "Choose a class to view history" + }, + "select_mode": { + "name": "View mode", + "description": "Choose how history is viewed", + "combo_items": { + "0": "All history", + "1": "View by time" + } + }, + "HeaderLabels_all_not_weight": { + "name": { + "0": "Student ID", + "1": "Name", + "2": "Gender", + "3": "Group", + "4": "Picking times" + }, + "description": "Picking history table title column header (excluding weight)" + }, + "HeaderLabels_all_weight": { + "name": { + "0": "Student ID", + "1": "Name", + "2": "Gender", + "3": "Group", + "4": "Picking times", + "5": "Weight" + }, + "description": "Picking history table title column header (including weight)" + }, + "HeaderLabels_time_not_weight": { + "name": { + "0": "Picking time", + "1": "Student ID", + "2": "Name", + "3": "Gender", + "4": "Group" + }, + "description": "Title of the list of picking history tables (viewed by time, excluding weight)" + }, + "HeaderLabels_time_weight": { + "name": { + "0": "Picking time", + "1": "Student ID", + "2": "Name", + "3": "Gender", + "4": "Group", + "5": "Weight" + }, + "description": "Title of the list of picking history tables (viewed by time, including weight)" + }, + "HeaderLabels_Individual_not_weight": { + "name": { + "0": "Picking time", + "1": "Picking mode", + "2": "Picking amount", + "3": "Gender limit", + "4": "Group limit" + }, + "description": "Title of the list of picking history tables (personal history, excluding weight)" + }, + "HeaderLabels_Individual_weight": { + "name": { + "0": "Picking time", + "1": "Picking mode", + "2": "Picking amount", + "3": "Gender limit", + "4": "Group limit", + "5": "Weight" + }, + "description": "Title of the list of picking history tables (personal history, including weight)" + }, + "select_weight": { + "name": "Show weight", + "description": "Whether to show weight in table", + "switchbutton_name": { + "enable": "Show", + "disable": "Hide" + } + } + }, } # 抽奖历史记录表格语言配置 @@ -132,5 +265,50 @@ "name": ["抽奖时间", "抽奖模式", "抽取数量", "权重设置"], "description": "抽奖历史记录表格列标题(单次记录)", }, - } + }, + "EN_US": { + "title": { + "name": "Lottery history table", + "description": "Display lists of lottery history in table form" + }, + "select_pool_name": { + "name": "Select pool", + "description": "Choose a lottery pool to view history" + }, + "select_mode": { + "name": "View mode", + "description": "Choose how history is viewed", + "combo_items": { + "0": "All history", + "1": "View by time" + } + }, + "HeaderLabels_all_weight": { + "name": { + "0": "Serial", + "1": "Name", + "2": "Lottery winning times", + "3": "Weight" + }, + "description": "Lottery history table title column header weight (all)" + }, + "HeaderLabels_time_weight": { + "name": { + "0": "Lottery time", + "1": "Serial", + "2": "Name", + "3": "Weight" + }, + "description": "Lottery history table title column header weight (sort by time)" + }, + "HeaderLabels_Individual_weight": { + "name": { + "0": "Lottery time", + "1": "Lottery mode", + "2": "Picking quantity", + "3": "Weight settings" + }, + "description": "Lottery history table title column header (single record)" + } + }, } diff --git a/app/Language/modules/list_management.py b/app/Language/modules/list_management.py index da57f1cc..c4b35a1f 100644 --- a/app/Language/modules/list_management.py +++ b/app/Language/modules/list_management.py @@ -5,19 +5,19 @@ "roll_call_list": {"name": "点名名单", "description": "管理点名用学生名单"}, "lottery_list": {"name": "抽奖名单", "description": "管理抽奖用奖品名单"}, }, - "EN_US": { + "EN_US": { "title": { "name": "List management", - "description": "管理点名、抽奖的名单", + "description": "Manage the list of picking and lottery" }, "roll_call_list": { "name": "Picking list", - "description": "Manage list of named students", + "description": "Manage list of named students" }, "lottery_list": { "name": "Lottery list", - "description": "Manage the list of prizes", - }, + "description": "Manage the list of prizes" + } }, } @@ -41,7 +41,41 @@ "name": "导出学生名单", "description": "将学生名单导出到文件", }, - } + }, + "EN_US": { + "title": { + "name": "Picking list", + "description": "Show and manage student list" + }, + "set_class_name": { + "name": "Set class name", + "description": "Set current class name" + }, + "select_class_name": { + "name": "Select class", + "description": "Select a class in existing ones" + }, + "import_student_name": { + "name": "Import student name", + "description": "Import student list from file" + }, + "name_setting": { + "name": "Name settings", + "description": "Set student name" + }, + "gender_setting": { + "name": "Gender settings", + "description": "Set student gender" + }, + "group_setting": { + "name": "Group settings", + "description": "Set group of students" + }, + "export_student_name": { + "name": "Export student list", + "description": "Export student list to file" + } + }, } # 点名表格语言配置 @@ -56,7 +90,27 @@ "name": ["存在", "学号", "姓名", "性别", "小组"], "description": "点名表格的列标题", }, - } + }, + "EN_US": { + "title": { + "name": "Picking table", + "description": "Show and manage name list" + }, + "select_class_name": { + "name": "Select class", + "description": "Select the class to show" + }, + "HeaderLabels": { + "name": { + "0": "Exist", + "1": "Student ID", + "2": "Name", + "3": "Gender", + "4": "Group" + }, + "description": "The column title of the picking table" + } + }, } # 抽奖名单语言配置 @@ -78,7 +132,37 @@ "name": "导出奖品名单", "description": "将奖品名单导出到文件", }, - } + }, + "EN_US": { + "title": { + "name": "Lottery list", + "description": "Manage prize list" + }, + "set_pool_name": { + "name": "Set pool name", + "description": "Set current pool name" + }, + "select_pool_name": { + "name": "Select pool", + "description": "Select a pool in existing ones" + }, + "import_prize_name": { + "name": "Import prize list", + "description": "Import prize list from file" + }, + "prize_setting": { + "name": "Set prize", + "description": "Set prize name" + }, + "prize_weight_setting": { + "name": "Weight settings", + "description": "Set prize weight" + }, + "export_prize_name": { + "name": "Export prize list", + "description": "Export prize list to file" + } + }, } # 抽奖表格语言配置 @@ -93,7 +177,26 @@ "name": ["存在", "序号", "奖品", "权重"], "description": "抽奖表格的列标题", }, - } + }, + "EN_US": { + "title": { + "name": "Lottery table", + "description": "Show and manage prize list" + }, + "select_pool_name": { + "name": "Select pool", + "description": "Select the pool to show" + }, + "HeaderLabels": { + "name": { + "0": "Exist", + "1": "Serial", + "2": "Prize", + "3": "Weight" + }, + "description": "The column title of the lottery table" + } + }, } # 通知文本配置 @@ -217,7 +320,155 @@ }, }, }, - } + }, + "EN_US": { + "roll_call": { + "class_name_setting": { + "title": { + "name": "Class name settings", + "description": "Class name settings notification title" + }, + "content": { + "name": "Class Name Settings window opened", + "description": "Class name setting notification content" + } + }, + "import_student_name": { + "title": { + "name": "Student list import", + "description": "Student list import notification title" + }, + "content": { + "name": "Open student list import window", + "description": "Student list import notification content" + } + }, + "name_setting": { + "title": { + "name": "Name settings", + "description": "Name set notification title" + }, + "content": { + "name": "Name settings window opened", + "description": "Name settings notification content" + } + }, + "gender_setting": { + "title": { + "name": "Gender settings", + "description": "Gender settings notification title" + }, + "content": { + "name": "Gender settings window opened", + "description": "Gender settings notification content" + } + }, + "group_setting": { + "title": { + "name": "Group Settings", + "description": "Group Notification Title" + }, + "content": { + "name": "Group settings window opened", + "description": "Group settings notification content" + } + }, + "export": { + "title": { + "success": { + "name": "Export success", + "description": "Export successful notification title" + }, + "failure": { + "name": "Export failed", + "description": "Export Failed Notification Title" + } + }, + "content": { + "success": { + "name": "Student list has been exported to: {path}", + "description": "Export successful notification content" + }, + "failure": { + "name": "Please select a class to export first", + "description": "Export failed notification content (no class selected)" + }, + "error": { + "name": "{message}", + "description": "Export error notification content" + } + } + } + }, + "lottery": { + "pool_name_setting": { + "title": { + "name": "Pool name settings", + "description": "Pool name settings notification title" + }, + "content": { + "name": "Pool name settings window opened", + "description": "Pool name settings notification" + } + }, + "import_prize_name": { + "title": { + "name": "Prizes list import", + "description": "Prize list import notification title" + }, + "content": { + "name": "Open prize list import window", + "description": "Prize list import notification content" + } + }, + "prize_setting": { + "title": { + "name": "Prizes settings", + "description": "Prize settings notification title" + }, + "content": { + "name": "Pool settings window opened", + "description": "Prize settings notification content" + } + }, + "prize_weight_setting": { + "title": { + "name": "Prize weight settings", + "description": "Prizes reset notification title" + }, + "content": { + "name": "The prize weight setting window has been opened", + "description": "Prizes reset notification content" + } + }, + "export": { + "title": { + "success": { + "name": "Export success", + "description": "Export successful notification title" + }, + "failure": { + "name": "Export failed", + "description": "Export Failed Notification Title" + } + }, + "content": { + "success": { + "name": "Prize list has been exported to: {path}", + "description": "Export successful notification content" + }, + "failure": { + "name": "Please select prize pool to export first", + "description": "Export failed notification content (no pool selected)" + }, + "error": { + "name": "{message}", + "description": "Export error notification content" + } + } + } + } + }, } # QFileDialog 文本配置 @@ -247,5 +498,31 @@ }, } }, - } + }, + "EN_US": { + "roll_call": { + "export_student_list": { + "caption": { + "name": "Save student list", + "description": "Save student list dialog title" + }, + "filter": { + "name": "Excel files (*.xlsx);;CSV files (*.csv);;TXT files (name only) (*.txt)", + "description": "Save student list dialog filter" + } + } + }, + "lottery": { + "export_prize_name": { + "caption": { + "name": "Save prize list", + "description": "Save prize list dialog title" + }, + "filter": { + "name": "Excel files (*.xlsx);;CSV files (*.csv);;TXT files (only prizes) (*.txt)", + "description": "Save prize list dialog filter" + } + } + } + }, } diff --git a/app/Language/modules/lottery_list.py b/app/Language/modules/lottery_list.py index bbe3bad7..1d16e674 100644 --- a/app/Language/modules/lottery_list.py +++ b/app/Language/modules/lottery_list.py @@ -106,6 +106,148 @@ "description": "多个奖池消失提示内容", }, }, + "EN_US": { + "title": { + "name": "Pool name settings", + "description": "Set the pool name window title" + }, + "description": { + "name": "In this window, you can set up the pool name\nto enter a pool name per line, and the system will store it in\n\nto enter only one pool name per line, e.g.:\nPool I\nPool II\nPool III", + "description": "Pool name settings window description" + }, + "input_title": { + "name": "List of prize names", + "description": "Pool name enter area title" + }, + "input_placeholder": { + "name": "Please enter the pool name, one pool name per row", + "description": "Pool name input placeholder" + }, + "save_button": { + "name": "Save", + "description": "Button text of Save" + }, + "cancel_button": { + "name": "Cancel", + "description": "Button text of Cancel" + }, + "error_title": { + "name": "Error", + "description": "Message title of Error" + }, + "success_title": { + "name": "Success", + "description": "Message title of Success" + }, + "info_title": { + "name": "Prompt", + "description": "Message title of Info" + }, + "no_prize_names_error": { + "name": "Please enter at least one pool name", + "description": "Error hint when the pool name is not entered" + }, + "invalid_names_error": { + "name": "The following pool names include invalid characters or reserved words: {names}", + "description": "Error hint when prize name validation failed" + }, + "save_error": { + "name": "Failed to save pool name", + "description": "Error hint when saving pool name" + }, + "success_message": { + "name": "Succeed creating {count} prize pools", + "description": "Alert message when creating prize pool successfully" + }, + "no_new_prizes_message": { + "name": "All pool names already exist, no new pool has been created", + "description": "Tips when not created a new pool" + }, + "unsaved_changes_title": { + "name": "Unsaved changes", + "description": "Change dialog title is not saved" + }, + "unsaved_changes_message": { + "name": "You have unsaved changes. Are you sure you want to close the window?", + "description": "Change dialog content not saved" + }, + "discard_button": { + "name": "Discard changes", + "description": "Discard change button text" + }, + "continue_editing_button": { + "name": "Keep editing", + "description": "Continue editing button text" + }, + "delete_prize_title": { + "name": "Delete pool", + "description": "Delete pool dialog title" + }, + "delete_prize_message": { + "name": "Are you sure to delete the pool '{prize_name}'? This will delete all data of this pool and can NOT be restored", + "description": "Delete pool confirmation dialog" + }, + "delete_prize_button": { + "name": "Delete pool", + "description": "Delete hole button text" + }, + "delete_multiple_prizes_title": { + "name": "Delete multiple pool", + "description": "Delete multiple pool dialog title" + }, + "delete_multiple_prizes_message": { + "name": "Are you sure to delete the following {count} pools? This will delete all data of these pools and can NOT be restored\n\n{prize_names}", + "description": "Delete multiple pool confirmation dialog content" + }, + "delete_success_title": { + "name": "Delete success", + "description": "Delete successful notification title" + }, + "delete_success_message": { + "name": "Succeed deleting {count} prize pools", + "description": "Delete successful notifications" + }, + "delete_cancel_button": { + "name": "Cancel delete", + "description": "Cancel button text" + }, + "no_deletable_prizes": { + "name": "No pool to delete", + "description": "Tips when no prize pool can be deleted" + }, + "select_prize_to_delete": { + "name": "Please select a pool to delete", + "description": "Hint to select the prize pool to delete" + }, + "select_prize_dialog_title": { + "name": "Select the pool to delete", + "description": "Select to delete the pool dialog title" + }, + "select_prize_dialog_message": { + "name": "Please select the prize pool to delete:", + "description": "Select to delete the pool dialog" + }, + "delete_selected_button": { + "name": "Delete selected", + "description": "Delete selected button text" + }, + "delete_prize_error": { + "name": "Failed to delete prize pool: {error}", + "description": "Failed to delete pool error" + }, + "prize_disappeared_title": { + "name": "Prizes lost hint", + "description": "Pool missing hint title" + }, + "prize_disappeared_message": { + "name": "Detected that the pool '{prize_name}' have been removed from the input box. Please save your changes to permanently delete it", + "description": "Dismiss prompt content for individual prizes" + }, + "multiple_prizes_disappeared_message": { + "name": "Detected that the following {count} prize pools have been removed from the input box. Please save your changes to permanently delete them:\n{prize_names}", + "description": "Multiple pool disappear tips" + } + }, } # 导入奖池名称语言配置 @@ -237,171 +379,171 @@ "description": "取消导入选项", }, }, - "EN_US": { + "EN_US": { "title": { "name": "Import pool name", - "description": "Import pool name from Excel or CSV file", + "description": "Import pool name from Excel or CSV file" }, "initial_subtitle": { "name": "Importing to:", - "description": "Importing to the prize pool tips", + "description": "Importing to the prize pool tips" }, "file_selection_title": { "name": "File select", - "description": "File Selection Area Title", + "description": "File selection area title" }, "no_file_selected": { "name": "No file selected", - "description": "Hint text when no file is selected", + "description": "Hint text when no file is selected" }, "select_file": { "name": "File select", - "description": "Select File Button Text", + "description": "Select file button text" }, "supported_formats": { "name": "Supported formats: Excel (.xlsx, .xls) and CSV (.csv)", - "description": "Supported File Format Description", + "description": "Supported file format description" }, "file_filter": { "name": "Excel files (*.xlsx *.xls);;CSV files (*.csv)", - "description": "File selection dialog filters", + "description": "File selection dialog filters" }, "dialog_title": { "name": "File select", - "description": "File selection dialog title", + "description": "File selection dialog title" }, "column_mapping_title": { "name": "Column mapping", - "description": "Column map area title", + "description": "Column map area title" }, "column_mapping_description": { - "name": "Please select a column containing the bonus pool information", - "description": "Column map area description", + "name": "Please select a column containing the pool information", + "description": "Column map area description" }, "column_mapping_id_column": { "name": "Serial column (required):", - "description": "Serial column label", + "description": "Serial Number Label" }, "column_mapping_name_column": { - "name": "Pool Name Column (required):", - "description": "Pool Name List Label", + "name": "Pool name column (required):", + "description": "Label of Pool name list" }, "column_mapping_weight_column": { "name": "Weight column (optional):", - "description": "Reorder Tags", + "description": "Column label of Weight" }, "column_mapping_none": { "name": "None", - "description": "Text of None", + "description": "Text of None" }, "data_preview_title": { "name": "Data preview", - "description": "Preview Area Title", + "description": "Preview area title" }, "prize_id": { - "name": "No.", - "description": "Serial column title", + "name": "Serial", + "description": "Serial Number Title" }, "prize_name": { - "name": "Pool Name", - "description": "Pool Name Column Title", + "name": "Pool name", + "description": "Title of Pool name list" }, "weight": { "name": "Weight", - "description": "Reorder Title", + "description": "Column title of Weight" }, "buttons_import": { "name": "Import", - "description": "Button text of Import", + "description": "Button text of Import" }, "file_loaded_title": { "name": "File loaded", - "description": "File loaded successfully dialog title", + "description": "File loaded successfully dialog title" }, "file_loaded_content": { "name": "Files loaded successfully", - "description": "File loaded successfully dialog content", + "description": "File loaded successfully dialog content" }, "file_loaded_notification_title": { "name": "Files loaded successfully", - "description": "File loaded with successful notification header", + "description": "File loaded with successful notification header" }, "file_loaded_notification_content": { "name": "File successfully loaded, please check data preview", - "description": "File loaded with successful notifications", + "description": "File loaded with successful notifications" }, "error_title": { "name": "Error", - "description": "Dialog title of Error", + "description": "Dialog title of Error" }, "load_failed": { "name": "Failed to load files", - "description": "Failed to load file error", + "description": "Failed to load file error" }, "load_failed_notification_title": { "name": "Failed to load files", - "description": "Failed to load file notification title", + "description": "Failed to load file notification title" }, "load_failed_notification_content": { "name": "Could not load file. Please check file format and content", - "description": "Failed to load notification content", + "description": "Failed to load notification content" }, "import_failed": { "name": "Failed to import data", - "description": "Error importing data", + "description": "Error importing data" }, "import_failed_notification_title": { "name": "Failed to import data", - "description": "Failed to import data notification title", + "description": "Failed to import data notification title" }, "import_failed_notification_content": { - "name": "Error importing data. Please check data format and content", - "description": "Failed to import data content", + "name": "Error importing data, please check data format and content", + "description": "Failed to import data content" }, "unsupported_format": { - "name": "Unsupported File Format", - "description": "Unsupported file format error", + "name": "Unsupported file format", + "description": "Unsupported file format error" }, "no_name_column": { "name": "Please select a pool name column", - "description": "List of award names not selected", + "description": "List of prize names not selected" }, "no_id_column": { "name": "Please select serial number column", - "description": "No serial number error selected", + "description": "Error: No serial number column selected" }, "import_success_title": { "name": "Import success", - "description": "Import successful dialog title", + "description": "Import successful dialog title" }, "import_success_content_template": { - "name": "成功导入 {count} 个奖池信息到奖池 '{prize_name}'", - "description": "Import successful dialog content template", + "name": "Succeed importing {count} prizes to pool '{prize_name}'", + "description": "Import successful dialog content template" }, "import_success_notification_title": { "name": "Import success", - "description": "Import successful notification title", + "description": "Import successful notification title" }, "import_success_notification_content_template": { - "name": "成功导入 {count} 个奖池信息到奖池 '{prize_name}'", - "description": "Import successful notification content template", + "name": "Succeed importing {count} prizes to pool '{prize_name}'", + "description": "Import successful notification content template" }, "existing_data_title": { - "name": "Bonus already has data", - "description": "Holds already have data dialog title", + "name": "Pool already has data", + "description": "Holds already have data dialog title" }, "existing_data_prompt": { - "name": "奖池 '{prize_name}' 已包含 {count} 个奖池信息,请选择处理方式:", - "description": "Bonus already has data dialog tip text", + "name": "Pool '{prize_name}' has already contained {count} prizes, please select handling method:", + "description": "Pool already has data dialog tip text" }, "existing_data_option_overwrite": { "name": "Overwrite existing data", - "description": "Overwrite existing data options", + "description": "Overwrite existing data options" }, "existing_data_option_cancel": { "name": "Cancel import", - "description": "Option of Cancel import", - }, + "description": "Option of Cancel import" + } }, } @@ -518,6 +660,144 @@ "description": "删除奖品名称提示内容", }, }, + "EN_US": { + "title": { + "name": "Prize name settings", + "description": "Set the title of the prize name window" + }, + "description": { + "name": "In this window, you can set the prize name\nto enter one prize name per line, and the system will store it in\n\nto enter only one prize name per line, e.g.:\nFirst prize\nSecond prize\nThird prize", + "description": "Prize name setting window description" + }, + "input_title": { + "name": "List of prizes names", + "description": "Enter the area title of the prize name" + }, + "input_placeholder": { + "name": "Please enter the prize name, one prize name per row", + "description": "Prize Name Input Placeholder" + }, + "save_button": { + "name": "Save", + "description": "Button text of Save" + }, + "cancel_button": { + "name": "Cancel", + "description": "Button text of Cancel" + }, + "error_title": { + "name": "Error", + "description": "Message title of Error" + }, + "success_title": { + "name": "Success", + "description": "Message title of Success" + }, + "info_title": { + "name": "Prompt", + "description": "Message title of Info" + }, + "no_names_error": { + "name": "Please enter at least one prize name", + "description": "Incorrect reminder when the prize name is not entered" + }, + "invalid_names_error": { + "name": "The following prize names include invalid characters or reserved words: {names}", + "description": "Error hint when the prize name validation failed" + }, + "save_error": { + "name": "Failed to save prize name", + "description": "Error hint when saving prize name" + }, + "success_message": { + "name": "Succeed creating {count} prize names", + "description": "Notification message when prize name is created successfully" + }, + "no_new_names_message": { + "name": "All prize names already exist, no new prize names have been created", + "description": "Notification message when no new prize name is created" + }, + "unsaved_changes_title": { + "name": "Unsaved changes", + "description": "Change dialog title is not saved" + }, + "unsaved_changes_message": { + "name": "You have unsaved changes. Are you sure you want to close the window?", + "description": "Change dialog content not saved" + }, + "discard_button": { + "name": "Discard changes", + "description": "Discard Change Button Text" + }, + "continue_editing_button": { + "name": "Keep editing", + "description": "Continue editing button text" + }, + "delete_button": { + "name": "Delete", + "description": "Button text of Delete" + }, + "delete_name_title": { + "name": "Delete prize name", + "description": "Remove Prize name dialog title" + }, + "delete_name_message": { + "name": "Are you sure to delete the name '{name}'? This will delete all information of this name and can NOT be restored", + "description": "Delete prize name confirmation dialog" + }, + "delete_multiple_names_title": { + "name": "Delete multiple prize names", + "description": "Delete multiple prize name dialog title" + }, + "delete_multiple_names_message": { + "name": "Are you sure to delete the following {count} prize names? This will delete all information of these prize names and can NOT be restored\n\n{names}", + "description": "Delete multiple name confirmation dialog content" + }, + "delete_name_success_title": { + "name": "Delete success", + "description": "Successfully deleted prize name notification title" + }, + "delete_name_success_message": { + "name": "Succeed deleting {count} prize names", + "description": "Successfully deleted prize name" + }, + "delete_name_cancel_button": { + "name": "Cancel delete", + "description": "Cancel prize name button text" + }, + "no_deletable_names": { + "name": "There are no prizes names to delete", + "description": "Tips when no prize name can be deleted" + }, + "select_name_to_delete": { + "name": "Please select the name of the prize to delete", + "description": "Tips to choose prize name to be deleted" + }, + "select_name_dialog_title": { + "name": "Select the name of the prize to delete", + "description": "Dialog title of tips to choose prize name to be deleted" + }, + "select_name_dialog_message": { + "name": "Please select the prize name to delete:", + "description": "Select item to delete the prize name dialog" + }, + "delete_selected_names_button": { + "name": "Delete selected", + "description": "Delete selected prize name button text" + }, + "delete_name_error": { + "name": "Failed to delete prize name: {error}", + "description": "Failed to delete prize name error" + }, + "name_deleted_title": { + "name": "Prize name deleted", + "description": "Delete prize name tip title" + }, + "name_deleted_message": { + "name": "Detected that the prize '{name}' have been removed from the input box. Please save your changes to permanently delete it", + "description": "Delete prize name hint" + } + }, } # 权重设置窗口 @@ -633,4 +913,142 @@ "description": "删除权重选项提示内容", }, }, + "EN_US": { + "title": { + "name": "Weight settings", + "description": "Set the title of the replay window" + }, + "description": { + "name": "In this window, you can set the weight of the prize\nto enter a weight per line, and the system will store it in\n\nPlease enter only one weight per line, e.g.:\n10\n20\n30", + "description": "Reset window description" + }, + "input_title": { + "name": "Weight list", + "description": "Weight input area title" + }, + "input_placeholder": { + "name": "Please enter weight, one weight per row", + "description": "Weight input box placeholder" + }, + "save_button": { + "name": "Save", + "description": "Button text of Save" + }, + "cancel_button": { + "name": "Cancel", + "description": "Button text of Cancel" + }, + "error_title": { + "name": "Error", + "description": "Message title of Error" + }, + "success_title": { + "name": "Success", + "description": "Message title of Success" + }, + "info_title": { + "name": "Prompt", + "description": "Message title of Info" + }, + "no_genders_error": { + "name": "Please enter at least one weight value", + "description": "Error hint when no weight entered" + }, + "invalid_weights_error": { + "name": "The following weights include invalid characters or reserved words: {weights}", + "description": "Error reminders when reauthenticating failed" + }, + "save_error": { + "name": "Failed to save weights", + "description": "Error hint when saving weights" + }, + "success_message": { + "name": "Succeed creating {count} weight options", + "description": "Notification message when weighting is created successfully" + }, + "no_new_weights_message": { + "name": "All weight options already exist, no new weight options have been created", + "description": "Tips when not created new weights" + }, + "unsaved_changes_title": { + "name": "Unsaved changes", + "description": "Change dialog title is not saved" + }, + "unsaved_changes_message": { + "name": "You have unsaved changes. Are you sure you want to close the window?", + "description": "Change dialog content not saved" + }, + "discard_button": { + "name": "Discard changes", + "description": "Discard change button text" + }, + "continue_editing_button": { + "name": "Keep editing", + "description": "Continue editing button text" + }, + "delete_button": { + "name": "Delete", + "description": "Button text of Delete" + }, + "delete_weight_title": { + "name": "Delete weight options", + "description": "Remove option dialog title" + }, + "delete_weight_message": { + "name": "Are you sure to delete the weight option '{weight}'? This will delete all information of this weight option and can NOT be restored", + "description": "Delete permission to select confirmation dialog" + }, + "delete_multiple_weights_title": { + "name": "Delete multiple weight options", + "description": "Delete multiple weight dialog titles" + }, + "delete_multiple_weights_message": { + "name": "Are you sure to delete the following {count} weight options? This will delete all information of these weight options and can NOT be restored\n\n{weights}", + "description": "Delete multiple weight options confirmation dialog content" + }, + "delete_weight_success_title": { + "name": "Delete success", + "description": "Successfully deleted priority option notification title" + }, + "delete_weight_success_message": { + "name": "Succeed deleting {count} weight options", + "description": "Notification of Delete the permission weight option successfully" + }, + "delete_weight_cancel_button": { + "name": "Cancel delete", + "description": "Undelete weight button text" + }, + "no_deletable_weights": { + "name": "There are no weight options to delete", + "description": "There are no tips to delete the weights" + }, + "select_weight_to_delete": { + "name": "Please select the weight option to delete", + "description": "Select a notification to delete the weight option" + }, + "select_weight_dialog_title": { + "name": "Select the weight option to delete", + "description": "Select the title of the weight option dialog to delete" + }, + "select_weight_dialog_message": { + "name": "Please select the weight option to delete:", + "description": "Select what to delete the weight option dialog" + }, + "delete_selected_weights_button": { + "name": "Delete selected", + "description": "Delete selected weights button text" + }, + "delete_weight_error": { + "name": "Failed to delete weight option: {error}", + "description": "Failed to delete weight option error" + }, + "weight_deleted_title": { + "name": "The weight option has been deleted", + "description": "Remove the weighted option tip header" + }, + "weight_deleted_message": { + "name": "Detected that the weight option '{weight}' have been removed from the input box. Please save your changes to permanently delete it", + "description": "Remove the weight selection tips" + } + }, } diff --git a/app/Language/modules/lottery_main.py b/app/Language/modules/lottery_main.py index 212502dd..30a1f208 100644 --- a/app/Language/modules/lottery_main.py +++ b/app/Language/modules/lottery_main.py @@ -52,66 +52,66 @@ "text_5": "剩余组数: {remaining_count}", }, }, - "EN_US": { + "EN_US": { "title": { "name": "Lottery", - "description": "Pickup features", + "description": "Lottery function" }, "reset_button": { "name": "Reset", - "description": "Reset Pickups", - "pushbutton_name": "Reset", + "description": "Reset lottery prize count", + "pushbutton_name": "Reset" }, "start_button": { "name": "Start", - "description": "Begin the drawing of awards", - "pushbutton_name": "Start", + "description": "Start lottery", + "pushbutton_name": "Start" }, "stop_button": { "name": "Stop", - "description": "Dismissal of prizes", - "pushbutton_name": "Stop", + "description": "Stop lottery", + "pushbutton_name": "Stop" }, "default_empty_item": { "name": "No list", - "description": "Default options when no list is available", + "description": "Default options when no list is available" }, "list_combobox": { "name": "Class", "description": "Select class", "combo_items": { - "0": "Do not extract students", - }, + "0": "No-picking students" + } }, "range_combobox": { "name": "Range", "description": "Select pick range", "combo_items": { "0": "Pick all students", - "1": "Pick all groups", - }, + "1": "Pick all groups" + } }, "gender_combobox": { "name": "Gender", "description": "Select gender range", "combo_items": { - "0": "Pick all gender", - }, + "0": "Pick all gender" + } }, "remaining_button": { "name": "View remaining list", "description": "Show remaining list windows", - "pushbutton_name": "View remaining list", + "pushbutton_name": "View remaining list" }, "many_count_label": { - "name": "Total / Remaining Awards", - "description": "Show total and remaining awards", - "text_0": "总奖数: {total_count} | 剩余奖数: {remaining_count}", - "text_1": "总奖数: {total_count}", - "text_2": "剩余奖数: {remaining_count}", + "name": "Total / Remaining Prizes", + "description": "Show total and remaining prizes", + "text_0": "Total prize count: {total_count} | Remain: {remaining_count}", + "text_1": "Total prize count: {total_count}", + "text_2": "Remain prize count: {remaining_count}", "text_3": "Total group count: {total_count} | Remain: {remaining_count}", "text_4": "Total group count: {total_count}", - "text_5": "Remain group count: {remaining_count}", - }, + "text_5": "Remain group count: {remaining_count}" + } }, } diff --git a/app/Language/modules/more_settings.py b/app/Language/modules/more_settings.py index 86bce495..4616c06d 100644 --- a/app/Language/modules/more_settings.py +++ b/app/Language/modules/more_settings.py @@ -2,17 +2,35 @@ more_settings = { "ZH_CN": { "title": {"name": "更多设置", "description": "更多功能设置"}, - } + }, + "EN_US": { + "title": { + "name": "More settings", + "description": "More settings" + } + }, } settings = { "ZH_CN": { "title": {"name": "设置", "description": "设置窗口"}, - } + }, + "EN_US": { + "title": { + "name": "Settings", + "description": "Settings window" + } + }, } # 调试设置语言配置 -debug = {"ZH_CN": {"title": {"name": "调试设置", "description": "调试功能设置"}}} +debug = {"ZH_CN": {"title": {"name": "调试设置", "description": "调试功能设置"}}, "EN_US": { + "title": { + "name": "Debug settings", + "description": "Debug settings" + } + }, +} # 关于语言配置 about = { @@ -39,58 +57,58 @@ "copyright": {"name": "版权", "description": "SecRandom遵循GPL-3.0协议"}, "version": {"name": "版本", "description": "显示当前软件版本号"}, }, - "EN_US": { + "EN_US": { "title": { "name": "About", - "description": "APP about page", + "description": "APP about page" }, "github": { "name": "GitHub", - "description": "Visit project repository", + "description": "Visit project repository" }, "bilibili": { "name": "Bilibili", - "description": "访问黎泽懿_Aionflux的Bilibili账号", + "description": "Visit 黎泽懿_Aionflux's Bilibili account" }, "contributor": { "name": "Contributors", - "description": "点击查看详细贡献者信息", + "description": "Click to show full contributor information", "contributor_role_1": "Design & Creativity & Test &\nMaintenance & Documentation", "contributor_role_2": "Maintenance", - "contributor_role_3": "Responsive frontend page Design and\nMaintenance & Documentation", + "contributor_role_3": "Responsive frontend page Design and Maintenance & Documentation", "contributor_role_4": "Creativity & Documentation", "contributor_role_5": "Creativity & Maintenance", - "contributor_role_6": "Test & Documentation & Package Production", - "contributor_role_7": "Responsive frontend page Design and\nMaintenance & Documentation", + "contributor_role_6": "Test & Documentation & Install Package Making", + "contributor_role_7": "Responsive frontend page Design and Maintenance & Documentation" }, "donation": { "name": "Donate", - "description": "支持项目发展,感谢您的捐赠", + "description": "Buy me a coffee" }, "check_update": { "name": "Check for updates", - "description": "检查当前是否为最新版本", + "description": "Check for updates" }, "website": { "name": "SecRandom Website", - "description": "访问SecRandom软件官网", + "description": "Visit SecRandom's official website" }, "channel": { "name": "Update channel", - "description": "选择 SecRandom 软件更新通道", + "description": "Select SecRandom software update channel", "combo_items": { "0": "Official version", - "1": "Beta version", - }, + "1": "Beta version" + } }, "copyright": { "name": "Copyright", - "description": "SecRandom遵循GPL-3.0协议", + "description": "SecRandom follows GPL-3.0" }, "version": { "name": "Version", - "description": "显示当前软件版本号", - }, + "description": "Show current version" + } }, } diff --git a/app/Language/modules/notification_settings.py b/app/Language/modules/notification_settings.py index 55bf4f9e..a008d472 100644 --- a/app/Language/modules/notification_settings.py +++ b/app/Language/modules/notification_settings.py @@ -1,6 +1,12 @@ # 通知设置语言配置 notification_settings = { - "ZH_CN": {"title": {"name": "通知设置", "description": "通知功能设置"}} + "ZH_CN": {"title": {"name": "通知设置", "description": "通知功能设置"}}, + "EN_US": { + "title": { + "name": "Notification settings", + "description": "Notification settings" + } + }, } # 通用通知文本 @@ -10,7 +16,13 @@ "name": "通知结果", "description": "通用通知结果窗口标题", } - } + }, + "EN_US": { + "notification_result": { + "name": "Notice results", + "description": "Generic notification result window title" + } + }, } # 点名通知设置语言配置 @@ -71,7 +83,68 @@ "name": "浮窗自动关闭时间", "description": "设置浮窗自动关闭时间(秒),设为0表示不自动关闭", }, - } + }, + "EN_US": { + "title": { + "name": "Picking notification settings", + "description": "Picking notification settings" + }, + "basic_settings": { + "name": "Basic settings", + "description": "Configure notification display base parameters" + }, + "window_mode": { + "name": "Window mode", + "description": "Configure generic pick notification window display method" + }, + "floating_window_mode": { + "name": "Floating window mode", + "description": "Configure generic pick notification floating window behavior mode" + }, + "call_notification_service": { + "name": "Call notification service", + "description": "Call the system notification service to send the picking result when enabled" + }, + "animation": { + "name": "Animation", + "description": "Configure Pick notification window display animation effect" + }, + "floating_window_enabled_monitor": { + "name": "Monitor select", + "description": "Select the display monitor for picking notification floating windows" + }, + "floating_window_position": { + "name": "Floating window position", + "description": "Configure picking notification floating window on-screen display position", + "combo_items": { + "0": "Center", + "1": "Top", + "2": "Bottom", + "3": "Left", + "4": "Right", + "5": "Top left", + "6": "Top right", + "7": "Bottom left", + "8": "Bottom right" + } + }, + "floating_window_horizontal_offset": { + "name": "Horizontal offset", + "description": "Configure the horizontal offset (in pixels) for the pick notification floating window relative to the default position" + }, + "floating_window_vertical_offset": { + "name": "Vertical offset", + "description": "Configure the vertical offset (in pixels) for the pick notification floating window relative to the default position" + }, + "floating_window_transparency": { + "name": "Transparency", + "description": "Configure pick notification floating window transparency, where a smaller value indicates higher transparency (0-100)" + }, + "floating_window_auto_close_time": { + "name": "Floating window auto-close time", + "description": "Set the time to close the floating window automatically (second), set to 0 to not close automatically" + } + }, } # 闪抽通知设置 @@ -133,7 +206,64 @@ "name": "浮窗自动关闭时间", "description": "设置浮窗自动关闭时间(秒),设为0表示不自动关闭", }, - } + }, + "EN_US": { + "title": { + "name": "Quick Pick notification settings", + "description": "Configure Quick Pick result notification display method and parameters" + }, + "basic_settings": { + "name": "Basic settings", + "description": "Configure Quick Pick notification basic display parameters" + }, + "window_mode": { + "name": "Window mode", + "description": "Configure Quick Pick notification window display method" + }, + "floating_window_mode": { + "name": "Floating window mode", + "description": "Configure Quick Pick notification floating window behavior mode" + }, + "animation": { + "name": "Animation", + "description": "Configure Quick Pick notification window display animation effect" + }, + "floating_window_enabled_monitor": { + "name": "Select the display monitor for Quick Pick notifications", + "description": "Select the display monitor for Quick Pick notification floating windows" + }, + "floating_window_position": { + "name": "Floating window position", + "description": "Configure Quick Pick notification floating window on-screen display position", + "combo_items": { + "0": "Center", + "1": "Top", + "2": "Bottom", + "3": "Left", + "4": "Right", + "5": "Top left", + "6": "Top right", + "7": "Bottom left", + "8": "Bottom right" + } + }, + "floating_window_horizontal_offset": { + "name": "Horizontal offset", + "description": "Configure the horizontal offset (in pixels) for the Quick Pick notification floating window relative to the default position" + }, + "floating_window_vertical_offset": { + "name": "Vertical offset", + "description": "Configure the vertical offset (in pixels) for the Quick Pick notification floating window relative to the default position" + }, + "floating_window_transparency": { + "name": "Floating window transparency", + "description": "Configure Quick Pick notification floating window transparency, where a smaller value indicates higher transparency (0-100)" + }, + "floating_window_auto_close_time": { + "name": "Floating window auto-close time", + "description": "Set the time to close the floating window automatically (seconds), set to 0 to not close automatically" + } + }, } # 即抽通知设置 @@ -195,7 +325,64 @@ "name": "浮窗自动关闭时间", "description": "设置浮窗自动关闭时间(秒),设为0表示不自动关闭", }, - } + }, + "EN_US": { + "title": { + "name": "Instant Pick notification settings", + "description": "Configure Instant Pick result notification display method and parameters" + }, + "basic_settings": { + "name": "Basic settings", + "description": "Configure Instant Pick notification basic display parameters" + }, + "window_mode": { + "name": "Window mode", + "description": "Configure Instant Pick notification window display method" + }, + "floating_window_mode": { + "name": "Floating window mode", + "description": "Configure Instant Pick notification floating window behavior mode" + }, + "animation": { + "name": "Animation", + "description": "Configure Instant Pick notification window display animation effect" + }, + "floating_window_enabled_monitor": { + "name": "Select the display monitor for Instant Pick notification floating windows", + "description": "Select the display monitor for Instant Pick notification floating windows" + }, + "floating_window_position": { + "name": "Floating window position", + "description": "Configure Instant Pick notification floating window on-screen display position", + "combo_items": { + "0": "Center", + "1": "Top", + "2": "Bottom", + "3": "Left", + "4": "Right", + "5": "Top left", + "6": "Top right", + "7": "Bottom left", + "8": "Bottom right" + } + }, + "floating_window_horizontal_offset": { + "name": "Horizontal offset", + "description": "Configure the horizontal offset (in pixels) for the Instant Pick notification floating window relative to the default position" + }, + "floating_window_vertical_offset": { + "name": "Vertical offset", + "description": "Configure the vertical offset (in pixels) for the Instant Pick notification floating window relative to the default position" + }, + "floating_window_transparency": { + "name": "Floating window transparency", + "description": "Configure Instant Pick notification floating window transparency, where a smaller value indicates higher transparency (0-100)" + }, + "floating_window_auto_close_time": { + "name": "Floating window auto-close time", + "description": "Set the time to close the floating window automatically (seconds), set to 0 to not close automatically" + } + }, } # 自定义抽通知设置 @@ -257,38 +444,38 @@ "description": "设置浮窗自动关闭时间(秒),设为0表示不自动关闭", }, }, - "EN_US": { + "EN_US": { "title": { - "name": "自定义抽通知设置", - "description": "自定义抽取通知功能设置", + "name": "Custom pick notification settings", + "description": "Custom pick settings" }, "basic_settings": { "name": "Basic settings", - "description": "Basic settings", + "description": "Basic settings" }, "window_mode": { "name": "Window mode", - "description": "设置自定义抽取通知窗口显示方式", + "description": "Configure custom pick notification window display method" }, "floating_window_mode": { "name": "Floating window mode", - "description": "设置自定义抽取通知浮窗行为模式", + "description": "Configure custom pick notification floating window behavior mode" }, "call_notification_service": { "name": "Call notification service", - "description": "是否调用系统通知服务发送自定义抽取结果", + "description": "Whether to call the system notification service to send custom pick results" }, "animation": { "name": "Animation", - "description": "设置自定义抽取通知窗口显示动画效果", + "description": "Configure custom pick notification window display animation effect" }, "floating_window_enabled_monitor": { - "name": "选择自定义抽取通知显示的显示器", - "description": "选择自定义抽取通知浮窗显示器", + "name": "Select the display monitor for custom pick notifications", + "description": "Select the display monitor for custom pick notification floating windows" }, "floating_window_position": { "name": "Floating window position", - "description": "设置自定义抽取通知浮窗屏幕显示位置", + "description": "Configure custom pick notification floating window on-screen display position", "combo_items": { "0": "Center", "1": "Top", @@ -298,25 +485,25 @@ "5": "Top left", "6": "Top right", "7": "Bottom left", - "8": "Bottom right", - }, + "8": "Bottom right" + } }, "floating_window_horizontal_offset": { - "name": "Horizontal Offset", - "description": "设置自定义抽取通知浮窗相对默认位置水平偏移量(像素)", + "name": "Horizontal offset", + "description": "Configure the horizontal offset (in pixels) for the custom pick notification floating window relative to the default position" }, "floating_window_vertical_offset": { - "name": "Vertical Offset", - "description": "设置自定义抽取通知浮窗相对默认位置垂直偏移量(像素)", + "name": "Vertical offset", + "description": "Configure the vertical offset (in pixels) for the custom pick notification floating window relative to the default position" }, "floating_window_transparency": { "name": "Floating window transparency", - "description": "设置自定义抽取通知浮窗透明度,数值越小越透明(0-100)", + "description": "Configure custom pick notification floating window transparency, where a smaller value indicates higher transparency (0-100)" }, "floating_window_auto_close_time": { - "name": "浮窗自动关闭时间", - "description": "设置浮窗自动关闭时间(秒),设为0表示不自动关闭", - }, + "name": "Floating window auto-close time", + "description": "Set the time to close the floating window automatically (seconds), set to 0 to not close automatically" + } }, } @@ -384,5 +571,66 @@ "name": "浮窗自动关闭时间", "description": "设置浮窗自动关闭时间(秒),设为0表示不自动关闭", }, - } + }, + "EN_US": { + "title": { + "name": "Lottery notification settings", + "description": "Configure lottery result notification display method and parameters" + }, + "basic_settings": { + "name": "Basic settings", + "description": "Configure lottery notification basic display parameters" + }, + "window_mode": { + "name": "Window mode", + "description": "Configure lottery notification window display method" + }, + "floating_window_mode": { + "name": "Floating window mode", + "description": "Configure lottery notification floating window behavior mode" + }, + "call_notification_service": { + "name": "Call notification service", + "description": "Whether to call the system notification service to send lottery results" + }, + "animation": { + "name": "Animation", + "description": "Configure lottery notification window display animation effect" + }, + "floating_window_enabled_monitor": { + "name": "Select the display monitor for lottery notifications", + "description": "Select the display monitor for lottery notification floating windows" + }, + "floating_window_position": { + "name": "Floating window position", + "description": "Configure lottery notification floating window on-screen display position", + "combo_items": { + "0": "Center", + "1": "Top", + "2": "Bottom", + "3": "Left", + "4": "Right", + "5": "Top left", + "6": "Top right", + "7": "Bottom left", + "8": "Bottom right" + } + }, + "floating_window_horizontal_offset": { + "name": "Horizontal offset", + "description": "Configure the horizontal offset (in pixels) for the lottery notification floating window relative to the default position" + }, + "floating_window_vertical_offset": { + "name": "Vertical offset", + "description": "Configure the vertical offset (in pixels) for the lottery notification floating window relative to the default position" + }, + "floating_window_transparency": { + "name": "Floating window transparency", + "description": "Configure lottery notification floating window transparency, where a smaller value indicates higher transparency (0-100)" + }, + "floating_window_auto_close_time": { + "name": "Floating window auto-close time", + "description": "Set the time to close the floating window automatically (seconds), set to 0 to not close automatically" + } + }, } diff --git a/app/Language/modules/remaining_list.py b/app/Language/modules/remaining_list.py index ed0a42ad..e6ac2a18 100644 --- a/app/Language/modules/remaining_list.py +++ b/app/Language/modules/remaining_list.py @@ -23,30 +23,30 @@ "description": "学生信息卡片的显示格式", }, }, - "EN_US": { + "EN_US": { "title": { - "name": "List of students not extracted", - "description": "剩余名单页面标题", + "name": "List of students not picked", + "description": "Title of Remaining list page" }, "title_with_class": { - "name": "{class_name} - 未抽取学生名单", - "description": "带班级名称的页面标题", + "name": "Remaining list of {class_name}", + "description": "Title of page with class name" }, "count_label": { - "name": "剩余人数:{count}", - "description": "显示剩余人数的标签文本", + "name": "Remaining person: {count}", + "description": "Showing the \"Remaining person\" label text" }, "group_count_label": { - "name": "剩余组数:{count}", - "description": "显示剩余组数的标签文本", + "name": "Remaining group: {count}", + "description": "Showing the \"Remaining group\" label text" }, "no_students": { - "name": "暂无未抽取学生", - "description": "没有剩余学生时显示的提示文本", + "name": "No students remaining", + "description": "Error hint shown on no students on list" }, "student_info": { - "name": "ID: {id}\nGender: {gender}\nGroup: {group}", - "description": "学生信息卡片的显示格式", - }, + "name": "Student ID: {id}\nGender: {gender}\nGroup: {group}", + "description": "Student info card style" + } }, } diff --git a/app/Language/modules/roll_call_list.py b/app/Language/modules/roll_call_list.py index a3316979..8b077630 100644 --- a/app/Language/modules/roll_call_list.py +++ b/app/Language/modules/roll_call_list.py @@ -106,6 +106,148 @@ "description": "多个班级消失提示内容", }, }, + "EN_US": { + "title": { + "name": "Class name settings", + "description": "Set the title of the class name window" + }, + "description": { + "name": "In this window, you can set up the class name\nto enter a class name per line, and the system will store it in\n\nto enter only one class name per line, e.g.:\nClass 1, Senior 1\nClass 2, Senior 1\nClass 3, Senior 1", + "description": "Class name settings window description" + }, + "input_title": { + "name": "Class name list", + "description": "Class name enter area title" + }, + "input_placeholder": { + "name": "Please input class names here, one class name per line", + "description": "Class name input placeholder" + }, + "save_button": { + "name": "Save", + "description": "Button text of Save" + }, + "cancel_button": { + "name": "Cancel", + "description": "Button text of Cancel" + }, + "error_title": { + "name": "Error", + "description": "Message title of Error" + }, + "success_title": { + "name": "Success", + "description": "Message title of Success" + }, + "info_title": { + "name": "Prompt", + "description": "Message title of Info" + }, + "no_class_names_error": { + "name": "Please enter at least one class name", + "description": "Incorrect reminder when the class name is not entered" + }, + "invalid_names_error": { + "name": "The following class names include invalid characters or reserved words: {names}", + "description": "Error hint when pool validation failed" + }, + "save_error": { + "name": "Failed to save class name", + "description": "Incorrect reminder when the class name is saving" + }, + "success_message": { + "name": "Succeed creating {count} classes", + "description": "Message show when the classes saved successfully" + }, + "no_new_classes_message": { + "name": "All class names already exist, no new class names have been created", + "description": "Notification message when no new class is created" + }, + "unsaved_changes_title": { + "name": "Unsaved changes", + "description": "Dialog title of change not saved" + }, + "unsaved_changes_message": { + "name": "You have unsaved changes. Are you sure you want to close the window?", + "description": "Dialog content of change not saved" + }, + "discard_button": { + "name": "Discard changes", + "description": "Discard change button text" + }, + "continue_editing_button": { + "name": "Keep editing", + "description": "Continue editing button text" + }, + "delete_class_title": { + "name": "Delete class", + "description": "Delete class dialog title" + }, + "delete_class_message": { + "name": "Are you sure to delete the class '{class_name}'? This will delete all student data of this class and can NOT be restored", + "description": "Delete class dialog message" + }, + "delete_class_button": { + "name": "Delete class", + "description": "Delete class button text" + }, + "delete_multiple_classes_title": { + "name": "Delete multiple classes", + "description": "Delete multiple class dialog title" + }, + "delete_multiple_classes_message": { + "name": "Are you sure to delete the following {count} classes? This will delete all student data of these classes and can NOT be restored\n\n{class_names}", + "description": "Delete multiple class dialog message" + }, + "delete_success_title": { + "name": "Delete success", + "description": "Delete success notification title" + }, + "delete_success_message": { + "name": "Succeed deleting {count} classes", + "description": "Delete success notification content" + }, + "delete_cancel_button": { + "name": "Cancel delete", + "description": "Button text of cancel delete" + }, + "no_deletable_classes": { + "name": "No class to delete", + "description": "Tips when no class can be deleted" + }, + "select_class_to_delete": { + "name": "Please select the class to delete", + "description": "Hint to select the class to delete" + }, + "select_class_dialog_title": { + "name": "Select class to delete", + "description": "Dialog title of tips to choose classes to be deleted" + }, + "select_class_dialog_message": { + "name": "Please select the class to delete:", + "description": "Dialog content of tips to choose classes to be deleted" + }, + "delete_selected_button": { + "name": "Delete selected", + "description": "Delete selected button text" + }, + "delete_class_error": { + "name": "Failed to delete class: {error}", + "description": "Failed to delete class error" + }, + "class_disappeared_title": { + "name": "Class disappeared", + "description": "Class missing hint title" + }, + "class_disappeared_message": { + "name": "Detected that the class '{class_name}' have been removed from the input box. Please save your changes to permanently delete it", + "description": "Class disappear tips" + }, + "multiple_classes_disappeared_message": { + "name": "Detected that the following {count} classes have been removed from the input box. Please save your changes to permanently delete them:\n{class_names}", + "description": "Multiple classes disappear tips" + } + }, } # 导入学生姓名语言配置 @@ -241,7 +383,181 @@ "name": "取消导入", "description": "取消导入选项", }, - } + }, + "EN_US": { + "title": { + "name": "Import student names", + "description": "Import student names from Excel or CSV file" + }, + "initial_subtitle": { + "name": "Importing to:", + "description": "Importing to class tips" + }, + "file_selection_title": { + "name": "File select", + "description": "File selection area title" + }, + "no_file_selected": { + "name": "No file selected", + "description": "Didn't select ant file hint text" + }, + "select_file": { + "name": "File select", + "description": "Select file button text" + }, + "supported_formats": { + "name": "Supported formats: Excel (.xlsx, .xls) and CSV (.csv)", + "description": "Supported file format description" + }, + "file_filter": { + "name": "Excel files (*.xlsx *.xls);;CSV files (*.csv)", + "description": "File filter in the file selection dialog" + }, + "dialog_title": { + "name": "File select", + "description": "File selection dialog title" + }, + "column_mapping_title": { + "name": "Column mapping", + "description": "Column map area title" + }, + "column_mapping_description": { + "name": "Please select a column containing the student information", + "description": "Column map area description" + }, + "column_mapping_id_column": { + "name": "Student ID column (required):", + "description": "Column label of Student ID" + }, + "column_mapping_name_column": { + "name": "Name column (required):", + "description": "Column label of name" + }, + "column_mapping_gender_column": { + "name": "Gender column (optional):", + "description": "Column label of gender" + }, + "column_mapping_group_column": { + "name": "Group column (optional):", + "description": "Column label of group" + }, + "column_mapping_none": { + "name": "Noneh", + "description": "Text of None" + }, + "data_preview_title": { + "name": "Data preview", + "description": "Preview area title" + }, + "student_id": { + "name": "Student ID", + "description": "Column title of Student ID" + }, + "name": { + "name": "Name", + "description": "Column title of Name" + }, + "gender": { + "name": "Gender", + "description": "Column title of Gender" + }, + "group": { + "name": "Group", + "description": "Column title of Group" + }, + "buttons_import": { + "name": "Import", + "description": "Button text of Import" + }, + "file_loaded_title": { + "name": "File loaded", + "description": "File load success dialog title" + }, + "file_loaded_content": { + "name": "Files loaded successfully", + "description": "File load success dialog content" + }, + "file_loaded_notification_title": { + "name": "Files loaded successfully", + "description": "File load success notification title" + }, + "file_loaded_notification_content": { + "name": "File loaded successfully, please check data preview", + "description": "File load success notification content" + }, + "error_title": { + "name": "Error", + "description": "Dialog title of Error" + }, + "load_failed": { + "name": "Failed to load files", + "description": "Failed to load files error" + }, + "load_failed_notification_title": { + "name": "Failed to load files", + "description": "Filed to load files notification title" + }, + "load_failed_notification_content": { + "name": "Unable to load files, please check file format and content", + "description": "Failed to load files notification content" + }, + "import_failed": { + "name": "Failed to import data", + "description": "Failed to import data name error" + }, + "import_failed_notification_title": { + "name": "Failed to import data", + "description": "Filed to load data notification title" + }, + "import_failed_notification_content": { + "name": "Error importing data, please check data format and content", + "description": "Failed to load data notification content" + }, + "unsupported_format": { + "name": "Unsupported file format", + "description": "Unsupported file format error" + }, + "no_name_column": { + "name": "Please select the name column", + "description": "Error: No name column selected" + }, + "no_id_column": { + "name": "Please select the Student ID column", + "description": "Error: No Student ID column selected" + }, + "import_success_title": { + "name": "Import success", + "description": "Import success dialog title" + }, + "import_success_content_template": { + "name": "Succeed importing {count} students to class '{class_name}'", + "description": "Import success dialog content template" + }, + "import_success_notification_title": { + "name": "Import success", + "description": "Import successful notification title" + }, + "import_success_notification_content_template": { + "name": "Succeed importing {count} students to class '{class_name}'", + "description": "Import success notification content template" + }, + "existing_data_title": { + "name": "Class data already available", + "description": "Class data already available dialog title" + }, + "existing_data_prompt": { + "name": "Pool '{class_name}' has already contained {count} students, please select handling method:", + "description": "Class data already available dialog tip text" + }, + "existing_data_option_overwrite": { + "name": "Overwrite existing data", + "description": "Overwrite existing data option" + }, + "existing_data_option_cancel": { + "name": "Cancel import", + "description": "Option of Cancel import" + } + }, } # 姓名设置窗口 @@ -348,6 +664,144 @@ "description": "删除姓名提示内容", }, }, + "EN_US": { + "title": { + "name": "Name settings", + "description": "Set name window title" + }, + "description": { + "name": "In this window, you can set up student names\nto enter a student name per line, and the system will store it in\n\nto enter only one student name per line, e.g.:\nTom\nDick\nHarry", + "description": "Name settings window description" + }, + "input_title": { + "name": "Name list", + "description": "Name input area title" + }, + "input_placeholder": { + "name": "Please input names here, one name per line", + "description": "Name input box placeholder" + }, + "save_button": { + "name": "Save", + "description": "Button text of Save" + }, + "cancel_button": { + "name": "Cancel", + "description": "Button text of Cancel" + }, + "error_title": { + "name": "Error", + "description": "Message title of Error" + }, + "success_title": { + "name": "Success", + "description": "Message title of Success" + }, + "info_title": { + "name": "Prompt", + "description": "Message title of Info" + }, + "no_names_error": { + "name": "Please enter at least one name", + "description": "Error hint shown on no name is input" + }, + "invalid_names_error": { + "name": "The following names include invalid characters or reserved words: {names}", + "description": "Error hint when name validation failed" + }, + "save_error": { + "name": "Failed to save names", + "description": "Error hint when name saved failed" + }, + "success_message": { + "name": "Succeed creating {count} names", + "description": "Message show when the names saved successfully" + }, + "no_new_names_message": { + "name": "All names already exist, no new names have been created", + "description": "Notification message when no new name is created" + }, + "unsaved_changes_title": { + "name": "Unsaved changes", + "description": "Dialog title of change not saved" + }, + "unsaved_changes_message": { + "name": "You have unsaved changes. Are you sure you want to close the window?", + "description": "Dialog content of change not saved" + }, + "discard_button": { + "name": "Discard changes", + "description": "Discard change button text" + }, + "continue_editing_button": { + "name": "Keep editing", + "description": "Continue editing button text" + }, + "delete_button": { + "name": "Delete", + "description": "Button text of Delete" + }, + "delete_name_title": { + "name": "Delete name", + "description": "Delete name dialog title" + }, + "delete_name_message": { + "name": "Are you sure to delete the name '{name}'? This will delete all information of this name and can NOT be restored", + "description": "Delete name dialog message" + }, + "delete_multiple_names_title": { + "name": "Delete multiple names", + "description": "Delete multiple name dialog title" + }, + "delete_multiple_names_message": { + "name": "Are you sure to delete the following {count} names? This will delete all information of these names and can NOT be restored\n\n{names}", + "description": "Delete multiple name dialog message" + }, + "delete_name_success_title": { + "name": "Delete success", + "description": "Delete name success notification title" + }, + "delete_name_success_message": { + "name": "Succeed deleting {count} names", + "description": "Delete name success notification content" + }, + "delete_name_cancel_button": { + "name": "Cancel delete", + "description": "Button text of cancel delete name" + }, + "no_deletable_names": { + "name": "No name to delete", + "description": "Tips when no name can be deleted" + }, + "select_name_to_delete": { + "name": "Please select name to delete", + "description": "Hint to select the name to delete" + }, + "select_name_dialog_title": { + "name": "Select names to delete", + "description": "Dialog title of tips to choose name to be deleted" + }, + "select_name_dialog_message": { + "name": "Please select the name to delete:", + "description": "Dialog content of tips to choose names to be deleted" + }, + "delete_selected_names_button": { + "name": "Delete selected", + "description": "Delete selected names button text" + }, + "delete_name_error": { + "name": "Failed to delete name: {error}", + "description": "Failed to delete name error" + }, + "name_deleted_title": { + "name": "Name deleted", + "description": "Delete name tip title" + }, + "name_deleted_message": { + "name": "Detected that the name '{name}' have been removed from the input box. Please save your changes to permanently delete it", + "description": "Delete name hint" + } + }, } # 性别设置窗口 @@ -463,143 +917,143 @@ "description": "删除性别选项提示内容", }, }, - "EN_US": { + "EN_US": { "title": { "name": "Gender settings", - "description": "设置性别窗口标题", + "description": "Set title of Gender settings window" }, "description": { - "name": "在此窗口中,您可以设置学生性别\n每行输入一个性别,系统会将其存储到班级名单文件中\n\n请每行只输入一个性别,例如:\n男\n女\n其他", - "description": "性别设置窗口描述", + "name": "In this window, you can set up student genders\nto enter a gender per line, and the system will store it in\n\nto enter only one gender per line, e.g.:\nMale\nFemale\nNon-binary", + "description": "Gender settings window description" }, "input_title": { "name": "Gender list", - "description": "性别输入区域标题", + "description": "Gender input area title" }, "input_placeholder": { - "name": "请输入性别,每行一个性别", - "description": "性别输入框占位符", + "name": "Please input genders here, one gender per line", + "description": "Gender input box placeholder" }, "save_button": { "name": "Save", - "description": "Button text of Save", + "description": "Save button text" }, "cancel_button": { "name": "Cancel", - "description": "Button text of Cancel", + "description": "Button text of Cancel" }, "error_title": { "name": "Error", - "description": "Message title of Error", + "description": "Message title of Error" }, "success_title": { "name": "Success", - "description": "Message title of Success", + "description": "Message title of Success" }, "info_title": { "name": "Prompt", - "description": "Message title of Info", + "description": "Message title of Info" }, "no_genders_error": { - "name": "请至少输入一个性别", - "description": "未输入性别时的错误提示", + "name": "Please enter at least one gender", + "description": "Error hint shown on no gender is input" }, "invalid_genders_error": { - "name": "以下性别包含非法字符或为保留字: {genders}", - "description": "性别验证失败时的错误提示", + "name": "The following genders include invalid characters or reserved words: {genders}", + "description": "Error hint when gender validation failed" }, "save_error": { - "name": "保存性别选项失败", - "description": "保存性别选项时的错误提示", + "name": "Failed to save gender option", + "description": "Error hint when gender saved failed" }, "success_message": { - "name": "成功创建 {count} 个新性别选项", - "description": "成功创建性别选项时的提示消息", + "name": "Succeed creating {count} genders", + "description": "Message show when the gender settings saved successfully" }, "no_new_genders_message": { - "name": "所有性别选项均已存在,未创建新的性别选项", - "description": "没有创建新性别选项时的提示消息", + "name": "All gender options already exist, no new gender options have been created", + "description": "Notification message when no new gender is created" }, "unsaved_changes_title": { "name": "Unsaved changes", - "description": "未保存更改对话框标题", + "description": "Dialog title of change not saved" }, "unsaved_changes_message": { - "name": "您有未保存的更改,确定要关闭窗口吗?", - "description": "未保存更改对话框内容", + "name": "You have unsaved changes. Are you sure you want to close the window?", + "description": "Dialog content of change not saved" }, "discard_button": { "name": "Discard changes", - "description": "放弃更改按钮文本", + "description": "Discard change button text" }, "continue_editing_button": { "name": "Keep editing", - "description": "继续编辑按钮文本", + "description": "Continue editing button text" }, "delete_button": { "name": "Delete", - "description": "Button text of Delete", + "description": "Button text of delete" }, "delete_gender_title": { - "name": "Option of Delete gender", - "description": "删除性别选项对话框标题", + "name": "Option of delete gender", + "description": "Delete gender option dialog title" }, "delete_gender_message": { - "name": "确定要删除性别选项 '{gender}' 吗?此操作将删除该性别选项的所有信息,且不可恢复", - "description": "删除性别选项确认对话框内容", + "name": "Are you sure to delete the gender option '{gender}'? This will delete all information of this gender and can NOT be restored", + "description": "Delete gender option dialog message" }, "delete_multiple_genders_title": { - "name": "删除多个性别选项", - "description": "删除多个性别选项对话框标题", + "name": "Delete multiple gender option", + "description": "Delete multiple gender dialog titles" }, "delete_multiple_genders_message": { - "name": "确定要删除以下 {count} 个性别选项吗?此操作将删除这些性别选项的所有信息,且不可恢复\n\n{genders}", - "description": "删除多个性别选项确认对话框内容", + "name": "Are you sure to delete the following {count} genders? This will delete all information of these genders and can NOT be restored\n\n{genders}", + "description": "Delete multiple gender dialog message" }, "delete_gender_success_title": { "name": "Delete success", - "description": "删除性别选项成功通知标题", + "description": "Delete multiple gender dialog success titles" }, "delete_gender_success_message": { - "name": "成功删除 {count} 个性别选项", - "description": "删除性别选项成功通知内容", + "name": "Succeed deleting {count} gender options", + "description": "Notification of delete the gender option successfully" }, "delete_gender_cancel_button": { "name": "Cancel delete", - "description": "取消删除性别选项按钮文本", + "description": "Button text of cancel delete gender option" }, "no_deletable_genders": { - "name": "没有可删除的性别选项", - "description": "没有可删除性别选项时的提示", + "name": "Option of no gender to delete", + "description": "Tips when no gender option can be deleted" }, "select_gender_to_delete": { - "name": "请选择要删除的性别选项", - "description": "选择删除性别选项的提示", + "name": "Select gender option to delete", + "description": "Hint to select the gender option to delete" }, "select_gender_dialog_title": { - "name": "选择要删除的性别选项", - "description": "选择删除性别选项对话框标题", + "name": "Option of select gender to delete", + "description": "Dialog title of tips to choose gender options to be deleted" }, "select_gender_dialog_message": { - "name": "请选择要删除的性别选项:", - "description": "选择删除性别选项对话框内容", + "name": "Select gender option to delete:", + "description": "Select gender option to delete dialog message" }, "delete_selected_genders_button": { "name": "Delete selected", - "description": "删除选中性别选项按钮文本", + "description": "Delete selected gender button text" }, "delete_gender_error": { - "name": "删除性别选项失败: {error}", - "description": "删除性别选项失败错误信息", + "name": "Failed to delete gender option: {error}", + "description": "Failed to delete gender error" }, "gender_deleted_title": { "name": "Gender option deleted", - "description": "删除性别选项提示标题", + "description": "Delete gender option tip title" }, "gender_deleted_message": { - "name": "性别选项 '{gender}' 已从输入框中移除,请保存更改以永久删除", - "description": "删除性别选项提示内容", - }, + "name": "Detected that the gender option '{gender}' have been removed from the input box. Please save your changes to permanently delete it", + "description": "Delete gender option hint" + } }, } @@ -716,4 +1170,142 @@ "description": "删除小组选项提示内容", }, }, + "EN_US": { + "title": { + "name": "Group Settings", + "description": "Group settings window title" + }, + "description": { + "name": "In this window, you can set up the group name\nto enter a group name per line, and the system will store it in\n\nto enter only one group name per line, e.g.:\nGroup A\nGroup B\nGroup C", + "description": "Group settings window description" + }, + "input_title": { + "name": "Group list", + "description": "Group input area title" + }, + "input_placeholder": { + "name": "Please input group name, one per line. ", + "description": "Group input box placeholder" + }, + "save_button": { + "name": "Save", + "description": "Button text of Save" + }, + "cancel_button": { + "name": "Cancel", + "description": "Button text of Cancel" + }, + "error_title": { + "name": "Error", + "description": "Message title of Error" + }, + "success_title": { + "name": "Success", + "description": "Message title of Success" + }, + "info_title": { + "name": "Prompt", + "description": "Message title of Info" + }, + "no_groups_error": { + "name": "Please enter at least one group", + "description": "Error hint shown on no group is input" + }, + "invalid_groups_error": { + "name": "The following groups include invalid characters or reserved words: {groups}", + "description": "Error hint when group name validation failed" + }, + "save_error": { + "name": "Failed to save group option", + "description": "Error hint when group saved failed" + }, + "success_message": { + "name": "Succeed creating {count} group options", + "description": "Message show when the group settings saved successfully" + }, + "no_new_groups_message": { + "name": "All group options already exist, no new group options have been created", + "description": "Notification message when no new group is created" + }, + "unsaved_changes_title": { + "name": "Unsaved changes", + "description": "Dialog title of change not saved" + }, + "unsaved_changes_message": { + "name": "You have unsaved changes. Are you sure you want to close the window?", + "description": "Dialog content of change not saved" + }, + "discard_button": { + "name": "Discard changes", + "description": "Discard change button text" + }, + "continue_editing_button": { + "name": "Keep editing", + "description": "Continue editing button text" + }, + "delete_button": { + "name": "Delete", + "description": "Button text of Delete" + }, + "delete_group_title": { + "name": "Option of Delete group", + "description": "Delete group option dialog title" + }, + "delete_group_message": { + "name": "Are you sure to delete the group option '{group}'? This will delete all information of this group and can NOT be restored", + "description": "Delete group dialog message" + }, + "delete_multiple_groups_title": { + "name": "Delete multiple group option", + "description": "Delete multiple group option dialog title" + }, + "delete_multiple_groups_message": { + "name": "Are you sure to delete the following {count} groups? This will delete all information of these groups and can NOT be restored\n\n{groups}", + "description": "Delete multiple group dialog message" + }, + "delete_group_success_title": { + "name": "Delete success", + "description": "Delete group dialog success titles" + }, + "delete_group_success_message": { + "name": "Succeed deleting {count} group options", + "description": "Notification of delete the group option successfully" + }, + "delete_group_cancel_button": { + "name": "Cancel delete", + "description": "Button text of cancel delete group option" + }, + "no_deletable_groups": { + "name": "Option of no group to delete", + "description": "Tips when no group option can be deleted" + }, + "select_group_to_delete": { + "name": "Please select the group option to delete", + "description": "Hint to select the group option to delete" + }, + "select_group_dialog_title": { + "name": "Option of select group to delete", + "description": "Dialog title of tips to choose group options to be deleted" + }, + "select_group_dialog_message": { + "name": "Please select the group option to delete:", + "description": "Dialog content of tips to choose group options to be deleted" + }, + "delete_selected_groups_button": { + "name": "Delete selected", + "description": "Delete selected names button text" + }, + "delete_group_error": { + "name": "Failed to delete group option: {error}", + "description": "Failed to delete prize name error" + }, + "group_deleted_title": { + "name": "Group option deleted", + "description": "Delete group options tip title" + }, + "group_deleted_message": { + "name": "Detected that the group option '{group}' have been removed from the input box. Please save your changes to permanently delete it", + "description": "Delete group options hint" + } + }, } diff --git a/app/Language/modules/roll_call_main.py b/app/Language/modules/roll_call_main.py index 94b6a532..8c888823 100644 --- a/app/Language/modules/roll_call_main.py +++ b/app/Language/modules/roll_call_main.py @@ -47,59 +47,59 @@ "text_5": "剩余组数: {remaining_count}", }, }, - "EN_US": { + "EN_US": { "title": { "name": "Pick", - "description": "Pick", + "description": "Pick" }, "reset_button": { "name": "Reset", - "description": "重置点名人数", - "pushbutton_name": "Reset", + "description": "Reset picking count", + "pushbutton_name": "Reset" }, "start_button": { "name": "Start", "description": "Start picking", - "pushbutton_name": "Start", + "pushbutton_name": "Start" }, "stop_button": { "name": "Stop", "description": "Stop picking", - "pushbutton_name": "Stop", + "pushbutton_name": "Stop" }, "range_combobox": { "name": "Range", "description": "Select pick range", "combo_items": { "0": "Pick all students", - "1": "Pick all groups", - }, + "1": "Pick all groups" + } }, "gender_combobox": { "name": "Gender", "description": "Select gender range", "combo_items": { - "0": "Pick all gender", - }, + "0": "Pick all gender" + } }, "remaining_button": { "name": "View remaining list", - "description": "显示剩余名单窗口", - "pushbutton_name": "View remaining list", + "description": "Show remaining list window", + "pushbutton_name": "View remaining list" }, "many_count_label": { "name": "Total / Remaining", - "description": "显示总人数和剩余人数", - "text_0": "总人数: {total_count} | 剩余人数: {remaining_count}", - "text_1": "总人数: {total_count}", - "text_2": "剩余人数: {remaining_count}", + "description": "Show total and remaining student count", + "text_0": "Total student count: {total_count} | Remain: {remaining_count}", + "text_1": "Total student count: {total_count}", + "text_2": "Remain student count: {remaining_count}", "text_3": "Total group count: {total_count} | Remain: {remaining_count}", "text_4": "Total group count: {total_count}", - "text_5": "Remain group count: {remaining_count}", + "text_5": "Remain group count: {remaining_count}" }, "default_empty_item": { "name": "No list", - "description": "Default options when no list is available", - }, + "description": "Default options when no list is available" + } }, } diff --git a/app/Language/modules/safety_settings.py b/app/Language/modules/safety_settings.py index 3331f37a..c1a38cd6 100644 --- a/app/Language/modules/safety_settings.py +++ b/app/Language/modules/safety_settings.py @@ -1,6 +1,12 @@ # 安全设置语言配置 safety_settings = { - "ZH_CN": {"title": {"name": "安全设置", "description": "配置软件安全相关设置"}} + "ZH_CN": {"title": {"name": "安全设置", "description": "配置软件安全相关设置"}}, + "EN_US": { + "title": { + "name": "Security settings", + "description": "Configure app safety related settings" + } + }, } # 基础安全设置语言配置 @@ -150,253 +156,253 @@ "switchbutton_name": {"enable": "", "disable": ""}, }, }, - "EN_US": { + "EN_US": { "title": { "name": "Basic security settings", - "description": "配置基础安全验证功能", + "description": "Configure basic safety verification function" }, "verification_method": { "name": "Verification method", - "description": "配置安全功能验证方式", + "description": "Configure basic safety verification method" }, "verification_process": { "name": "Verification process", - "description": "选择安全验证组合方式", + "description": "Choose basic safety combination method", "combo_items": { - "0": "单步验证(任选一种方式)", + "0": "One-step verification method (choose anyone)", "1": "Password only", "2": "TOTP only", "3": "USB drives only", "4": "Password + TOTP", "5": "Password + USB drives", "6": "TOTP + USB drives", - "7": "Password + TOTP + USB drives", - }, + "7": "Password + TOTP + USB drives" + } }, "security_operations": { "name": "Security operations", - "description": "配置需要安全验证的操作", + "description": "Configure actions need basic safety verification" }, "safety_switch": { "name": "Safety switch", - "description": "启用后所有安全操作都需要验证密码", + "description": "When enabled, all safety actions require password" }, "set_password": { "name": "Set password", - "description": "设置或修改安全验证密码", + "description": "Set safety verification password" }, "totp_switch": { "name": "TOTP verification", - "description": "启用后可在安全操作中使用TOTP动态口令", + "description": "Enable to use the TOTP dynamic password in secure operations" }, "set_totp": { "name": "Set TOTP", - "description": "配置TOTP动态口令验证", + "description": "Configure TOTP one-time password verification" }, "usb_switch": { "name": "USB drive verification", - "description": "启用后可在安全操作中使用U盘验证", + "description": "Enable to use USB drive verification in secure operations" }, "bind_usb": { "name": "Bind USB drive", - "description": "绑定用于验证的U盘设备", + "description": "Bind the USB drive to verify" }, "unbind_usb": { "name": "Unbind USB drive", - "description": "解除U盘设备绑定", + "description": "Unbind USB drive" }, "show_hide_floating_window_switch": { - "name": "显示/隐藏浮窗验证", - "description": "启用后显示或隐藏浮窗时需要安全验证", + "name": "Show/hide float window verification", + "description": "When enabled, showing or hiding float window will need verification" }, "restart_switch": { - "name": "重启验证", - "description": "启用后重启软件时需要安全验证", + "name": "Restart Verification", + "description": "When enabled, restarting app will need verification" }, "exit_switch": { - "name": "退出验证", - "description": "启用后退出软件时需要安全验证", + "name": "Exit Verification", + "description": "When enabled, exiting app will need verification" }, "password_rules": { - "name": "Password Requirements", - "description": "Length > 8, with at least two categories of letters, numbers, and special characters (recommended three categories)", + "name": "Password requirements", + "description": "Length > 8, with at least two categories of letters, numbers, and special characters (recommended three categories)" }, "current_password": { - "name": "Current password", + "name": "Current password" }, "password_input_placeholder": { - "name": "Enter password to verify", + "name": "Enter password to verify" }, "new_password": { - "name": "New password", + "name": "New password" }, "confirm_password": { - "name": "Confirm New Password", + "name": "Confirm new password" }, "password_strength_title": { - "name": "Password intensity", + "name": "Password strength" }, "strength_weak": { - "name": "Weak", + "name": "Weak" }, "strength_medium": { - "name": "Mid", + "name": "Mid" }, "strength_strong": { - "name": "strong", + "name": "Strong" }, "save_button": { - "name": "Save", + "name": "Save" }, "cancel_button": { - "name": "Cancel", + "name": "Cancel" }, "error_current_password": { - "name": "Current password is incorrect", + "name": "Current password is incorrect" }, "error_mismatch": { - "name": "New password does not match confirmation", + "name": "New password does not match confirmation" }, "error_strength_insufficient": { - "name": "Not enough password", + "name": "Not enough password" }, "success_updated": { - "name": "Password updated", + "name": "Password updated" }, "remove_password": { "name": "Remove password", - "description": "Cancel current security verification password", + "description": "Cancel current security verification password" }, "remove_password_confirm_title": { - "name": "Confirm Password Removal", + "name": "Confirm Password Removal" }, "remove_password_confirm_content": { - "name": "Removing passwords will disable secure switches, continue?", + "name": "Removing passwords will disable secure switches, continue?" }, "remove_password_success": { - "name": "Password removed and security switch closed", + "name": "Password removed and security switch closed" }, "error_title": { - "name": "Error", + "name": "Error" }, "dialog_yes_text": { - "name": "OK", + "name": "OK" }, "dialog_cancel_text": { - "name": "Cancel", + "name": "Cancel" }, "generate_totp_secret": { - "name": "Generate key", + "name": "Generate key" }, "verify_totp_code": { - "name": "Verify CAPTCHA", + "name": "Verify verification code" }, "totp_input_placeholder": { - "name": "Enter TOTP verification code to verify", + "name": "Enter TOTP verification code to verify" }, "totp_secret_prefix": { - "name": "Key", + "name": "Key" }, "totp_uri_prefix": { - "name": "URI", + "name": "URI" }, "totp_generated_saved": { - "name": "Generated and saved TOTP key", + "name": "Generated and saved TOTP key" }, "totp_generated_error": { - "name": "Failed to generate TOTP", + "name": "Failed to generate TOTP" }, "totp_code_valid": { - "name": "Captcha is valid", + "name": "Valid code" }, "totp_code_invalid": { - "name": "Invalid verification code", + "name": "Invalid code" }, "totp_save_success": { - "name": "Settings saved", + "name": "Settings saved" }, "totp_verify_before_save": { - "name": "Please verify the code before saving", + "name": "Please verify the code before saving" }, "totp_qr_unavailable": { - "name": "Failed to display QR code, please install QR library", + "name": "Failed to display QR code, please install QR library" }, "usb_refresh": { - "name": "Refresh", + "name": "Refresh" }, "usb_bind": { - "name": "Bind", + "name": "Bind" }, "usb_unbind_all": { - "name": "Unbind All", + "name": "Unbind All" }, "usb_no_removable": { - "name": "No removable disk detected", + "name": "No removable disk detected" }, "usb_bind_success": { - "name": "Bind Up", + "name": "USB drive binded" }, "usb_unbind_all_success": { - "name": "Unbound all Ups", + "name": "Unbound all USB drives" }, "usb_require_key_file": { - "name": ".key file verification required", + "name": ".key file verification required" }, "totp_secret_generated": { - "name": "Key generated, please complete validation before saving", + "name": "Key generated, please complete validation before saving" }, "error_set_password_first": { - "name": "Please set password first", + "name": "Please set password first" }, "error_set_totp_first": { - "name": "Please set TOTP first", + "name": "Please set TOTP first" }, "error_bind_usb_first": { - "name": "Please bind to a disk first", + "name": "Please bind to a disk first" }, "verify_in_progress": { - "name": "Verifying,please wait", + "name": "Verifying, please wait" }, "verify_failed_generic": { - "name": "Verification not passed, please check input", + "name": "Verification not passed, please check input" }, "usb_unbind_selected": { - "name": "Unbind", + "name": "Unbind selected" }, "usb_unbind_selected_success": { - "name": "Untied Upad", + "name": "Unbound USB drives" }, "usb_select_bound_hint": { - "name": "Please select a bound device", + "name": "Please select a bound device" }, "usb_bound_devices": { - "name": "Bind Device", + "name": "Bind device" }, "usb_status_connected": { - "name": "U Connected", + "name": "USB drive connected" }, "usb_status_disconnected": { - "name": "U not connected", + "name": "USB drive unconnected" }, "open_settings_switch": { "name": "Open settings validation", - "description": "Secure authentication is required when opening settings", + "description": "Secure authentication is required when opening settings" }, "diagnostic_export_switch": { - "name": "Diagnostic Data Export Validation", - "description": "Secure validation to export diagnostic data when enabled", + "name": "Diagnostic data export validation", + "description": "Secure validation to export diagnostic data when enabled" }, "data_export_switch": { - "name": "Data Export Validation", - "description": "Secure verification before all data are exported when enabled", + "name": "Data export Validation", + "description": "Secure verification before all data are exported when enabled" }, "import_overwrite_switch": { "name": "Import Overwrite Verification", - "description": "Authentication is required to overwrite existing files after import", + "description": "Authentication is required to overwrite existing files after import" }, "import_version_mismatch_switch": { "name": "Version mismatch import validation", - "description": "Authentication is required for importing versions when they do not match", - }, + "description": "Authentication is required for importing versions when they do not match" + } }, } diff --git a/app/Language/modules/sidebar_tray_management.py b/app/Language/modules/sidebar_tray_management.py index 69f7f58c..2c11c0a2 100644 --- a/app/Language/modules/sidebar_tray_management.py +++ b/app/Language/modules/sidebar_tray_management.py @@ -82,105 +82,105 @@ "description": "设置浮窗贴边时箭头按钮显示的文字", }, }, - "EN_US": { + "EN_US": { "title": { "name": "Floating window management", - "description": "配置浮窗相关设置", + "description": "Configure floating window related settings" }, "basic_settings": { "name": "Basic settings", - "description": "配置浮窗基本设置", + "description": "Configure floating window basic settings" }, "appearance_settings": { "name": "Appearance settings", - "description": "配置浮窗外观设置", + "description": "Configure floating window appearance settings" }, "edge_settings": { "name": "Edge settings", - "description": "配置浮窗贴边设置", + "description": "Configure floating window edge settings" }, "startup_display_floating_window": { - "name": "启动时显示浮窗", - "description": "控制软件启动时是否自动显示浮窗", + "name": "Show popup on startup", + "description": "Set whether to show the floating window after boot" }, "floating_window_opacity": { "name": "Floating window transparency", - "description": "调整浮窗透明度", + "description": "Adjust floating window transparency" }, "reset_floating_window_position_button": { "name": "Reset floating window position", - "description": "将浮窗位置重置为默认位置", - "pushbutton_name": "Reset position", + "description": "Reset floating window to default position", + "pushbutton_name": "Reset position" }, "floating_window_button_control": { "name": "Floating window controls config", - "description": "选择在浮窗中显示的功能按钮", + "description": "Select the button to show in floating window", "combo_items": { "0": "Pick", - "1": "Quick pick", - "2": "Instant pick", + "1": "Quick Pick", + "2": "Instant Pick", "3": "Custom pick", "4": "Lottery", - "5": "Pick + Quick pick", + "5": "Pick + Quick Pick", "6": "Pick + Custom pick", "7": "Pick + Lottery", - "8": "Quick pick + Custom pick", - "9": "Quick pick + Lottery", + "8": "Quick Pick + Custom Pick", + "9": "Quick Pick + Lottery", "10": "Custom pick + Lottery", - "11": "Pick + Quick pick + Custom pick", - "12": "Pick + Quick pick + Lottery", + "11": "Pick + Quick Pick + Custom Pick", + "12": "Pick + Quick Pick + Lottery", "13": "Pick + Custom pick + Lottery", - "14": "Quick pick + Custom pick + Lottery", - "15": "Pick + Quick pick + Custom pick + Lottery", - }, + "14": "Quick Pick + Custom Pick + Lottery", + "15": "Pick + Quick Pick + Custom Pick + Lottery" + } }, "floating_window_placement": { "name": "Floating window layout", - "description": "设置浮窗中控件排列方式", + "description": "Configure layout of buttons in floating window", "combo_items": { "0": "Rectangle", "1": "Portrait", - "2": "Landscape", - }, + "2": "Landscape" + } }, "floating_window_display_style": { "name": "Floating window style", - "description": "设置浮窗中控件显示样式", + "description": "Configure style of buttons in floating window", "combo_items": { "0": "Icon + Text", "1": "Icon only", - "2": "Text only", - }, + "2": "Text only" + } }, "floating_window_stick_to_edge": { "name": "Edge function", - "description": "控制浮窗是否自动贴边", + "description": "Whether to dock floating window automatically" }, "floating_window_stick_to_edge_recover_seconds": { "name": "Edge receipt time", - "description": "设置浮窗贴边后自动收纳时间(秒)", + "description": "Set the automatic reception time after the floating window near side (seconds)" }, "floating_window_stick_to_edge_display_style": { "name": "Edge style", - "description": "设置浮窗贴边时显示样式", + "description": "Configure docked floating window style", "combo_items": { "0": "Icon", "1": "Text", - "2": "Arrow", - }, + "2": "Arrow" + } }, - "floating_window_stick_to_edge_arrow_text": { - "name": "Draw", - "description": "Set the text displayed on the arrow button when the floating window is docked", + "floating_window_long_press_duration": { + "name": "Long press time", + "description": "Set floating window long by time (milliseconds)" }, "floating_window_draggable": { "name": "Floating window draggable", - "description": "Control whether the floating window can be dragged", - }, - "floating_window_long_press_duration": { - "name": "Long press time", - "description": "Set floating window long by time (milliseconds)", + "description": "Set if floating window is draggable" }, + "floating_window_stick_to_edge_arrow_text": { + "name": "Pick", + "description": "Set the text to show on arrow button when the floating window is docked" + } }, } @@ -191,7 +191,13 @@ "name": "侧边栏/托盘管理", "description": "配置侧边栏和系统托盘相关设置", } - } + }, + "EN_US": { + "title": { + "name": "Sidebar/Tray management", + "description": "Configure sidebar and system tray related settings" + } + }, } # 主界面侧边栏语言配置 @@ -226,7 +232,58 @@ "description": "配置设置图标在侧边栏位置", "combo_items": ["顶部", "底部", "不显示"], }, - } + }, + "EN_US": { + "title": { + "name": "Home sidebar", + "description": "Configure home sidebar related settings" + }, + "roll_call_sidebar_position": { + "name": "Position of Picking", + "description": "Set the position of Pick in sidebar", + "combo_items": { + "0": "Top", + "1": "Bottom", + "2": "Hide" + } + }, + "custom_roll_call_sidebar_position": { + "name": "Custom pick sidebar position", + "description": "Set the position of Custom Pick in sidebar", + "combo_items": { + "0": "Top", + "1": "Bottom", + "2": "Hide" + } + }, + "lottery_sidebar_position": { + "name": "Position of Lottery", + "description": "Set the position of Lottery in sidebar", + "combo_items": { + "0": "Top", + "1": "Bottom", + "2": "Hide" + } + }, + "main_window_history": { + "name": "Main window history position", + "description": "Set history position in sidebar", + "combo_items": { + "0": "Top", + "1": "Bottom", + "2": "Hide" + } + }, + "settings_icon": { + "name": "Set icon position", + "description": "Set the position of Settings in sidebar", + "combo_items": { + "0": "Top", + "1": "Bottom", + "2": "Hide" + } + } + }, } # 设置窗口侧边栏语言配置 @@ -281,7 +338,102 @@ "description": "设置更多设置项在侧边栏位置", "combo_items": ["顶部", "底部", "不显示"], }, - } + }, + "EN_US": { + "title": { + "name": "Set window sidebar", + "description": "Configure set window sidebar" + }, + "home": { + "name": "Home position", + "description": "Set the position of Home in sidebar", + "combo_items": { + "0": "Top", + "1": "Bottom", + "2": "Hide" + } + }, + "base_settings": { + "description": "Set the position of Basic settings in sidebar", + "combo_items": { + "0": "Top", + "1": "Bottom", + "2": "Hide" + }, + "name": "Basic position settings" + }, + "name_management": { + "description": "Set the position of List management in sidebar", + "combo_items": { + "0": "Top", + "1": "Bottom", + "2": "Hide" + }, + "name": "Position of List management" + }, + "draw_settings": { + "description": "Set the position of Picking settings in sidebar", + "combo_items": { + "0": "Top", + "1": "Bottom", + "2": "Hide" + }, + "name": "Position of Pick settings" + }, + "notification_service": { + "description": "Set the position of Notification settings in sidebar", + "combo_items": { + "0": "Top", + "1": "Bottom", + "2": "Hide" + }, + "name": "Position of Notification settings" + }, + "security_settings": { + "description": "Set the position of Safety settings in sidebar", + "combo_items": { + "0": "Top", + "1": "Bottom", + "2": "Hide" + }, + "name": "Position of Security settings" + }, + "personal_settings": { + "description": "Set the position of Custom settings in sidebar", + "combo_items": { + "0": "Top", + "1": "Bottom" + }, + "name": "Position of Profile settings" + }, + "voice_settings": { + "description": "Set the position of Voice settings in sidebar", + "combo_items": { + "0": "Top", + "1": "Bottom", + "2": "Hide" + }, + "name": "Position of Voice settings" + }, + "settings_history": { + "description": "Set history position in sidebar", + "combo_items": { + "0": "Top", + "1": "Bottom", + "2": "Hide" + }, + "name": "Set history position" + }, + "more_settings": { + "description": "Set the position of More settings in sidebar", + "combo_items": { + "0": "Top", + "1": "Bottom", + "2": "Hide" + }, + "name": "Position of More settings" + } + }, } # 托盘管理语言配置 @@ -313,5 +465,31 @@ "description": "控制是否在托盘菜单中显示退出选项", "switchbutton_name": {"enable": "", "disable": ""}, }, - } + }, + "EN_US": { + "title": { + "name": "Tray management", + "description": "Configure system tray related settings" + }, + "show_hide_main_window": { + "name": "Show/hide main window", + "description": "Control whether main window to show or not" + }, + "open_settings": { + "name": "Open settings window", + "description": "Control whether to show settings option in the tray menu" + }, + "show_hide_float_window": { + "name": "Show/hide float window", + "description": "Control whether floating window to show or not" + }, + "restart": { + "name": "Restart app", + "description": "Control whether to show restart option in the tray menu" + }, + "exit": { + "name": "Exit app", + "description": "Control whether to show exit option in the tray menu" + } + }, } diff --git a/app/Language/modules/update.py b/app/Language/modules/update.py index 7c605466..d35c877c 100644 --- a/app/Language/modules/update.py +++ b/app/Language/modules/update.py @@ -57,137 +57,140 @@ "combo_items": ["github", "ghfast", "gh-proxy"], }, }, - "EN_US": { + "EN_US": { "title": { - "name": "Update Settings", - "description": "Check and install software updates", + "name": "Update settings", + "description": "Check and install software updates" }, "secrandom_update_text": { - "name": "SecRandom Update", + "name": "SecRandom update" }, - "current_version": { - "name": "Current version", - }, - "latest_version_label": { - "name": "Latest Version", + "check_update": { + "name": "Check for updates" }, "latest_version": { - "name": "is up to date", + "name": "is up to date" }, "new_version_available": { - "name": "New version found", + "name": "New version found" }, - "last_check_time": { - "name": "Last check update time", + "update_progress": { + "name": "Update progress" }, - "check_update": { - "name": "Check for updates", + "current_version": { + "name": "Current version" }, - "check_for_updates": { - "name": "Check for updates", + "latest_version_label": { + "name": "Latest version" }, "checking_update": { - "name": "Checking for updates...", + "name": "Checking for updates..." }, - "update_notification_title": { - "name": "SecRandom Update Notification", + "check_for_updates": { + "name": "Check for updates" }, - "update_notification_content": { - "name": "New version found: {version}\nClick to view details", + "already_latest_version": { + "name": "You are up to date!" }, "check_update_failed": { - "name": "Failed to check for updates", - }, - "failed_to_get_version_info": { - "name": "Failed to get version information", + "name": "Failed to check for updates" }, - "download_and_install": { - "name": "Download and Install", + "last_check_time": { + "name": "Last check update time" }, "downloading_update": { - "name": "Downloading updates...", - }, - "download_failed": { - "name": "Download failed", - }, - "failed_to_download_update": { - "name": "Failed to download update", - }, - "already_downloaded_same_version": { - "name": "Already downloaded the latest version", - }, - "update_confirmation_title": { - "name": "Update Confirmation", - }, - "update_confirmation_content": { - "name": "Update has been downloaded, do you want to install it now?", - }, - "yes_update_now": { - "name": "Update Now", - }, - "no_update_later": { - "name": "Update Later", + "name": "Downloading updates..." }, "installing_update": { - "name": "Installing updates...", + "name": "Installing updates..." }, - "update_progress": { - "name": "Update Progress", + "update_installed_successfully": { + "name": "Update installed successfully!" }, "update_installed": { - "name": "Update installation successful", - }, - "update_installed_successfully": { - "name": "Update installed successfully!", + "name": "Update installation successful" }, "install_failed": { - "name": "Installation failed", + "name": "Installation failed" }, "failed_to_install_update": { - "name": "Failed to install update", + "name": "Failed to install update" + }, + "download_failed": { + "name": "Download failed" + }, + "failed_to_get_version_info": { + "name": "Failed to get version information" + }, + "failed_to_download_update": { + "name": "Failed to download update" + }, + "download_and_install": { + "name": "Download and install" }, "cancel_update": { - "name": "Cancel Update", + "name": "Cancel update" }, "update_cancelled": { - "name": "Update cancelled", - }, - "update_cancelled_by_user": { - "name": "Update cancelled by user", + "name": "Update cancelled" }, "cancelling_update": { - "name": "Canceling update...", - }, - "already_latest_version": { - "name": "You are up to date!", + "name": "Canceling update..." }, "auto_update_mode": { "name": "Automatically check for updates and install", "description": "Set the auto-update mode of the app", "combo_items": { "0": "Never update automatically", - "1": "Automatically check for updates and notifications", - "2": "Automatically check for updates and downloads", - "3": "Automatically check for updates and install", - }, + "1": "Automatically check for updates and notice", + "2": "Automatically check for updates and download", + "3": "Automatically check for updates and install" + } }, "update_channel": { - "name": "Update Channel Selection", + "name": "Update channel select", "description": "Select release channel for software updates", "combo_items": { - "0": "Stable Channel", - "1": "Test Channel", - "2": "Publish Preview Channel", - }, + "0": "Stable channel", + "1": "Test channel", + "2": "Publish preview channel" + } }, "update_source": { "name": "Update source selection", "description": "Select source of download for software update", "combo_items": { - "0": "gitHub", + "0": "GitHub", "1": "ghfast", - "2": "gh-proxy", - }, + "2": "gh-proxy" + } }, + "force_check": { + "name": "Force check for updates" + }, + "already_downloaded_same_version": { + "name": "The latest version has been downloaded" + }, + "update_confirmation_title": { + "name": "Update confirmation" + }, + "update_confirmation_content": { + "name": "Update has been downloaded. Install now?" + }, + "yes_update_now": { + "name": "Update Now" + }, + "no_update_later": { + "name": "Update Later" + }, + "update_cancelled_by_user": { + "name": "Update cancelled" + }, + "update_notification_title": { + "name": "SecRandom update notification" + }, + "update_notification_content": { + "name": "New version available:{version}\nClick to see details " + } }, } diff --git a/app/Language/modules/voice_settings.py b/app/Language/modules/voice_settings.py index f1233447..945aa8d1 100644 --- a/app/Language/modules/voice_settings.py +++ b/app/Language/modules/voice_settings.py @@ -1,6 +1,12 @@ # 语音设置语言配置 voice_settings = { - "ZH_CN": {"title": {"name": "语音设置", "description": "配置语音播报相关功能"}} + "ZH_CN": {"title": {"name": "语音设置", "description": "配置语音播报相关功能"}}, + "EN_US": { + "title": { + "name": "Voice settings", + "description": "Configure voice playback related functions" + } + }, } # 基础语音设置语言配置 @@ -45,79 +51,74 @@ "description": "设置系统音量的大小", }, }, - "EN_US": { + "EN_US": { "title": { "name": "Basic voice settings", - "description": "配置基础语音播报功能", + "description": "Configure basic voice setting" }, "voice_engine_group": { "name": "Voice engine", - "description": "选择语音合成引擎类型", + "description": "Choose TTS engine type" }, "volume_group": { "name": "Volume settings", - "description": "调整语音播报音量大小", - }, - "voice_enable": { - "name": "Voice Function Switch", - "description": "Turn the voice broadcast function on or off", - "switchbutton_name": {"enable": "ON", "disable": "OFF"}, + "description": "Adjust speech volume" }, "system_volume_group": { "name": "System volume control", - "description": "选择要控制的系统音量类型", + "description": "Select volume type to control" }, "voice_engine": { "name": "Voice engine", - "description": "选择语音合成引擎类型", + "description": "Choose TTS engine", "combo_items": { "0": "System TTS", - "1": "Edge TTS", - }, + "1": "Edge TTS" + } }, "edge_tts_voice_name": { - "name": "Edge TTS-语音名称", - "description": "选择Edge TTS语音播报角色", + "name": "Voice name of Edge TTS", + "description": "Select the voice character of Edge TTS", "combo_items": { "0": "zh-CN-XiaoxiaoNeural", "1": "zh-CN-YunxiNeural", "2": "zh-CN-XiaoyiNeural", "3": "en-US-JennyNeural", - "4": "en-US-GuyNeural", - }, + "4": "en-US-GuyNeural" + } }, "voice_playback": { "name": "Voice playback device", - "description": "选择语音播报播放设备", + "description": "Choose voice playback device", "combo_items": { "0": "System default", "1": "Speakers", "2": "Headphones", - "3": "Bluetooth devices", - }, + "3": "Bluetooth devices" + } }, "volume_size": { "name": "Speech volume", - "description": "调整语音播报音量大小", + "description": "Adjust speech volume" }, "speech_rate": { "name": "Speech rate", - "description": "调整语音播报语速", + "description": "Adjust speech rate" }, "system_volume_control": { "name": "System volume control", - "description": "选择要控制的系统音量类型", + "description": "Select volume type to control", "combo_items": { "0": "Main volume", "1": "App volume", "2": "System sound", - "3": "Microphone volume", - }, + "3": "Microphone volume" + } }, "system_volume_size": { "name": "System volume", - "description": "调整系统音量大小", - }, + "description": "Adjust system volume" + } }, } @@ -172,4 +173,69 @@ "description": "用于TTS发音的替换名称,留空则使用默认发音", }, }, + "EN_US": { + "title": { + "name": "Specific speech setting", + "description": "Speech for specific results" + }, + "enabled": { + "name": "Enable specific speech", + "description": "Totally enable speech for specific results" + }, + "header": { + "name": "Enabled" + }, + "mode": { + "name": "Announcements mode", + "description": "Choose a speech mode", + "combo_items": { + "0": "Picking mode", + "1": "Lottery mode" + } + }, + "roll_call_title": { + "name": "Picking mode configuration", + "description": "Configure speech on drawing mode" + }, + "select_class_name": { + "name": "Select a class/pool", + "description": "Choose a class or pool to manage TTS" + }, + "id_field": { + "name": "Student ID" + }, + "name_field": { + "name": "Name" + }, + "prefix_field": { + "name": "Speech prefix", + "description": "Add text before speech content" + }, + "suffix_field": { + "name": "Speech suffix", + "description": "Add text after speech content" + }, + "lottery_title": { + "name": "Lottery mode configuration", + "description": "Configure speech on lottery mode" + }, + "lottery_id_field": { + "name": "Serial" + }, + "lottery_name_field": { + "name": "Name" + }, + "lottery_prefix_field": { + "name": "Lottery prefix", + "description": "Add text before speech content" + }, + "lottery_suffix_field": { + "name": "Lottery suffix", + "description": "Add text after speech content" + }, + "tts_alias": { + "name": "Replacement", + "description": "Replacement names for TTS pronunciation. Leave a blank to use default pronunciation" + } + }, } diff --git a/scripts/import_crowdin_language.py b/scripts/import_crowdin_language.py index b48dfc6a..4bd42772 100644 --- a/scripts/import_crowdin_language.py +++ b/scripts/import_crowdin_language.py @@ -44,13 +44,26 @@ def parse_args() -> argparse.Namespace: def load_crowdin_json(path: Path) -> list[dict[str, Any]]: """加载Crowdin导出的JSON文件。""" - with path.open("r", encoding="utf-8") as f: - return json.load(f) + try: + with path.open("r", encoding="utf-8") as f: + data = json.load(f) + if not isinstance(data, list): + raise ValueError("JSON文件应包含一个对象数组") + return data + except json.JSONDecodeError as e: + print(f"错误:无法解析JSON文件 {path}: {e}") + raise + except Exception as e: + print(f"错误:读取文件 {path} 时出现问题: {e}") + raise def extract_language_code(filename: str) -> str: """从文件名中提取语言代码(例如:从'EN_US.json'中提取'EN_US')。""" - return Path(filename).stem.upper() + stem = Path(filename).stem + if not stem: + raise ValueError(f"无效的文件名: {filename}") + return stem.upper() def scan_module_files() -> dict[str, tuple[Path, str]]: @@ -64,6 +77,10 @@ def scan_module_files() -> dict[str, tuple[Path, str]]: var_pattern = re.compile(r"^([a-z_][a-z0-9_]*)\s*=\s*\{", re.MULTILINE) + if not LANGUAGE_MODULES_DIR.exists(): + print(f"错误:语言模块目录不存在: {LANGUAGE_MODULES_DIR}") + return var_to_file + for py_file in LANGUAGE_MODULES_DIR.glob("*.py"): if py_file.name == "__init__.py": continue @@ -73,8 +90,12 @@ def scan_module_files() -> dict[str, tuple[Path, str]]: for match in var_pattern.finditer(content): var_name = match.group(1) start = match.end() - 1 - if '"ZH_CN"' in content[start : start + 500]: + # 扩大搜索范围以确保能找到语言定义 + search_end = min(start + 2000, len(content)) + if '"ZH_CN"' in content[start:search_end]: var_to_file[var_name] = (py_file, var_name) + except UnicodeDecodeError as e: + print(f"警告:无法以UTF-8编码读取 {py_file},可能是编码问题: {e}") except Exception as e: print(f"警告:读取 {py_file} 时出错:{e}") @@ -90,20 +111,37 @@ def group_by_module(entries: list[dict[str, Any]]) -> dict[str, dict[str, str]]: """ modules: dict[str, dict[str, str]] = {} - for entry in entries: + for i, entry in enumerate(entries): + # 检查条目是否为字典 + if not isinstance(entry, dict): + print(f"警告:条目 {i} 不是字典格式,跳过") + continue + identifier = entry.get("identifier", "") translation = entry.get("translation", "") - if not identifier or not translation: + # 跳过没有标识符或翻译的条目,但记录警告 + if not identifier: + print(f"警告:条目 {i} 缺少标识符,跳过") + continue + + if not translation: + print(f"警告:条目 {i} 缺少翻译(标识符: {identifier}),跳过") continue parts = identifier.split(".") if len(parts) < 2: + print(f"警告:条目 {i} 的标识符格式不正确: {identifier},跳过") continue module_name = parts[0] key_path = ".".join(parts[1:]) + # 检查键路径是否为空 + if not key_path: + print(f"警告:条目 {i} 的键路径为空: {identifier},跳过") + continue + if module_name not in modules: modules[module_name] = {} modules[module_name][key_path] = translation @@ -125,6 +163,11 @@ def set_nested_value(d: dict, key_path: str, value: Any) -> None: if key not in current: current[key] = {} elif not isinstance(current[key], dict): + # 如果现有值不是字典,我们需要将其转换为字典 + # 但这可能会丢失原有数据,所以发出警告 + print( + f"警告:将非字典值 '{current[key]}' 转换为字典以适应路径 '{key_path}'" + ) current[key] = {} current = current[key] @@ -155,7 +198,7 @@ def format_dict_as_python(d: dict, indent: int = 0) -> str: items = list(d.items()) for i, (key, value) in enumerate(items): - comma = "," if i < len(items) - 1 else "," + comma = "," if i < len(items) - 1 else "" if isinstance(value, dict): nested = format_dict_as_python(value, indent + 1) @@ -207,20 +250,60 @@ def update_module_file( print(f"警告:在 {module_path.name} 中未找到 '{var_name} = {{' 定义") return False - # 检查语言代码是否已存在 - lang_pattern = rf'"{language_code}":\s*\{{' - if re.search(lang_pattern, content): - print( - f" 语言 '{language_code}' 已存在于 {module_path.name}:{var_name} 中,跳过..." - ) - return False + # 检查语言代码是否已存在(更精确的检查) + # 只在当前变量的作用域内查找 + dict_start = match.end() - 1 + brace_count = 0 + dict_end = -1 + in_string = False + escape_next = False + search_content = content[dict_start:] + + for i, char in enumerate(search_content): + if escape_next: + escape_next = False + continue + if char == "\\": + escape_next = True + continue + if char == '"' and not escape_next: + in_string = not in_string + continue + if in_string: + continue + if char == "{": + brace_count += 1 + elif char == "}": + brace_count -= 1 + if brace_count == 0: + dict_end = i + break - lang_entries = list(re.finditer(r'"([A-Z_]+)":\s*\{', content)) + # 在当前变量的字典范围内查找语言代码 + if dict_end > 0: + var_content = search_content[:dict_end] + lang_pattern = rf'"{language_code}":\s*\{{' + if re.search(lang_pattern, var_content): + print( + f" 语言 '{language_code}' 已存在于 {module_path.name}:{var_name} 中,将更新现有翻译..." + ) + # 调用更新函数而不是直接返回 + return update_existing_language( + content, + dict_start, + dict_end, + var_content, + language_code, + lang_dict, + module_path, + var_name, + dry_run, + ) - if not lang_entries: - print(f"警告:在 {module_path.name} 中未找到语言条目") - return False + # 移除了可能导致问题的代码段 + # 这部分代码实际上没有被使用,而且可能会导致错误 + # 重新计算字典范围 dict_start = match.end() - 1 brace_count = 0 dict_end = -1 @@ -254,15 +337,24 @@ def update_module_file( formatted_dict = format_dict_as_python(lang_dict, indent=1) new_entry = f' "{language_code}": {formatted_dict},\n' + # 更稳健地处理逗号插入逻辑 before_close = content[dict_start:dict_end] last_non_ws_idx = len(before_close) - 1 while last_non_ws_idx >= 0 and before_close[last_non_ws_idx] in " \t\n\r": last_non_ws_idx -= 1 - if last_non_ws_idx >= 0 and before_close[last_non_ws_idx] != ",": + # 检查最后一个非空白字符是否为逗号 + if ( + last_non_ws_idx >= 0 + and before_close[last_non_ws_idx] != "," + and before_close[last_non_ws_idx] != "{" + ): insert_comma_pos = dict_start + last_non_ws_idx + 1 content = content[:insert_comma_pos] + "," + content[insert_comma_pos:] dict_end += 1 + # 如果字典是空的,不需要添加逗号 + elif last_non_ws_idx >= 0 and before_close[last_non_ws_idx] == "{": + pass # 空字典,不需要逗号 new_content = content[:dict_end] + new_entry + content[dict_end:] @@ -278,59 +370,167 @@ def update_module_file( return True -def main() -> None: - args = parse_args() +def update_existing_language( + content, + dict_start, + dict_end, + var_content, + language_code, + lang_dict, + module_path, + var_name, + dry_run, +): + """更新已存在的语言条目""" + # 查找现有语言条目的位置 + lang_pattern = rf'"{language_code}"\s*:\s*\{{' + lang_match = re.search(lang_pattern, var_content) + + if not lang_match: + print(f" 无法定位现有语言条目 '{language_code}'") + return False - crowdin_file: Path = args.crowdin_file - if not crowdin_file.exists(): - print(f"错误:文件未找到:{crowdin_file}") - sys.exit(1) + # 计算在完整文件中的绝对位置 + lang_start_in_var = lang_match.start() + lang_start_abs = dict_start + lang_start_in_var + + # 查找语言字典的结束位置 + brace_count = 0 + lang_dict_end = -1 + in_string = False + escape_next = False - language_code = extract_language_code(crowdin_file.name) - print(f"正在导入语言:{language_code}") - print(f"源文件:{crowdin_file}") - print(f"目标目录:{LANGUAGE_MODULES_DIR}") - print() + search_area = content[lang_start_abs:] - print("正在扫描模块文件...") - var_to_file = scan_module_files() - print( - f"找到 {len(var_to_file)} 个语言变量:{', '.join(sorted(var_to_file.keys()))}" - ) - print() + for i, char in enumerate(search_area): + if escape_next: + escape_next = False + continue + if char == "\\": + escape_next = True + continue + if char == '"' and not escape_next: + in_string = not in_string + continue + if in_string: + continue + if char == "{": + brace_count += 1 + elif char == "}": + brace_count -= 1 + if brace_count == 0: + lang_dict_end = lang_start_abs + i + break - entries = load_crowdin_json(crowdin_file) - print(f"已加载 {len(entries)} 个翻译条目") + if lang_dict_end == -1: + print(f" 无法找到语言条目 '{language_code}' 的结束位置") + return False - modules = group_by_module(entries) - print(f"在Crowdin文件中找到 {len(modules)} 个标识符前缀") - print() + # 格式化新的语言字典 + formatted_dict = format_dict_as_python(lang_dict, indent=1) + new_lang_entry = f' "{language_code}": {formatted_dict}' + + # 构造新内容 + # 找到语言条目后面的第一个逗号或大括号 + after_lang_end = lang_dict_end + 1 + while after_lang_end < len(content) and content[after_lang_end] in " \t\n\r": + after_lang_end += 1 + + # 检查下一个非空白字符是否是逗号 + if after_lang_end < len(content) and content[after_lang_end] == ",": + # 包含逗号 + new_content = ( + content[:lang_start_abs] + new_lang_entry + content[after_lang_end:] + ) + else: + # 不包含逗号 + new_content = ( + content[:lang_start_abs] + new_lang_entry + content[lang_dict_end + 1 :] + ) - updated_count = 0 - unmatched_modules = [] + if dry_run: + print(f"将要更新 '{language_code}' 在 {module_path.name}:{var_name}") + return True + + module_path.write_text(new_content, encoding="utf-8") + print(f"已更新 '{language_code}' 在 {module_path.name}:{var_name}") + return True - for module_name, translations in sorted(modules.items()): - if module_name in var_to_file: - file_path, var_name = var_to_file[module_name] - if update_module_file( - file_path, var_name, language_code, translations, args.dry_run - ): - updated_count += 1 - else: - unmatched_modules.append(module_name) - print() - if unmatched_modules: +def main() -> None: + try: + args = parse_args() + + crowdin_file: Path = args.crowdin_file + if not crowdin_file.exists(): + print(f"错误:文件未找到:{crowdin_file}") + sys.exit(1) + + language_code = extract_language_code(crowdin_file.name) + print(f"正在导入语言:{language_code}") + print(f"源文件:{crowdin_file}") + print(f"目标目录:{LANGUAGE_MODULES_DIR}") + print() + + print("正在扫描模块文件...") + var_to_file = scan_module_files() + if not var_to_file: + print("错误:未找到任何语言模块文件") + sys.exit(1) + print( - f"未匹配的Crowdin模块 ({len(unmatched_modules)}): {', '.join(sorted(unmatched_modules))}" + f"找到 {len(var_to_file)} 个语言变量:{', '.join(sorted(var_to_file.keys()))}" ) - print("(这些标识符在模块文件中没有匹配的变量)") + print() - print() - if args.dry_run: - print(f"模拟运行完成。将更新 {updated_count} 个语言条目。") - else: - print(f"导入完成。已更新 {updated_count} 个语言条目。") + try: + entries = load_crowdin_json(crowdin_file) + except (json.JSONDecodeError, ValueError) as e: + print(f"错误:无法加载或解析JSON文件: {e}") + sys.exit(1) + + print(f"已加载 {len(entries)} 个翻译条目") + + modules = group_by_module(entries) + print(f"在Crowdin文件中找到 {len(modules)} 个标识符前缀") + print() + + updated_count = 0 + unmatched_modules = [] + + for module_name, translations in sorted(modules.items()): + if module_name in var_to_file: + file_path, var_name = var_to_file[module_name] + try: + if update_module_file( + file_path, var_name, language_code, translations, args.dry_run + ): + updated_count += 1 + except Exception as e: + print(f"警告:更新模块 {module_name} 时出错: {e}") + continue + else: + unmatched_modules.append(module_name) + + print() + if unmatched_modules: + print( + f"未匹配的Crowdin模块 ({len(unmatched_modules)}): {', '.join(sorted(unmatched_modules))}" + ) + print("(这些标识符在模块文件中没有匹配的变量)") + + print() + if args.dry_run: + print(f"模拟运行完成。将更新 {updated_count} 个语言条目。") + else: + print(f"导入完成。已更新 {updated_count} 个语言条目。") + + except KeyboardInterrupt: + print("\n操作被用户取消。") + sys.exit(1) + except Exception as e: + print(f"发生未预期的错误: {e}") + sys.exit(1) if __name__ == "__main__": From f1a23baee73063cb67ec5d30a4bb2fc756911508 Mon Sep 17 00:00:00 2001 From: jimmy-sketch Date: Fri, 19 Dec 2025 23:36:23 +0800 Subject: [PATCH 4/4] chore: format files with ruff --- app/Language/modules/basic_settings.py | 176 +++---- app/Language/modules/custom_settings.py | 114 ++--- app/Language/modules/extraction_settings.py | 325 +++++------- app/Language/modules/fair_draw.py | 62 +-- app/Language/modules/history.py | 100 ++-- app/Language/modules/list_management.py | 202 ++++---- app/Language/modules/lottery_list.py | 373 ++++++-------- app/Language/modules/lottery_main.py | 34 +- app/Language/modules/more_settings.py | 63 +-- app/Language/modules/notification_settings.py | 157 +++--- app/Language/modules/remaining_list.py | 16 +- app/Language/modules/roll_call_list.py | 476 +++++++----------- app/Language/modules/roll_call_main.py | 30 +- app/Language/modules/safety_settings.py | 241 +++------ .../modules/sidebar_tray_management.py | 189 +++---- app/Language/modules/update.py | 146 ++---- app/Language/modules/voice_settings.py | 94 ++-- 17 files changed, 1053 insertions(+), 1745 deletions(-) diff --git a/app/Language/modules/basic_settings.py b/app/Language/modules/basic_settings.py index 73a4ed12..b29fdd5d 100644 --- a/app/Language/modules/basic_settings.py +++ b/app/Language/modules/basic_settings.py @@ -144,59 +144,59 @@ }, }, }, - "EN_US": { + "EN_US": { "title": { "name": "Basic settings", - "description": "Configure basic features and appearance of software" + "description": "Configure basic features and appearance of software", }, "basic_function": { "name": "Basic functions", - "description": "Configure software's core functions" + "description": "Configure software's core functions", }, "data_management": { "name": "Data management", - "description": "Import or export the software's data" + "description": "Import or export the software's data", }, "personalised": { "name": "Customization", - "description": "Customize the look and experience of software" + "description": "Customize the look and experience of software", }, "autostart": { "name": "Start on boot", - "description": "Set whether the software is running automatically with the system" + "description": "Set whether the software is running automatically with the system", }, "check_update": { "name": "Check for updates on startup", - "description": "Set whether to automatically check for new versions when software starts" + "description": "Set whether to automatically check for new versions when software starts", }, "show_startup_window": { "name": "Show splash screen", - "description": "Set whether to show the splash screen on boot" + "description": "Set whether to show the splash screen on boot", }, "export_diagnostic_data": { "name": "Export diagnostic data", "description": "Export Diagnostic Information on Exit", - "pushbutton_name": "Export diagnostic data" + "pushbutton_name": "Export diagnostic data", }, "export_settings": { "name": "Export settings", "description": "Export current settings to profile", - "pushbutton_name": "Export settings" + "pushbutton_name": "Export settings", }, "import_settings": { "name": "Import settings", "description": "Import settings from profile to overwrite the current profile", - "pushbutton_name": "Import settings" + "pushbutton_name": "Import settings", }, "export_all_data": { "name": "Export all data", "description": "Export all data and settings when exit", - "pushbutton_name": "Export all data" + "pushbutton_name": "Export all data", }, "import_all_data": { "name": "Import all data", "description": "Restore all data from backup file when software starts", - "pushbutton_name": "Import all data" + "pushbutton_name": "Import all data", }, "dpiScale": { "name": "DPI scale settings", @@ -207,37 +207,33 @@ "2": "150%", "3": "175%", "4": "200%", - "5": "Auto" - } + "5": "Auto", + }, }, "font": { "name": "Font", - "description": "Set the font to display (restart required)" + "description": "Set the font to display (restart required)", }, "theme": { "name": "Theme mode", "description": "Select the software interface theme style", - "combo_items": { - "0": "Light", - "1": "Dark", - "2": "Follow system" - } + "combo_items": {"0": "Light", "1": "Dark", "2": "Follow system"}, }, "theme_color": { "name": "Theme color", - "description": "Set the software interface theme color" + "description": "Set the software interface theme color", }, "language": { "name": "Display language", - "description": "Switch display language (restart required)" + "description": "Switch display language (restart required)", }, "background_resident": { "name": "Run in background", - "description": "Whether to remain in the back office after closing all windows" + "description": "Whether to remain in the back office after closing all windows", }, "url_protocol": { "name": "URL protocol register", - "description": "Sign up for custom URL protocol (secrandom://), support to launch app via link" + "description": "Sign up for custom URL protocol (secrandom://), support to launch app via link", }, "log_level": { "name": "Log level", @@ -247,146 +243,86 @@ "1": "INFO", "2": "WARNING", "3": "ERROR", - "4": "CRITICAL" - } + "4": "CRITICAL", + }, }, "settings_import_export": { - "export_success_title": { - "name": "Export settings" - }, + "export_success_title": {"name": "Export settings"}, "export_success_content": { "name": "Settings have been exported to:\n{path}" }, - "export_failure_title": { - "name": "Export settings" - }, - "export_failure_content": { - "name": "Failed to export settings: \n{error}" - }, - "import_confirm_title": { - "name": "Import settings" - }, + "export_failure_title": {"name": "Export settings"}, + "export_failure_content": {"name": "Failed to export settings: \n{error}"}, + "import_confirm_title": {"name": "Import settings"}, "import_confirm_content": { "name": "Are you sure you want to import these settings? This will overwrite the current settings" }, - "import_confirm_button": { - "name": "Confirm import" - }, - "import_cancel_button": { - "name": "Cancel import" - }, - "import_success_title": { - "name": "Import settings" - }, + "import_confirm_button": {"name": "Confirm import"}, + "import_cancel_button": {"name": "Cancel import"}, + "import_success_title": {"name": "Import settings"}, "import_success_content": { "name": "Settings successfully imported\nRestart to take effect" }, - "import_success_button": { - "name": "Got it" - }, - "export_success_button": { - "name": "Got it" - }, - "import_failure_title": { - "name": "Import settings" - }, - "import_failure_content": { - "name": "Failed to import settings: \n{error}" - } + "import_success_button": {"name": "Got it"}, + "export_success_button": {"name": "Got it"}, + "import_failure_title": {"name": "Import settings"}, + "import_failure_content": {"name": "Failed to import settings: \n{error}"}, }, "data_import_export": { - "export_success_title": { - "name": "Export all data" - }, + "export_success_title": {"name": "Export all data"}, "export_success_content": { "name": "All data has been exported to:\n{path}" }, - "export_failure_title": { - "name": "Export all data" - }, - "export_failure_content": { - "name": "Failed to export all data: \n{error}" - }, - "import_confirm_title": { - "name": "Import all data" - }, + "export_failure_title": {"name": "Export all data"}, + "export_failure_content": {"name": "Failed to export all data: \n{error}"}, + "import_confirm_title": {"name": "Import all data"}, "import_confirm_content": { "name": "Are you sure you want to import these data? This will overwrite the current data" }, - "import_confirm_button": { - "name": "Confirm import" - }, - "import_cancel_button": { - "name": "Cancel import" - }, - "import_success_title": { - "name": "Import all data" - }, + "import_confirm_button": {"name": "Confirm import"}, + "import_cancel_button": {"name": "Cancel import"}, + "import_success_title": {"name": "Import all data"}, "import_success_content": { "name": "Data imported successfully into\nRestart APP to take effect" }, - "import_success_button": { - "name": "Got it" - }, - "import_failure_title": { - "name": "Import all data" - }, - "import_failure_content": { - "name": "Failed to import all data: \n{error}" - }, - "existing_files_count": { - "name": "\n... still have {len} files" - }, - "existing_files_title": { - "name": "File already exists" - }, + "import_success_button": {"name": "Got it"}, + "import_failure_title": {"name": "Import all data"}, + "import_failure_content": {"name": "Failed to import all data: \n{error}"}, + "existing_files_count": {"name": "\n... still have {len} files"}, + "existing_files_title": {"name": "File already exists"}, "existing_files_content": { "name": "The following files already exist:\n{files}\n\nOverwrite these files?" }, - "version_mismatch_title": { - "name": "Version mismatch" - }, + "version_mismatch_title": {"name": "Version mismatch"}, "version_mismatch_content": { "name": "The version from imported data mismatches with current version:\n\nImported data is from: {software_name} {version}\nCurrent software is: SecRandom {current_version}\n\nContinue importing?" }, - "export_warning_title": { - "name": "Export all data" - }, + "export_warning_title": {"name": "Export all data"}, "export_warning_content": { "name": "All data will soon be exported, including:\n\nsoftware version, settings,\nname list, prize list,\nhistory, log file\n\nNOTE: exported data may contain sensitive information, please keep it safe.\n\nContinue exporting?" - } + }, }, "diagnostic_data_export": { - "export_confirm_button": { - "name": "Confirm Export" - }, - "export_cancel_button": { - "name": "Cancel export" - }, - "export_success_title": { - "name": "Export diagnostic data" - }, + "export_confirm_button": {"name": "Confirm Export"}, + "export_cancel_button": {"name": "Cancel export"}, + "export_success_title": {"name": "Export diagnostic data"}, "export_success_content": { "name": "Diagnostic data has been exported to:\n{path}" }, - "export_failure_title": { - "name": "Export diagnostic data" - }, + "export_failure_title": {"name": "Export diagnostic data"}, "export_failure_content": { "name": "Failed to export diagnostic data: \n{error}" }, - "export_warning_title": { - "name": "Export diagnostic data" - }, + "export_warning_title": {"name": "Export diagnostic data"}, "export_warning_content": { "name": "Diagnostic data will soon be exported, including:\n\nsoftware information, settings,\nname list, prize list,\nhistory, log file\n\nNOTE: exported data may contain sensitive information, please keep it safe.\n\nContinue exporting?" - } + }, }, "success_enable_content": { "name": "Enabled displaying main window when launching" }, "info_disable_content": { "name": "Disabled displaying main window when launching" - } + }, }, } diff --git a/app/Language/modules/custom_settings.py b/app/Language/modules/custom_settings.py index b1eb1456..45883ed5 100644 --- a/app/Language/modules/custom_settings.py +++ b/app/Language/modules/custom_settings.py @@ -2,10 +2,10 @@ custom_settings = { "ZH_CN": {"title": {"name": "个性设置", "description": "个性化设置选项"}}, - "EN_US": { + "EN_US": { "title": { "name": "Personal Settings", - "description": "Personalized Settings Options" + "description": "Personalized Settings Options", } }, } @@ -163,190 +163,160 @@ "switchbutton_name": {"enable": "", "disable": ""}, }, }, - "EN_US": { - "title": { - "name": "Page management", - "description": "Page management settings" - }, - "roll_call": { - "name": "Pick settings", - "description": "Pick function settings" - }, + "EN_US": { + "title": {"name": "Page management", "description": "Page management settings"}, + "roll_call": {"name": "Pick settings", "description": "Pick function settings"}, "lottery": { "name": "Lottery settings", - "description": "Lottery function settings" + "description": "Lottery function settings", }, "custom": { "name": "Custom pick settings", - "description": "Custom pick function settings" + "description": "Custom pick function settings", }, "roll_call_method": { "name": "Picking control panel position", "description": "Set the location of the picking control panel", - "combo_items": { - "0": "Left", - "1": "Right" - } + "combo_items": {"0": "Left", "1": "Right"}, }, "show_name": { "name": "Name setting button", "description": "When enabled, the software will display the name setting button", - "switchbutton_name": { - "enable": "Show", - "disable": "Hide" - } + "switchbutton_name": {"enable": "Show", "disable": "Hide"}, }, "reset_roll_call": { "name": "Picking reset button", "description": "When enabled, the software will display the picking reset button", - "switchbutton_name": { - "enable": "Show", - "disable": "Hide" - } + "switchbutton_name": {"enable": "Show", "disable": "Hide"}, }, "roll_call_quantity_control": { "name": "Control bar of Picking quantity", - "description": "Control whether to display the control bar that adjusts the picking count" + "description": "Control whether to display the control bar that adjusts the picking count", }, "roll_call_start_button": { "name": "Start button", - "description": "Control whether to display a button to start the name" + "description": "Control whether to display a button to start the name", }, "roll_call_list": { "name": "Name list switching down", - "description": "Control whether to display a name list switching down" + "description": "Control whether to display a name list switching down", }, "roll_call_range": { "name": "Dropdown box of Picking range", - "description": "Controls whether to display the name range selection dropdown" + "description": "Controls whether to display the name range selection dropdown", }, "roll_call_gender": { "name": "Dropdown box of picking gender range", - "description": "Control if you want to display the name gender range selection dropdown" + "description": "Control if you want to display the name gender range selection dropdown", }, "roll_call_quantity_label": { "name": "Quantity label", - "description": "Control whether to display picked numbers/groups label" + "description": "Control whether to display picked numbers/groups label", }, "roll_call_remaining_button": { "name": "View remaining list button", - "description": "Control whether to display a button to view the remaining list" + "description": "Control whether to display a button to view the remaining list", }, "lottery_method": { "name": "Lottery control panel position", "description": "Set the location of the lottery control panel", - "combo_items": { - "0": "Left", - "1": "Right" - } + "combo_items": {"0": "Left", "1": "Right"}, }, "show_lottery_name": { "name": "Name set button", "description": "Control whether to display the prize name setting button", - "switchbutton_name": { - "enable": "Show", - "disable": "Hide" - } + "switchbutton_name": {"enable": "Show", "disable": "Hide"}, }, "reset_lottery": { "name": "Reset lottery button", "description": "Control whether to display the lottery resetting button", - "switchbutton_name": { - "enable": "Show", - "disable": "Hide" - } + "switchbutton_name": {"enable": "Show", "disable": "Hide"}, }, "lottery_quantity_control": { "name": "Control bar of Picking quantity", - "description": "Control whether to display the control bar that adjusts the number of lottery" + "description": "Control whether to display the control bar that adjusts the number of lottery", }, "lottery_start_button": { "name": "Start button", - "description": "Control whether to display a button to start the lottery" + "description": "Control whether to display a button to start the lottery", }, "lottery_list": { "name": "Lottery list switching down", - "description": "Control whether to display a lottery list switching down" + "description": "Control whether to display a lottery list switching down", }, "lottery_quantity_label": { "name": "Quantity label", - "description": "Control whether to display the number of meddles" + "description": "Control whether to display the number of meddles", }, "lottery_remaining_button": { "name": "View remaining list button", - "description": "Control whether to display a button to view the remaining list" + "description": "Control whether to display a button to view the remaining list", }, "custom_method": { "name": "Custom pick control panel position", "description": "Set the custom pick control panel display position", - "combo_items": { - "0": "Left", - "1": "Right" - } + "combo_items": {"0": "Left", "1": "Right"}, }, "reset_custom": { "name": "Reset custom pick button", "description": "Control whether to display the custom pick resetting button", - "switchbutton_name": { - "enable": "Show", - "disable": "Hide" - } + "switchbutton_name": {"enable": "Show", "disable": "Hide"}, }, "custom_quantity_control": { "name": "Control bar of Picking quantity", - "description": "Control whether to display the control bar that adjusts the custom picking count" + "description": "Control whether to display the control bar that adjusts the custom picking count", }, "custom_start_button": { "name": "Start button", - "description": "Control whether to display the custom pick starting button" + "description": "Control whether to display the custom pick starting button", }, "custom_list": { "name": "Custom picking list switching down", - "description": "Control whether to display a custom picking list switching down" + "description": "Control whether to display a custom picking list switching down", }, "custom_range_start": { "name": "Custom pick dropdown box", - "description": "Control whether to display custom extraction range selection box" + "description": "Control whether to display custom extraction range selection box", }, "custom_range_end": { "name": "Custom pick gender range dropdown box", - "description": "Control whether to display custom pick gender range selection box" + "description": "Control whether to display custom pick gender range selection box", }, "draw_custom_method": { "name": "Custom pick control panel position", - "description": "Control whether to display custom pick control panel position" + "description": "Control whether to display custom pick control panel position", }, "custom_quantity_label": { "name": "Quantity label", - "description": "Control whether to display custom pick numbers/groups label" + "description": "Control whether to display custom pick numbers/groups label", }, "custom_remaining_button": { "name": "View remaining list button", - "description": "Control whether to display a button to view the remaining list" + "description": "Control whether to display a button to view the remaining list", }, "roll_call_reset_button": { "name": "Reset picking button", - "description": "Show reset name buttons when enabled" + "description": "Show reset name buttons when enabled", }, "lottery_reset_button": { "name": "Reset lottery button", - "description": "Control whether to display the lottery reset button" + "description": "Control whether to display the lottery reset button", }, "lottery_roll_call_list": { "name": "List of students in the prize switches drop-down", - "description": "Control whether to display the student list switching box in lottery" + "description": "Control whether to display the student list switching box in lottery", }, "lottery_roll_call_range": { "name": "Pick up frame for student range in lottery", - "description": "Controls whether to display student name selection box in lottery" + "description": "Controls whether to display student name selection box in lottery", }, "lottery_roll_call_gender": { "name": "Dropdown box of Gender range in Lottery", - "description": "Controls whether to show a gender naming box for students in lottery" + "description": "Controls whether to show a gender naming box for students in lottery", }, "custom_reset_button": { "name": "Reset custom pick button", - "description": "Controls whether to display custom pick reset buttons" - } + "description": "Controls whether to display custom pick reset buttons", + }, }, } diff --git a/app/Language/modules/extraction_settings.py b/app/Language/modules/extraction_settings.py index 20bf7d01..72ceddd5 100644 --- a/app/Language/modules/extraction_settings.py +++ b/app/Language/modules/extraction_settings.py @@ -1,12 +1,7 @@ # 抽取设置语言配置 extraction_settings = { "ZH_CN": {"title": {"name": "抽取设置", "description": "抽取功能设置"}}, - "EN_US": { - "title": { - "name": "Pick settings", - "description": "Pick settings" - } - }, + "EN_US": {"title": {"name": "Pick settings", "description": "Pick settings"}}, } # 点名设置语言配置 @@ -97,34 +92,31 @@ "description": "管理学生图片文件,图片文件名需与学生姓名一致", }, }, - "EN_US": { - "title": { - "name": "Picking settings", - "description": "Picking settings" - }, + "EN_US": { + "title": {"name": "Picking settings", "description": "Picking settings"}, "extraction_function": { "name": "Picking function", - "description": "Set picking function" + "description": "Set picking function", }, "display_settings": { "name": "Display settings", - "description": "Set the method to display the pick results" + "description": "Set the method to display the pick results", }, "basic_animation_settings": { "name": "Animation settings", - "description": "Set picking animations" + "description": "Set picking animations", }, "color_theme_settings": { "name": "Color theme settings", - "description": "Set the color theme of pick results" + "description": "Set the color theme of pick results", }, "student_image_settings": { "name": "Student image settings", - "description": "Set to show student avatars in the results" + "description": "Set to show student avatars in the results", }, "music_settings": { "name": "Music settings", - "description": "Set the music to play on picking" + "description": "Set the music to play on picking", }, "draw_mode": { "name": "Picking mode", @@ -132,46 +124,36 @@ "combo_items": { "0": "Pick with repeating", "1": "Pick without repeating", - "2": "Semi-repeatedly pick" - } + "2": "Semi-repeatedly pick", + }, }, "clear_record": { "name": "Clear history method", "description": "Set the time to clean picking history", - "combo_items": { - "0": "Clear on restart", - "1": "Until all have been picked" - }, + "combo_items": {"0": "Clear on restart", "1": "Until all have been picked"}, "combo_items_other": { "0": "Clear on restart", "1": "Until all have been picked", - "2": "Do not clear" - } + "2": "Do not clear", + }, }, "half_repeat": { "name": "Semi-repeated pick count", - "description": "Set the maximum picked times of each person to clean history" + "description": "Set the maximum picked times of each person to clean history", }, "draw_type": { "name": "Picking method", "description": "Set picking method", - "combo_items": { - "0": "Random pick", - "1": "Fair pick" - } + "combo_items": {"0": "Random pick", "1": "Fair pick"}, }, "font_size": { "name": "Font size", - "description": "Set picking result font size" + "description": "Set picking result font size", }, "display_format": { "name": "Result display format", "description": "Set the results display format", - "combo_items": { - "0": "Student ID + Name", - "1": "Name", - "2": "Student ID" - } + "combo_items": {"0": "Student ID + Name", "1": "Name", "2": "Student ID"}, }, "show_random": { "name": "Format of showing random group member", @@ -179,8 +161,8 @@ "combo_items": { "0": "Hide", "1": "Group[New line]Name", - "2": "Group name[Dash]name" - } + "2": "Group name[Dash]name", + }, }, "animation": { "name": "Animation mode", @@ -188,38 +170,34 @@ "combo_items": { "0": "Manually stop animation", "1": "Automatically play animation", - "2": "Directly show result" - } + "2": "Directly show result", + }, }, "animation_interval": { "name": "Animation interval", - "description": "Set the interval between picking animations (ms)" + "description": "Set the interval between picking animations (ms)", }, "autoplay_count": { "name": "Autoplay count", - "description": "Set the number of times to animate" + "description": "Set the number of times to animate", }, "animation_color_theme": { "name": "Animation/Result Color Theme", "description": "Set the animate/result color theme", - "combo_items": { - "0": "Disabled", - "1": "Random color", - "2": "Fixed color" - } + "combo_items": {"0": "Disabled", "1": "Random color", "2": "Fixed color"}, }, "animation_fixed_color": { "name": "Animation/Result fixed color", - "description": "Set the animation/result color" + "description": "Set the animation/result color", }, "student_image": { "name": "Show student images", - "description": "Set whether to show student images" + "description": "Set whether to show student images", }, "open_student_image_folder": { "name": "Student image folder", - "description": "Manage student image files. Picture file names must match student name" - } + "description": "Manage student image files. Picture file names must match student name", + }, }, } @@ -311,34 +289,31 @@ "description": "管理学生图片文件,图片文件名需与学生姓名一致", }, }, - "EN_US": { - "title": { - "name": "Quick Pick settings", - "description": "Quick Pick settings" - }, + "EN_US": { + "title": {"name": "Quick Pick settings", "description": "Quick Pick settings"}, "extraction_function": { "name": "Picking function", - "description": "Set Quick Pick function" + "description": "Set Quick Pick function", }, "display_settings": { "name": "Display settings", - "description": "Set the method to display Quick Pick results" + "description": "Set the method to display Quick Pick results", }, "basic_animation_settings": { "name": "Animation settings", - "description": "Set Quick Pick animations" + "description": "Set Quick Pick animations", }, "color_theme_settings": { "name": "Color theme settings", - "description": "Set the color theme of Quick Pick results" + "description": "Set the color theme of Quick Pick results", }, "student_image_settings": { "name": "Student image settings", - "description": "Set to show student avatars in the Quick Pick results" + "description": "Set to show student avatars in the Quick Pick results", }, "music_settings": { "name": "Music settings", - "description": "Set the music to play when conducting Quick Pick" + "description": "Set the music to play when conducting Quick Pick", }, "draw_mode": { "name": "Picking mode", @@ -346,46 +321,36 @@ "combo_items": { "0": "Pick with repeating", "1": "Pick without repeating", - "2": "Semi-repeatedly pick" - } + "2": "Semi-repeatedly pick", + }, }, "clear_record": { "name": "Clear history method", "description": "Set the method to clear Quick Pick records", - "combo_items": { - "0": "Clear on restart", - "1": "Until all have been picked" - }, + "combo_items": {"0": "Clear on restart", "1": "Until all have been picked"}, "combo_items_other": { "0": "Clear on restart", "1": "Until all have been picked", - "2": "Do not clear" - } + "2": "Do not clear", + }, }, "half_repeat": { "name": "Semi-repeated pick count", - "description": "Set the maximum picked times of each person to clean history" + "description": "Set the maximum picked times of each person to clean history", }, "draw_type": { "name": "Picking method", "description": "Set Quick Pick method", - "combo_items": { - "0": "Random pick", - "1": "Fair pick" - } + "combo_items": {"0": "Random pick", "1": "Fair pick"}, }, "font_size": { "name": "Font size", - "description": "Set Quick Pick result font size" + "description": "Set Quick Pick result font size", }, "display_format": { "name": "Result display format", "description": "Set Quick Pick display format", - "combo_items": { - "0": "Student ID + Name", - "1": "Name", - "2": "Student ID" - } + "combo_items": {"0": "Student ID + Name", "1": "Name", "2": "Student ID"}, }, "show_random": { "name": "Format of showing random group member", @@ -393,8 +358,8 @@ "combo_items": { "0": "Hide", "1": "Group[New line]Name", - "2": "Group name[Dash]name" - } + "2": "Group name[Dash]name", + }, }, "animation": { "name": "Animation mode", @@ -402,51 +367,43 @@ "combo_items": { "0": "Manually stop animation", "1": "Automatically play animation", - "2": "Directly show result" - } + "2": "Directly show result", + }, }, "animation_interval": { "name": "Animation interval", - "description": "Set the interval between Quick Pick (ms)" + "description": "Set the interval between Quick Pick (ms)", }, "autoplay_count": { "name": "Autoplay count", - "description": "Configure Quick Pick animation autoplay count" + "description": "Configure Quick Pick animation autoplay count", }, "animation_color_theme": { "name": "Animation color theme", "description": "Set the animate/result color theme of Quick Pick", - "combo_items": { - "0": "Disabled", - "1": "Random color", - "2": "Fixed color" - } + "combo_items": {"0": "Disabled", "1": "Random color", "2": "Fixed color"}, }, "result_color_theme": { "name": "Results color theme", "description": "Set the color theme of Quick Pick results", - "combo_items": { - "0": "Disabled", - "1": "Random color", - "2": "Fixed color" - } + "combo_items": {"0": "Disabled", "1": "Random color", "2": "Fixed color"}, }, "animation_fixed_color": { "name": "Animation fixed color", - "description": "Set the animation/result color of Quick Pick" + "description": "Set the animation/result color of Quick Pick", }, "result_fixed_color": { "name": "Results fixed color", - "description": "Configure fixed color for Quick Pick result display" + "description": "Configure fixed color for Quick Pick result display", }, "student_image": { "name": "Show student images", - "description": "Set whether to show student images" + "description": "Set whether to show student images", }, "open_student_image_folder": { "name": "Student image folder", - "description": "Manage student image files. Picture file names must match student name" - } + "description": "Manage student image files. Picture file names must match student name", + }, }, } @@ -538,34 +495,34 @@ "description": "管理学生图片文件,图片文件名需与学生姓名一致", }, }, - "EN_US": { + "EN_US": { "title": { "name": "Instant Pick settings", - "description": "Instant Pick settings" + "description": "Instant Pick settings", }, "extraction_function": { "name": "Picking function", - "description": "Set Instant Pick function" + "description": "Set Instant Pick function", }, "display_settings": { "name": "Display settings", - "description": "Set the method to display the Instant Pick results" + "description": "Set the method to display the Instant Pick results", }, "basic_animation_settings": { "name": "Animation settings", - "description": "Set Instant Pick animations" + "description": "Set Instant Pick animations", }, "color_theme_settings": { "name": "Color theme settings", - "description": "Set the color theme of Instant Pick results" + "description": "Set the color theme of Instant Pick results", }, "student_image_settings": { "name": "Student image settings", - "description": "Set to show student avatars in the Instant Pick results" + "description": "Set to show student avatars in the Instant Pick results", }, "music_settings": { "name": "Music settings", - "description": "Set the music to play when conducting Instant Puck" + "description": "Set the music to play when conducting Instant Puck", }, "draw_mode": { "name": "Picking mode", @@ -573,46 +530,36 @@ "combo_items": { "0": "Pick with repeating", "1": "Pick without repeating", - "2": "Semi-repeatedly pick" - } + "2": "Semi-repeatedly pick", + }, }, "clear_record": { "name": "Clear history method", "description": "Sets the method to clear Instant Pick history", - "combo_items": { - "0": "Clear on restart", - "1": "Until all have been picked" - }, + "combo_items": {"0": "Clear on restart", "1": "Until all have been picked"}, "combo_items_other": { "0": "Clear on restart", "1": "Until all have been picked", - "2": "Do not clear" - } + "2": "Do not clear", + }, }, "half_repeat": { "name": "Semi-repeated pick count", - "description": "Set how many times each is picked and clear the history" + "description": "Set how many times each is picked and clear the history", }, "draw_type": { "name": "Picking method", "description": "Set Instant Pick method", - "combo_items": { - "0": "Random pick", - "1": "Fair pick" - } + "combo_items": {"0": "Random pick", "1": "Fair pick"}, }, "font_size": { "name": "Font size", - "description": "Set the Instant Pick result font size" + "description": "Set the Instant Pick result font size", }, "display_format": { "name": "Result display format", "description": "Set the Instant Pick display format", - "combo_items": { - "0": "Student ID + Name", - "1": "Name", - "2": "Student ID" - } + "combo_items": {"0": "Student ID + Name", "1": "Name", "2": "Student ID"}, }, "show_random": { "name": "Format of showing random group member", @@ -620,8 +567,8 @@ "combo_items": { "0": "Hide", "1": "Group[New line]Name", - "2": "Group name[Dash]name" - } + "2": "Group name[Dash]name", + }, }, "animation": { "name": "Animation mode", @@ -629,62 +576,51 @@ "combo_items": { "0": "Manually stop animation", "1": "Automatically play animation", - "2": "Directly show result" - } + "2": "Directly show result", + }, }, "animation_interval": { "name": "Animation interval", - "description": "Set Instant Picking animation interval (ms)" + "description": "Set Instant Picking animation interval (ms)", }, "autoplay_count": { "name": "Autoplay count", - "description": "Configure Instant Pick animation autoplay count" + "description": "Configure Instant Pick animation autoplay count", }, "animation_color_theme": { "name": "Animation color theme", "description": "Set Instant Pick animate/result color theme", - "combo_items": { - "0": "Disabled", - "1": "Random color", - "2": "Fixed color" - } + "combo_items": {"0": "Disabled", "1": "Random color", "2": "Fixed color"}, }, "result_color_theme": { "name": "Results color theme", "description": "Set Instant Pick result color theme", - "combo_items": { - "0": "Disabled", - "1": "Random color", - "2": "Fixed color" - } + "combo_items": {"0": "Disabled", "1": "Random color", "2": "Fixed color"}, }, "animation_fixed_color": { "name": "Animation fixed color", - "description": "Set Instant Pick animation/result fixed color" + "description": "Set Instant Pick animation/result fixed color", }, "result_fixed_color": { "name": "Results fixed color", - "description": "Set Instant Pick result fixed color" + "description": "Set Instant Pick result fixed color", }, "student_image": { "name": "Show student images", - "description": "Set whether to show student images" + "description": "Set whether to show student images", }, "open_student_image_folder": { "name": "Student image folder", - "description": "Manage student image files. Picture file names must match student name" - } + "description": "Manage student image files. Picture file names must match student name", + }, }, } # 自定义抽设置 custom_draw_settings = { "ZH_CN": {"title": {"name": "自定义抽设置", "description": "自定义抽取功能设置"}}, - "EN_US": { - "title": { - "name": "Custom pick settings", - "description": "Custom pick settings" - } + "EN_US": { + "title": {"name": "Custom pick settings", "description": "Custom pick settings"} }, } @@ -771,34 +707,31 @@ "description": "管理奖品图片文件,图片文件名需与奖品名称一致", }, }, - "EN_US": { - "title": { - "name": "Lottery settings", - "description": "Lottery settings" - }, + "EN_US": { + "title": {"name": "Lottery settings", "description": "Lottery settings"}, "extraction_function": { "name": "Picking function", - "description": "Set lottery function" + "description": "Set lottery function", }, "display_settings": { "name": "Display settings", - "description": "Set the method to display the lottery results" + "description": "Set the method to display the lottery results", }, "basic_animation_settings": { "name": "Animation settings", - "description": "Set lottery animations" + "description": "Set lottery animations", }, "color_theme_settings": { "name": "Color theme settings", - "description": "Set the color theme of lottery results" + "description": "Set the color theme of lottery results", }, "student_image_settings": { "name": "Prize image settings", - "description": "Set the prize image to display in lottery results" + "description": "Set the prize image to display in lottery results", }, "music_settings": { "name": "Music settings", - "description": "Set the music to play when lottery" + "description": "Set the music to play when lottery", }, "draw_mode": { "name": "Picking mode", @@ -806,46 +739,36 @@ "combo_items": { "0": "Pick with repeating", "1": "Pick without repeating", - "2": "Semi-repeatedly pick" - } + "2": "Semi-repeatedly pick", + }, }, "clear_record": { "name": "Clear history method", "description": "Sets the method to clear lottery records", - "combo_items": { - "0": "Clear on restart", - "1": "Until all have been picked" - }, + "combo_items": {"0": "Clear on restart", "1": "Until all have been picked"}, "combo_items_other": { "0": "Clear on restart", "1": "Until all have been picked", - "2": "Do not clear" - } + "2": "Do not clear", + }, }, "half_repeat": { "name": "Semi-repeated pick count", - "description": "Set the maximum picked times of each person to clean history" + "description": "Set the maximum picked times of each person to clean history", }, "draw_type": { "name": "Picking method", "description": "Set lottery function", - "combo_items": { - "0": "Random pick", - "1": "Fair pick" - } + "combo_items": {"0": "Random pick", "1": "Fair pick"}, }, "font_size": { "name": "Font size", - "description": "Set the lottery result font size" + "description": "Set the lottery result font size", }, "display_format": { "name": "Result display format", "description": "Set the lottery results display format", - "combo_items": { - "0": "Serial + Name", - "1": "Name", - "2": "Serial" - } + "combo_items": {"0": "Serial + Name", "1": "Name", "2": "Serial"}, }, "animation": { "name": "Animation mode", @@ -853,54 +776,46 @@ "combo_items": { "0": "Manually stop animation", "1": "Automatically play animation", - "2": "Directly show result (no animation)" - } + "2": "Directly show result (no animation)", + }, }, "animation_interval": { "name": "Animation interval", - "description": "Set the interval between lottery animations (ms)" + "description": "Set the interval between lottery animations (ms)", }, "autoplay_count": { "name": "Autoplay count", - "description": "Set the number of times to animate" + "description": "Set the number of times to animate", }, "animation_color_theme": { "name": "Animation color theme", "description": "Set the animate/result color theme", - "combo_items": { - "0": "Disabled", - "1": "Theme color", - "2": "Fixed color" - } + "combo_items": {"0": "Disabled", "1": "Theme color", "2": "Fixed color"}, }, "result_color_theme": { "name": "Results color theme", "description": "Set the color theme of lottery results", - "combo_items": { - "0": "Disabled", - "1": "Random color", - "2": "Fixed color" - } + "combo_items": {"0": "Disabled", "1": "Random color", "2": "Fixed color"}, }, "animation_fixed_color": { "name": "Animation fixed color", - "description": "Set the animation/result color" + "description": "Set the animation/result color", }, "result_fixed_color": { "name": "Results fixed color", - "description": "Configure fixed color for lottery result display" + "description": "Configure fixed color for lottery result display", }, "lottery_image": { "name": "Show prize images", - "description": "Set whether to show prize images" + "description": "Set whether to show prize images", }, "open_lottery_image_folder": { "name": "Prize image folder", - "description": "Manage s\nprize image files. Picture file names must match prize names" + "description": "Manage s\nprize image files. Picture file names must match prize names", }, "lottery_image_settings": { "name": "Prize image settings", - "description": "Set the prize image to display in lottery results" - } + "description": "Set the prize image to display in lottery results", + }, }, } diff --git a/app/Language/modules/fair_draw.py b/app/Language/modules/fair_draw.py index 2759449d..a8209927 100644 --- a/app/Language/modules/fair_draw.py +++ b/app/Language/modules/fair_draw.py @@ -104,116 +104,108 @@ "combo_items": ["秒", "分钟", "小时"], }, }, - "EN_US": { + "EN_US": { "title": { "name": "Fair pick settings", - "description": "Fair pick function settings" + "description": "Fair pick function settings", }, "fair_draw_set": { "name": "Fair pick", - "description": "Configure fair pick algorithm related settings" + "description": "Configure fair pick algorithm related settings", }, "basic_fair_settings": { "name": "Basic fair settings", - "description": "Configure base calculation for fair pick" + "description": "Configure base calculation for fair pick", }, "weight_range_settings": { "name": "Weight range settings", - "description": "Configure base value and range of weights" + "description": "Configure base value and range of weights", }, "shield_settings": { "name": "Block after pick", - "description": "Configure block rules after picking" + "description": "Configure block rules after picking", }, "frequency_settings": { "name": "Frequency function settings", - "description": "Configure how frequency penalties are to be calculated" + "description": "Configure how frequency penalties are to be calculated", }, "balance_weight_settings": { "name": "Balanced weight settings", - "description": "Configure the weight of the balance factors" + "description": "Configure the weight of the balance factors", }, "cold_start_settings": { "name": "Cold boot settings", - "description": "Configure cold start rules for the initial phase of a new class" + "description": "Configure cold start rules for the initial phase of a new class", }, "fair_draw": { "name": "Fair pick by total pick times", - "description": "Enable to make fair pickings based on the total pick times" + "description": "Enable to make fair pickings based on the total pick times", }, "fair_draw_group": { "name": "Fair pick by group", - "description": "Enable when calculated by group participation" + "description": "Enable when calculated by group participation", }, "fair_draw_gender": { "name": "Fair pick by gender", - "description": "When enabled and calculated by gender participation" + "description": "When enabled and calculated by gender participation", }, "fair_draw_time": { "name": "Fair pick by time", - "description": "Enable to participate in fair pick by time" + "description": "Enable to participate in fair pick by time", }, "base_weight": { "name": "Base weight", - "description": "Set the base weight of each option" + "description": "Set the base weight of each option", }, "min_weight": { "name": "Minimum weight range", - "description": "Set minimum weight per option" + "description": "Set minimum weight per option", }, "max_weight": { "name": "Maximum weight range", - "description": "Set maximum weight per option" + "description": "Set maximum weight per option", }, "frequency_function": { "name": "Frequency punishment function", "description": "Select the type of compute function for frequency punishment", - "combo_items": { - "0": "Linear", - "1": "Square root", - "2": "Index" - } + "combo_items": {"0": "Linear", "1": "Square root", "2": "Index"}, }, "frequency_weight": { "name": "Frequency penalties weight", - "description": "Percentage of frequency penalties in total weight" + "description": "Percentage of frequency penalties in total weight", }, "group_weight": { "name": "Group balance weight", - "description": "Adjustment group balance as a percentage of total weight" + "description": "Adjustment group balance as a percentage of total weight", }, "gender_weight": { "name": "Gender balance weight", - "description": "Adjust the proportion of gender balance in total weight" + "description": "Adjust the proportion of gender balance in total weight", }, "time_weight": { "name": "Time factor weight", - "description": "Adjust the percentage of time factor in total weight" + "description": "Adjust the percentage of time factor in total weight", }, "cold_start_enabled": { "name": "Enable cold launch mode", - "description": "Use cold boot mode for new class or initial phase" + "description": "Use cold boot mode for new class or initial phase", }, "cold_start_rounds": { "name": "Cold boot rounds", - "description": "Sets the number of rounds in cold boot mode" + "description": "Sets the number of rounds in cold boot mode", }, "shield_enabled": { "name": "Enable block after exam", - "description": "When enabled, picked students will not be duplicated during the specified time" + "description": "When enabled, picked students will not be duplicated during the specified time", }, "shield_time": { "name": "Blocked time", - "description": "Set the time to block after picking" + "description": "Set the time to block after picking", }, "shield_time_unit": { "name": "Block time units", "description": "Select time unit for block time", - "combo_items": { - "0": "Seconds", - "1": "Minutes", - "2": "Hours" - } - } + "combo_items": {"0": "Seconds", "1": "Minutes", "2": "Hours"}, + }, }, } diff --git a/app/Language/modules/history.py b/app/Language/modules/history.py index 842237fe..edd24a24 100644 --- a/app/Language/modules/history.py +++ b/app/Language/modules/history.py @@ -3,10 +3,10 @@ "ZH_CN": { "title": {"name": "历史记录", "description": "查看和管理点名、抽奖的历史记录"} }, - "EN_US": { + "EN_US": { "title": { "name": "History", - "description": "View and manage the pick and lottery history" + "description": "View and manage the pick and lottery history", } }, } @@ -52,49 +52,49 @@ "pushbutton_name": "清除", }, }, - "EN_US": { + "EN_US": { "title": { "name": "History management", - "description": "Manage the pick and lottery history" + "description": "Manage the pick and lottery history", }, "roll_call": { "name": "Picking history", - "description": "View and manage the pick history" + "description": "View and manage the pick history", }, "lottery_history": { "name": "Lottery history", - "description": "View and manage the lottery history" + "description": "View and manage the lottery history", }, "show_roll_call_history": { "name": "Enable picking history", - "description": "Control whether pick history is enabled" + "description": "Control whether pick history is enabled", }, "select_class_name": { "name": "Select class", - "description": "Choose a class to view history" + "description": "Choose a class to view history", }, "clear_roll_call_history": { "name": "Clear pick history", "description": "Clear the pick history of the selected class", - "pushbutton_name": "Clear" + "pushbutton_name": "Clear", }, "show_lottery_history": { "name": "Enable lottery history", - "description": "Control whether lottery history is enabled" + "description": "Control whether lottery history is enabled", }, "select_pool_name": { "name": "Select pool", - "description": "Choose a class to view history" + "description": "Choose a class to view history", }, "clear_lottery_history": { "name": "Clear lottery history", "description": "Clear the lottery history of the selected pool", - "pushbutton_name": "Clear" + "pushbutton_name": "Clear", }, "select_weight": { "name": "Show weight", - "description": "Show or hide weight information in table" - } + "description": "Show or hide weight information in table", + }, }, } @@ -146,22 +146,19 @@ "description": "点名历史记录表格列标题(个人记录,包含权重)", }, }, - "EN_US": { + "EN_US": { "title": { "name": "Picking history table", - "description": "Display lists of pick history in table form" + "description": "Display lists of pick history in table form", }, "select_class_name": { "name": "Select class", - "description": "Choose a class to view history" + "description": "Choose a class to view history", }, "select_mode": { "name": "View mode", "description": "Choose how history is viewed", - "combo_items": { - "0": "All history", - "1": "View by time" - } + "combo_items": {"0": "All history", "1": "View by time"}, }, "HeaderLabels_all_not_weight": { "name": { @@ -169,9 +166,9 @@ "1": "Name", "2": "Gender", "3": "Group", - "4": "Picking times" + "4": "Picking times", }, - "description": "Picking history table title column header (excluding weight)" + "description": "Picking history table title column header (excluding weight)", }, "HeaderLabels_all_weight": { "name": { @@ -180,9 +177,9 @@ "2": "Gender", "3": "Group", "4": "Picking times", - "5": "Weight" + "5": "Weight", }, - "description": "Picking history table title column header (including weight)" + "description": "Picking history table title column header (including weight)", }, "HeaderLabels_time_not_weight": { "name": { @@ -190,9 +187,9 @@ "1": "Student ID", "2": "Name", "3": "Gender", - "4": "Group" + "4": "Group", }, - "description": "Title of the list of picking history tables (viewed by time, excluding weight)" + "description": "Title of the list of picking history tables (viewed by time, excluding weight)", }, "HeaderLabels_time_weight": { "name": { @@ -201,9 +198,9 @@ "2": "Name", "3": "Gender", "4": "Group", - "5": "Weight" + "5": "Weight", }, - "description": "Title of the list of picking history tables (viewed by time, including weight)" + "description": "Title of the list of picking history tables (viewed by time, including weight)", }, "HeaderLabels_Individual_not_weight": { "name": { @@ -211,9 +208,9 @@ "1": "Picking mode", "2": "Picking amount", "3": "Gender limit", - "4": "Group limit" + "4": "Group limit", }, - "description": "Title of the list of picking history tables (personal history, excluding weight)" + "description": "Title of the list of picking history tables (personal history, excluding weight)", }, "HeaderLabels_Individual_weight": { "name": { @@ -222,18 +219,15 @@ "2": "Picking amount", "3": "Gender limit", "4": "Group limit", - "5": "Weight" + "5": "Weight", }, - "description": "Title of the list of picking history tables (personal history, including weight)" + "description": "Title of the list of picking history tables (personal history, including weight)", }, "select_weight": { "name": "Show weight", "description": "Whether to show weight in table", - "switchbutton_name": { - "enable": "Show", - "disable": "Hide" - } - } + "switchbutton_name": {"enable": "Show", "disable": "Hide"}, + }, }, } @@ -266,49 +260,41 @@ "description": "抽奖历史记录表格列标题(单次记录)", }, }, - "EN_US": { + "EN_US": { "title": { "name": "Lottery history table", - "description": "Display lists of lottery history in table form" + "description": "Display lists of lottery history in table form", }, "select_pool_name": { "name": "Select pool", - "description": "Choose a lottery pool to view history" + "description": "Choose a lottery pool to view history", }, "select_mode": { "name": "View mode", "description": "Choose how history is viewed", - "combo_items": { - "0": "All history", - "1": "View by time" - } + "combo_items": {"0": "All history", "1": "View by time"}, }, "HeaderLabels_all_weight": { "name": { "0": "Serial", "1": "Name", "2": "Lottery winning times", - "3": "Weight" + "3": "Weight", }, - "description": "Lottery history table title column header weight (all)" + "description": "Lottery history table title column header weight (all)", }, "HeaderLabels_time_weight": { - "name": { - "0": "Lottery time", - "1": "Serial", - "2": "Name", - "3": "Weight" - }, - "description": "Lottery history table title column header weight (sort by time)" + "name": {"0": "Lottery time", "1": "Serial", "2": "Name", "3": "Weight"}, + "description": "Lottery history table title column header weight (sort by time)", }, "HeaderLabels_Individual_weight": { "name": { "0": "Lottery time", "1": "Lottery mode", "2": "Picking quantity", - "3": "Weight settings" + "3": "Weight settings", }, - "description": "Lottery history table title column header (single record)" - } + "description": "Lottery history table title column header (single record)", + }, }, } diff --git a/app/Language/modules/list_management.py b/app/Language/modules/list_management.py index c4b35a1f..75b41568 100644 --- a/app/Language/modules/list_management.py +++ b/app/Language/modules/list_management.py @@ -5,19 +5,19 @@ "roll_call_list": {"name": "点名名单", "description": "管理点名用学生名单"}, "lottery_list": {"name": "抽奖名单", "description": "管理抽奖用奖品名单"}, }, - "EN_US": { + "EN_US": { "title": { "name": "List management", - "description": "Manage the list of picking and lottery" + "description": "Manage the list of picking and lottery", }, "roll_call_list": { "name": "Picking list", - "description": "Manage list of named students" + "description": "Manage list of named students", }, "lottery_list": { "name": "Lottery list", - "description": "Manage the list of prizes" - } + "description": "Manage the list of prizes", + }, }, } @@ -42,39 +42,36 @@ "description": "将学生名单导出到文件", }, }, - "EN_US": { + "EN_US": { "title": { "name": "Picking list", - "description": "Show and manage student list" + "description": "Show and manage student list", }, "set_class_name": { "name": "Set class name", - "description": "Set current class name" + "description": "Set current class name", }, "select_class_name": { "name": "Select class", - "description": "Select a class in existing ones" + "description": "Select a class in existing ones", }, "import_student_name": { "name": "Import student name", - "description": "Import student list from file" - }, - "name_setting": { - "name": "Name settings", - "description": "Set student name" + "description": "Import student list from file", }, + "name_setting": {"name": "Name settings", "description": "Set student name"}, "gender_setting": { "name": "Gender settings", - "description": "Set student gender" + "description": "Set student gender", }, "group_setting": { "name": "Group settings", - "description": "Set group of students" + "description": "Set group of students", }, "export_student_name": { "name": "Export student list", - "description": "Export student list to file" - } + "description": "Export student list to file", + }, }, } @@ -91,14 +88,11 @@ "description": "点名表格的列标题", }, }, - "EN_US": { - "title": { - "name": "Picking table", - "description": "Show and manage name list" - }, + "EN_US": { + "title": {"name": "Picking table", "description": "Show and manage name list"}, "select_class_name": { "name": "Select class", - "description": "Select the class to show" + "description": "Select the class to show", }, "HeaderLabels": { "name": { @@ -106,10 +100,10 @@ "1": "Student ID", "2": "Name", "3": "Gender", - "4": "Group" + "4": "Group", }, - "description": "The column title of the picking table" - } + "description": "The column title of the picking table", + }, }, } @@ -133,35 +127,29 @@ "description": "将奖品名单导出到文件", }, }, - "EN_US": { - "title": { - "name": "Lottery list", - "description": "Manage prize list" - }, + "EN_US": { + "title": {"name": "Lottery list", "description": "Manage prize list"}, "set_pool_name": { "name": "Set pool name", - "description": "Set current pool name" + "description": "Set current pool name", }, "select_pool_name": { "name": "Select pool", - "description": "Select a pool in existing ones" + "description": "Select a pool in existing ones", }, "import_prize_name": { "name": "Import prize list", - "description": "Import prize list from file" - }, - "prize_setting": { - "name": "Set prize", - "description": "Set prize name" + "description": "Import prize list from file", }, + "prize_setting": {"name": "Set prize", "description": "Set prize name"}, "prize_weight_setting": { "name": "Weight settings", - "description": "Set prize weight" + "description": "Set prize weight", }, "export_prize_name": { "name": "Export prize list", - "description": "Export prize list to file" - } + "description": "Export prize list to file", + }, }, } @@ -178,24 +166,16 @@ "description": "抽奖表格的列标题", }, }, - "EN_US": { - "title": { - "name": "Lottery table", - "description": "Show and manage prize list" - }, + "EN_US": { + "title": {"name": "Lottery table", "description": "Show and manage prize list"}, "select_pool_name": { "name": "Select pool", - "description": "Select the pool to show" + "description": "Select the pool to show", }, "HeaderLabels": { - "name": { - "0": "Exist", - "1": "Serial", - "2": "Prize", - "3": "Weight" - }, - "description": "The column title of the lottery table" - } + "name": {"0": "Exist", "1": "Serial", "2": "Prize", "3": "Weight"}, + "description": "The column title of the lottery table", + }, }, } @@ -321,153 +301,153 @@ }, }, }, - "EN_US": { + "EN_US": { "roll_call": { "class_name_setting": { "title": { "name": "Class name settings", - "description": "Class name settings notification title" + "description": "Class name settings notification title", }, "content": { "name": "Class Name Settings window opened", - "description": "Class name setting notification content" - } + "description": "Class name setting notification content", + }, }, "import_student_name": { "title": { "name": "Student list import", - "description": "Student list import notification title" + "description": "Student list import notification title", }, "content": { "name": "Open student list import window", - "description": "Student list import notification content" - } + "description": "Student list import notification content", + }, }, "name_setting": { "title": { "name": "Name settings", - "description": "Name set notification title" + "description": "Name set notification title", }, "content": { "name": "Name settings window opened", - "description": "Name settings notification content" - } + "description": "Name settings notification content", + }, }, "gender_setting": { "title": { "name": "Gender settings", - "description": "Gender settings notification title" + "description": "Gender settings notification title", }, "content": { "name": "Gender settings window opened", - "description": "Gender settings notification content" - } + "description": "Gender settings notification content", + }, }, "group_setting": { "title": { "name": "Group Settings", - "description": "Group Notification Title" + "description": "Group Notification Title", }, "content": { "name": "Group settings window opened", - "description": "Group settings notification content" - } + "description": "Group settings notification content", + }, }, "export": { "title": { "success": { "name": "Export success", - "description": "Export successful notification title" + "description": "Export successful notification title", }, "failure": { "name": "Export failed", - "description": "Export Failed Notification Title" - } + "description": "Export Failed Notification Title", + }, }, "content": { "success": { "name": "Student list has been exported to: {path}", - "description": "Export successful notification content" + "description": "Export successful notification content", }, "failure": { "name": "Please select a class to export first", - "description": "Export failed notification content (no class selected)" + "description": "Export failed notification content (no class selected)", }, "error": { "name": "{message}", - "description": "Export error notification content" - } - } - } + "description": "Export error notification content", + }, + }, + }, }, "lottery": { "pool_name_setting": { "title": { "name": "Pool name settings", - "description": "Pool name settings notification title" + "description": "Pool name settings notification title", }, "content": { "name": "Pool name settings window opened", - "description": "Pool name settings notification" - } + "description": "Pool name settings notification", + }, }, "import_prize_name": { "title": { "name": "Prizes list import", - "description": "Prize list import notification title" + "description": "Prize list import notification title", }, "content": { "name": "Open prize list import window", - "description": "Prize list import notification content" - } + "description": "Prize list import notification content", + }, }, "prize_setting": { "title": { "name": "Prizes settings", - "description": "Prize settings notification title" + "description": "Prize settings notification title", }, "content": { "name": "Pool settings window opened", - "description": "Prize settings notification content" - } + "description": "Prize settings notification content", + }, }, "prize_weight_setting": { "title": { "name": "Prize weight settings", - "description": "Prizes reset notification title" + "description": "Prizes reset notification title", }, "content": { "name": "The prize weight setting window has been opened", - "description": "Prizes reset notification content" - } + "description": "Prizes reset notification content", + }, }, "export": { "title": { "success": { "name": "Export success", - "description": "Export successful notification title" + "description": "Export successful notification title", }, "failure": { "name": "Export failed", - "description": "Export Failed Notification Title" - } + "description": "Export Failed Notification Title", + }, }, "content": { "success": { "name": "Prize list has been exported to: {path}", - "description": "Export successful notification content" + "description": "Export successful notification content", }, "failure": { "name": "Please select prize pool to export first", - "description": "Export failed notification content (no pool selected)" + "description": "Export failed notification content (no pool selected)", }, "error": { "name": "{message}", - "description": "Export error notification content" - } - } - } - } + "description": "Export error notification content", + }, + }, + }, + }, }, } @@ -499,30 +479,30 @@ } }, }, - "EN_US": { + "EN_US": { "roll_call": { "export_student_list": { "caption": { "name": "Save student list", - "description": "Save student list dialog title" + "description": "Save student list dialog title", }, "filter": { "name": "Excel files (*.xlsx);;CSV files (*.csv);;TXT files (name only) (*.txt)", - "description": "Save student list dialog filter" - } + "description": "Save student list dialog filter", + }, } }, "lottery": { "export_prize_name": { "caption": { "name": "Save prize list", - "description": "Save prize list dialog title" + "description": "Save prize list dialog title", }, "filter": { "name": "Excel files (*.xlsx);;CSV files (*.csv);;TXT files (only prizes) (*.txt)", - "description": "Save prize list dialog filter" - } + "description": "Save prize list dialog filter", + }, } - } + }, }, } diff --git a/app/Language/modules/lottery_list.py b/app/Language/modules/lottery_list.py index 1d16e674..c77b67dd 100644 --- a/app/Language/modules/lottery_list.py +++ b/app/Language/modules/lottery_list.py @@ -106,147 +106,132 @@ "description": "多个奖池消失提示内容", }, }, - "EN_US": { + "EN_US": { "title": { "name": "Pool name settings", - "description": "Set the pool name window title" + "description": "Set the pool name window title", }, "description": { "name": "In this window, you can set up the pool name\nto enter a pool name per line, and the system will store it in\n\nto enter only one pool name per line, e.g.:\nPool I\nPool II\nPool III", - "description": "Pool name settings window description" + "description": "Pool name settings window description", }, "input_title": { "name": "List of prize names", - "description": "Pool name enter area title" + "description": "Pool name enter area title", }, "input_placeholder": { "name": "Please enter the pool name, one pool name per row", - "description": "Pool name input placeholder" - }, - "save_button": { - "name": "Save", - "description": "Button text of Save" - }, - "cancel_button": { - "name": "Cancel", - "description": "Button text of Cancel" - }, - "error_title": { - "name": "Error", - "description": "Message title of Error" - }, - "success_title": { - "name": "Success", - "description": "Message title of Success" - }, - "info_title": { - "name": "Prompt", - "description": "Message title of Info" + "description": "Pool name input placeholder", }, + "save_button": {"name": "Save", "description": "Button text of Save"}, + "cancel_button": {"name": "Cancel", "description": "Button text of Cancel"}, + "error_title": {"name": "Error", "description": "Message title of Error"}, + "success_title": {"name": "Success", "description": "Message title of Success"}, + "info_title": {"name": "Prompt", "description": "Message title of Info"}, "no_prize_names_error": { "name": "Please enter at least one pool name", - "description": "Error hint when the pool name is not entered" + "description": "Error hint when the pool name is not entered", }, "invalid_names_error": { "name": "The following pool names include invalid characters or reserved words: {names}", - "description": "Error hint when prize name validation failed" + "description": "Error hint when prize name validation failed", }, "save_error": { "name": "Failed to save pool name", - "description": "Error hint when saving pool name" + "description": "Error hint when saving pool name", }, "success_message": { "name": "Succeed creating {count} prize pools", - "description": "Alert message when creating prize pool successfully" + "description": "Alert message when creating prize pool successfully", }, "no_new_prizes_message": { "name": "All pool names already exist, no new pool has been created", - "description": "Tips when not created a new pool" + "description": "Tips when not created a new pool", }, "unsaved_changes_title": { "name": "Unsaved changes", - "description": "Change dialog title is not saved" + "description": "Change dialog title is not saved", }, "unsaved_changes_message": { "name": "You have unsaved changes. Are you sure you want to close the window?", - "description": "Change dialog content not saved" + "description": "Change dialog content not saved", }, "discard_button": { "name": "Discard changes", - "description": "Discard change button text" + "description": "Discard change button text", }, "continue_editing_button": { "name": "Keep editing", - "description": "Continue editing button text" + "description": "Continue editing button text", }, "delete_prize_title": { "name": "Delete pool", - "description": "Delete pool dialog title" + "description": "Delete pool dialog title", }, "delete_prize_message": { "name": "Are you sure to delete the pool '{prize_name}'? This will delete all data of this pool and can NOT be restored", - "description": "Delete pool confirmation dialog" + "description": "Delete pool confirmation dialog", }, "delete_prize_button": { "name": "Delete pool", - "description": "Delete hole button text" + "description": "Delete hole button text", }, "delete_multiple_prizes_title": { "name": "Delete multiple pool", - "description": "Delete multiple pool dialog title" + "description": "Delete multiple pool dialog title", }, "delete_multiple_prizes_message": { "name": "Are you sure to delete the following {count} pools? This will delete all data of these pools and can NOT be restored\n\n{prize_names}", - "description": "Delete multiple pool confirmation dialog content" + "description": "Delete multiple pool confirmation dialog content", }, "delete_success_title": { "name": "Delete success", - "description": "Delete successful notification title" + "description": "Delete successful notification title", }, "delete_success_message": { "name": "Succeed deleting {count} prize pools", - "description": "Delete successful notifications" + "description": "Delete successful notifications", }, "delete_cancel_button": { "name": "Cancel delete", - "description": "Cancel button text" + "description": "Cancel button text", }, "no_deletable_prizes": { "name": "No pool to delete", - "description": "Tips when no prize pool can be deleted" + "description": "Tips when no prize pool can be deleted", }, "select_prize_to_delete": { "name": "Please select a pool to delete", - "description": "Hint to select the prize pool to delete" + "description": "Hint to select the prize pool to delete", }, "select_prize_dialog_title": { "name": "Select the pool to delete", - "description": "Select to delete the pool dialog title" + "description": "Select to delete the pool dialog title", }, "select_prize_dialog_message": { "name": "Please select the prize pool to delete:", - "description": "Select to delete the pool dialog" + "description": "Select to delete the pool dialog", }, "delete_selected_button": { "name": "Delete selected", - "description": "Delete selected button text" + "description": "Delete selected button text", }, "delete_prize_error": { "name": "Failed to delete prize pool: {error}", - "description": "Failed to delete pool error" + "description": "Failed to delete pool error", }, "prize_disappeared_title": { "name": "Prizes lost hint", - "description": "Pool missing hint title" + "description": "Pool missing hint title", }, "prize_disappeared_message": { "name": "Detected that the pool '{prize_name}' have been removed from the input box. Please save your changes to permanently delete it", - "description": "Dismiss prompt content for individual prizes" + "description": "Dismiss prompt content for individual prizes", }, "multiple_prizes_disappeared_message": { "name": "Detected that the following {count} prize pools have been removed from the input box. Please save your changes to permanently delete them:\n{prize_names}", - "description": "Multiple pool disappear tips" - } + "description": "Multiple pool disappear tips", + }, }, } @@ -379,171 +364,153 @@ "description": "取消导入选项", }, }, - "EN_US": { + "EN_US": { "title": { "name": "Import pool name", - "description": "Import pool name from Excel or CSV file" + "description": "Import pool name from Excel or CSV file", }, "initial_subtitle": { "name": "Importing to:", - "description": "Importing to the prize pool tips" + "description": "Importing to the prize pool tips", }, "file_selection_title": { "name": "File select", - "description": "File selection area title" + "description": "File selection area title", }, "no_file_selected": { "name": "No file selected", - "description": "Hint text when no file is selected" + "description": "Hint text when no file is selected", }, "select_file": { "name": "File select", - "description": "Select file button text" + "description": "Select file button text", }, "supported_formats": { "name": "Supported formats: Excel (.xlsx, .xls) and CSV (.csv)", - "description": "Supported file format description" + "description": "Supported file format description", }, "file_filter": { "name": "Excel files (*.xlsx *.xls);;CSV files (*.csv)", - "description": "File selection dialog filters" + "description": "File selection dialog filters", }, "dialog_title": { "name": "File select", - "description": "File selection dialog title" + "description": "File selection dialog title", }, "column_mapping_title": { "name": "Column mapping", - "description": "Column map area title" + "description": "Column map area title", }, "column_mapping_description": { "name": "Please select a column containing the pool information", - "description": "Column map area description" + "description": "Column map area description", }, "column_mapping_id_column": { "name": "Serial column (required):", - "description": "Serial Number Label" + "description": "Serial Number Label", }, "column_mapping_name_column": { "name": "Pool name column (required):", - "description": "Label of Pool name list" + "description": "Label of Pool name list", }, "column_mapping_weight_column": { "name": "Weight column (optional):", - "description": "Column label of Weight" - }, - "column_mapping_none": { - "name": "None", - "description": "Text of None" + "description": "Column label of Weight", }, + "column_mapping_none": {"name": "None", "description": "Text of None"}, "data_preview_title": { "name": "Data preview", - "description": "Preview area title" - }, - "prize_id": { - "name": "Serial", - "description": "Serial Number Title" - }, - "prize_name": { - "name": "Pool name", - "description": "Title of Pool name list" - }, - "weight": { - "name": "Weight", - "description": "Column title of Weight" - }, - "buttons_import": { - "name": "Import", - "description": "Button text of Import" + "description": "Preview area title", }, + "prize_id": {"name": "Serial", "description": "Serial Number Title"}, + "prize_name": {"name": "Pool name", "description": "Title of Pool name list"}, + "weight": {"name": "Weight", "description": "Column title of Weight"}, + "buttons_import": {"name": "Import", "description": "Button text of Import"}, "file_loaded_title": { "name": "File loaded", - "description": "File loaded successfully dialog title" + "description": "File loaded successfully dialog title", }, "file_loaded_content": { "name": "Files loaded successfully", - "description": "File loaded successfully dialog content" + "description": "File loaded successfully dialog content", }, "file_loaded_notification_title": { "name": "Files loaded successfully", - "description": "File loaded with successful notification header" + "description": "File loaded with successful notification header", }, "file_loaded_notification_content": { "name": "File successfully loaded, please check data preview", - "description": "File loaded with successful notifications" - }, - "error_title": { - "name": "Error", - "description": "Dialog title of Error" + "description": "File loaded with successful notifications", }, + "error_title": {"name": "Error", "description": "Dialog title of Error"}, "load_failed": { "name": "Failed to load files", - "description": "Failed to load file error" + "description": "Failed to load file error", }, "load_failed_notification_title": { "name": "Failed to load files", - "description": "Failed to load file notification title" + "description": "Failed to load file notification title", }, "load_failed_notification_content": { "name": "Could not load file. Please check file format and content", - "description": "Failed to load notification content" + "description": "Failed to load notification content", }, "import_failed": { "name": "Failed to import data", - "description": "Error importing data" + "description": "Error importing data", }, "import_failed_notification_title": { "name": "Failed to import data", - "description": "Failed to import data notification title" + "description": "Failed to import data notification title", }, "import_failed_notification_content": { "name": "Error importing data, please check data format and content", - "description": "Failed to import data content" + "description": "Failed to import data content", }, "unsupported_format": { "name": "Unsupported file format", - "description": "Unsupported file format error" + "description": "Unsupported file format error", }, "no_name_column": { "name": "Please select a pool name column", - "description": "List of prize names not selected" + "description": "List of prize names not selected", }, "no_id_column": { "name": "Please select serial number column", - "description": "Error: No serial number column selected" + "description": "Error: No serial number column selected", }, "import_success_title": { "name": "Import success", - "description": "Import successful dialog title" + "description": "Import successful dialog title", }, "import_success_content_template": { "name": "Succeed importing {count} prizes to pool '{prize_name}'", - "description": "Import successful dialog content template" + "description": "Import successful dialog content template", }, "import_success_notification_title": { "name": "Import success", - "description": "Import successful notification title" + "description": "Import successful notification title", }, "import_success_notification_content_template": { "name": "Succeed importing {count} prizes to pool '{prize_name}'", - "description": "Import successful notification content template" + "description": "Import successful notification content template", }, "existing_data_title": { "name": "Pool already has data", - "description": "Holds already have data dialog title" + "description": "Holds already have data dialog title", }, "existing_data_prompt": { "name": "Pool '{prize_name}' has already contained {count} prizes, please select handling method:", - "description": "Pool already has data dialog tip text" + "description": "Pool already has data dialog tip text", }, "existing_data_option_overwrite": { "name": "Overwrite existing data", - "description": "Overwrite existing data options" + "description": "Overwrite existing data options", }, "existing_data_option_cancel": { "name": "Cancel import", - "description": "Option of Cancel import" - } + "description": "Option of Cancel import", + }, }, } @@ -660,143 +627,125 @@ "description": "删除奖品名称提示内容", }, }, - "EN_US": { + "EN_US": { "title": { "name": "Prize name settings", - "description": "Set the title of the prize name window" + "description": "Set the title of the prize name window", }, "description": { "name": "In this window, you can set the prize name\nto enter one prize name per line, and the system will store it in\n\nto enter only one prize name per line, e.g.:\nFirst prize\nSecond prize\nThird prize", - "description": "Prize name setting window description" + "description": "Prize name setting window description", }, "input_title": { "name": "List of prizes names", - "description": "Enter the area title of the prize name" + "description": "Enter the area title of the prize name", }, "input_placeholder": { "name": "Please enter the prize name, one prize name per row", - "description": "Prize Name Input Placeholder" - }, - "save_button": { - "name": "Save", - "description": "Button text of Save" - }, - "cancel_button": { - "name": "Cancel", - "description": "Button text of Cancel" - }, - "error_title": { - "name": "Error", - "description": "Message title of Error" - }, - "success_title": { - "name": "Success", - "description": "Message title of Success" - }, - "info_title": { - "name": "Prompt", - "description": "Message title of Info" + "description": "Prize Name Input Placeholder", }, + "save_button": {"name": "Save", "description": "Button text of Save"}, + "cancel_button": {"name": "Cancel", "description": "Button text of Cancel"}, + "error_title": {"name": "Error", "description": "Message title of Error"}, + "success_title": {"name": "Success", "description": "Message title of Success"}, + "info_title": {"name": "Prompt", "description": "Message title of Info"}, "no_names_error": { "name": "Please enter at least one prize name", - "description": "Incorrect reminder when the prize name is not entered" + "description": "Incorrect reminder when the prize name is not entered", }, "invalid_names_error": { "name": "The following prize names include invalid characters or reserved words: {names}", - "description": "Error hint when the prize name validation failed" + "description": "Error hint when the prize name validation failed", }, "save_error": { "name": "Failed to save prize name", - "description": "Error hint when saving prize name" + "description": "Error hint when saving prize name", }, "success_message": { "name": "Succeed creating {count} prize names", - "description": "Notification message when prize name is created successfully" + "description": "Notification message when prize name is created successfully", }, "no_new_names_message": { "name": "All prize names already exist, no new prize names have been created", - "description": "Notification message when no new prize name is created" + "description": "Notification message when no new prize name is created", }, "unsaved_changes_title": { "name": "Unsaved changes", - "description": "Change dialog title is not saved" + "description": "Change dialog title is not saved", }, "unsaved_changes_message": { "name": "You have unsaved changes. Are you sure you want to close the window?", - "description": "Change dialog content not saved" + "description": "Change dialog content not saved", }, "discard_button": { "name": "Discard changes", - "description": "Discard Change Button Text" + "description": "Discard Change Button Text", }, "continue_editing_button": { "name": "Keep editing", - "description": "Continue editing button text" - }, - "delete_button": { - "name": "Delete", - "description": "Button text of Delete" + "description": "Continue editing button text", }, + "delete_button": {"name": "Delete", "description": "Button text of Delete"}, "delete_name_title": { "name": "Delete prize name", - "description": "Remove Prize name dialog title" + "description": "Remove Prize name dialog title", }, "delete_name_message": { "name": "Are you sure to delete the name '{name}'? This will delete all information of this name and can NOT be restored", - "description": "Delete prize name confirmation dialog" + "description": "Delete prize name confirmation dialog", }, "delete_multiple_names_title": { "name": "Delete multiple prize names", - "description": "Delete multiple prize name dialog title" + "description": "Delete multiple prize name dialog title", }, "delete_multiple_names_message": { "name": "Are you sure to delete the following {count} prize names? This will delete all information of these prize names and can NOT be restored\n\n{names}", - "description": "Delete multiple name confirmation dialog content" + "description": "Delete multiple name confirmation dialog content", }, "delete_name_success_title": { "name": "Delete success", - "description": "Successfully deleted prize name notification title" + "description": "Successfully deleted prize name notification title", }, "delete_name_success_message": { "name": "Succeed deleting {count} prize names", - "description": "Successfully deleted prize name" + "description": "Successfully deleted prize name", }, "delete_name_cancel_button": { "name": "Cancel delete", - "description": "Cancel prize name button text" + "description": "Cancel prize name button text", }, "no_deletable_names": { "name": "There are no prizes names to delete", - "description": "Tips when no prize name can be deleted" + "description": "Tips when no prize name can be deleted", }, "select_name_to_delete": { "name": "Please select the name of the prize to delete", - "description": "Tips to choose prize name to be deleted" + "description": "Tips to choose prize name to be deleted", }, "select_name_dialog_title": { "name": "Select the name of the prize to delete", - "description": "Dialog title of tips to choose prize name to be deleted" + "description": "Dialog title of tips to choose prize name to be deleted", }, "select_name_dialog_message": { "name": "Please select the prize name to delete:", - "description": "Select item to delete the prize name dialog" + "description": "Select item to delete the prize name dialog", }, "delete_selected_names_button": { "name": "Delete selected", - "description": "Delete selected prize name button text" + "description": "Delete selected prize name button text", }, "delete_name_error": { "name": "Failed to delete prize name: {error}", - "description": "Failed to delete prize name error" + "description": "Failed to delete prize name error", }, "name_deleted_title": { "name": "Prize name deleted", - "description": "Delete prize name tip title" + "description": "Delete prize name tip title", }, "name_deleted_message": { "name": "Detected that the prize '{name}' have been removed from the input box. Please save your changes to permanently delete it", - "description": "Delete prize name hint" - } + "description": "Delete prize name hint", + }, }, } @@ -913,142 +862,124 @@ "description": "删除权重选项提示内容", }, }, - "EN_US": { + "EN_US": { "title": { "name": "Weight settings", - "description": "Set the title of the replay window" + "description": "Set the title of the replay window", }, "description": { "name": "In this window, you can set the weight of the prize\nto enter a weight per line, and the system will store it in\n\nPlease enter only one weight per line, e.g.:\n10\n20\n30", - "description": "Reset window description" + "description": "Reset window description", }, "input_title": { "name": "Weight list", - "description": "Weight input area title" + "description": "Weight input area title", }, "input_placeholder": { "name": "Please enter weight, one weight per row", - "description": "Weight input box placeholder" - }, - "save_button": { - "name": "Save", - "description": "Button text of Save" - }, - "cancel_button": { - "name": "Cancel", - "description": "Button text of Cancel" - }, - "error_title": { - "name": "Error", - "description": "Message title of Error" - }, - "success_title": { - "name": "Success", - "description": "Message title of Success" - }, - "info_title": { - "name": "Prompt", - "description": "Message title of Info" + "description": "Weight input box placeholder", }, + "save_button": {"name": "Save", "description": "Button text of Save"}, + "cancel_button": {"name": "Cancel", "description": "Button text of Cancel"}, + "error_title": {"name": "Error", "description": "Message title of Error"}, + "success_title": {"name": "Success", "description": "Message title of Success"}, + "info_title": {"name": "Prompt", "description": "Message title of Info"}, "no_genders_error": { "name": "Please enter at least one weight value", - "description": "Error hint when no weight entered" + "description": "Error hint when no weight entered", }, "invalid_weights_error": { "name": "The following weights include invalid characters or reserved words: {weights}", - "description": "Error reminders when reauthenticating failed" + "description": "Error reminders when reauthenticating failed", }, "save_error": { "name": "Failed to save weights", - "description": "Error hint when saving weights" + "description": "Error hint when saving weights", }, "success_message": { "name": "Succeed creating {count} weight options", - "description": "Notification message when weighting is created successfully" + "description": "Notification message when weighting is created successfully", }, "no_new_weights_message": { "name": "All weight options already exist, no new weight options have been created", - "description": "Tips when not created new weights" + "description": "Tips when not created new weights", }, "unsaved_changes_title": { "name": "Unsaved changes", - "description": "Change dialog title is not saved" + "description": "Change dialog title is not saved", }, "unsaved_changes_message": { "name": "You have unsaved changes. Are you sure you want to close the window?", - "description": "Change dialog content not saved" + "description": "Change dialog content not saved", }, "discard_button": { "name": "Discard changes", - "description": "Discard change button text" + "description": "Discard change button text", }, "continue_editing_button": { "name": "Keep editing", - "description": "Continue editing button text" - }, - "delete_button": { - "name": "Delete", - "description": "Button text of Delete" + "description": "Continue editing button text", }, + "delete_button": {"name": "Delete", "description": "Button text of Delete"}, "delete_weight_title": { "name": "Delete weight options", - "description": "Remove option dialog title" + "description": "Remove option dialog title", }, "delete_weight_message": { "name": "Are you sure to delete the weight option '{weight}'? This will delete all information of this weight option and can NOT be restored", - "description": "Delete permission to select confirmation dialog" + "description": "Delete permission to select confirmation dialog", }, "delete_multiple_weights_title": { "name": "Delete multiple weight options", - "description": "Delete multiple weight dialog titles" + "description": "Delete multiple weight dialog titles", }, "delete_multiple_weights_message": { "name": "Are you sure to delete the following {count} weight options? This will delete all information of these weight options and can NOT be restored\n\n{weights}", - "description": "Delete multiple weight options confirmation dialog content" + "description": "Delete multiple weight options confirmation dialog content", }, "delete_weight_success_title": { "name": "Delete success", - "description": "Successfully deleted priority option notification title" + "description": "Successfully deleted priority option notification title", }, "delete_weight_success_message": { "name": "Succeed deleting {count} weight options", - "description": "Notification of Delete the permission weight option successfully" + "description": "Notification of Delete the permission weight option successfully", }, "delete_weight_cancel_button": { "name": "Cancel delete", - "description": "Undelete weight button text" + "description": "Undelete weight button text", }, "no_deletable_weights": { "name": "There are no weight options to delete", - "description": "There are no tips to delete the weights" + "description": "There are no tips to delete the weights", }, "select_weight_to_delete": { "name": "Please select the weight option to delete", - "description": "Select a notification to delete the weight option" + "description": "Select a notification to delete the weight option", }, "select_weight_dialog_title": { "name": "Select the weight option to delete", - "description": "Select the title of the weight option dialog to delete" + "description": "Select the title of the weight option dialog to delete", }, "select_weight_dialog_message": { "name": "Please select the weight option to delete:", - "description": "Select what to delete the weight option dialog" + "description": "Select what to delete the weight option dialog", }, "delete_selected_weights_button": { "name": "Delete selected", - "description": "Delete selected weights button text" + "description": "Delete selected weights button text", }, "delete_weight_error": { "name": "Failed to delete weight option: {error}", - "description": "Failed to delete weight option error" + "description": "Failed to delete weight option error", }, "weight_deleted_title": { "name": "The weight option has been deleted", - "description": "Remove the weighted option tip header" + "description": "Remove the weighted option tip header", }, "weight_deleted_message": { "name": "Detected that the weight option '{weight}' have been removed from the input box. Please save your changes to permanently delete it", - "description": "Remove the weight selection tips" - } + "description": "Remove the weight selection tips", + }, }, } diff --git a/app/Language/modules/lottery_main.py b/app/Language/modules/lottery_main.py index 30a1f208..5aa01736 100644 --- a/app/Language/modules/lottery_main.py +++ b/app/Language/modules/lottery_main.py @@ -52,56 +52,46 @@ "text_5": "剩余组数: {remaining_count}", }, }, - "EN_US": { - "title": { - "name": "Lottery", - "description": "Lottery function" - }, + "EN_US": { + "title": {"name": "Lottery", "description": "Lottery function"}, "reset_button": { "name": "Reset", "description": "Reset lottery prize count", - "pushbutton_name": "Reset" + "pushbutton_name": "Reset", }, "start_button": { "name": "Start", "description": "Start lottery", - "pushbutton_name": "Start" + "pushbutton_name": "Start", }, "stop_button": { "name": "Stop", "description": "Stop lottery", - "pushbutton_name": "Stop" + "pushbutton_name": "Stop", }, "default_empty_item": { "name": "No list", - "description": "Default options when no list is available" + "description": "Default options when no list is available", }, "list_combobox": { "name": "Class", "description": "Select class", - "combo_items": { - "0": "No-picking students" - } + "combo_items": {"0": "No-picking students"}, }, "range_combobox": { "name": "Range", "description": "Select pick range", - "combo_items": { - "0": "Pick all students", - "1": "Pick all groups" - } + "combo_items": {"0": "Pick all students", "1": "Pick all groups"}, }, "gender_combobox": { "name": "Gender", "description": "Select gender range", - "combo_items": { - "0": "Pick all gender" - } + "combo_items": {"0": "Pick all gender"}, }, "remaining_button": { "name": "View remaining list", "description": "Show remaining list windows", - "pushbutton_name": "View remaining list" + "pushbutton_name": "View remaining list", }, "many_count_label": { "name": "Total / Remaining Prizes", @@ -111,7 +101,7 @@ "text_2": "Remain prize count: {remaining_count}", "text_3": "Total group count: {total_count} | Remain: {remaining_count}", "text_4": "Total group count: {total_count}", - "text_5": "Remain group count: {remaining_count}" - } + "text_5": "Remain group count: {remaining_count}", + }, }, } diff --git a/app/Language/modules/more_settings.py b/app/Language/modules/more_settings.py index 4616c06d..c42d34c9 100644 --- a/app/Language/modules/more_settings.py +++ b/app/Language/modules/more_settings.py @@ -3,33 +3,20 @@ "ZH_CN": { "title": {"name": "更多设置", "description": "更多功能设置"}, }, - "EN_US": { - "title": { - "name": "More settings", - "description": "More settings" - } - }, + "EN_US": {"title": {"name": "More settings", "description": "More settings"}}, } settings = { "ZH_CN": { "title": {"name": "设置", "description": "设置窗口"}, }, - "EN_US": { - "title": { - "name": "Settings", - "description": "Settings window" - } - }, + "EN_US": {"title": {"name": "Settings", "description": "Settings window"}}, } # 调试设置语言配置 -debug = {"ZH_CN": {"title": {"name": "调试设置", "description": "调试功能设置"}}, "EN_US": { - "title": { - "name": "Debug settings", - "description": "Debug settings" - } - }, +debug = { + "ZH_CN": {"title": {"name": "调试设置", "description": "调试功能设置"}}, + "EN_US": {"title": {"name": "Debug settings", "description": "Debug settings"}}, } # 关于语言配置 @@ -57,18 +44,12 @@ "copyright": {"name": "版权", "description": "SecRandom遵循GPL-3.0协议"}, "version": {"name": "版本", "description": "显示当前软件版本号"}, }, - "EN_US": { - "title": { - "name": "About", - "description": "APP about page" - }, - "github": { - "name": "GitHub", - "description": "Visit project repository" - }, + "EN_US": { + "title": {"name": "About", "description": "APP about page"}, + "github": {"name": "GitHub", "description": "Visit project repository"}, "bilibili": { "name": "Bilibili", - "description": "Visit 黎泽懿_Aionflux's Bilibili account" + "description": "Visit 黎泽懿_Aionflux's Bilibili account", }, "contributor": { "name": "Contributors", @@ -79,36 +60,24 @@ "contributor_role_4": "Creativity & Documentation", "contributor_role_5": "Creativity & Maintenance", "contributor_role_6": "Test & Documentation & Install Package Making", - "contributor_role_7": "Responsive frontend page Design and Maintenance & Documentation" - }, - "donation": { - "name": "Donate", - "description": "Buy me a coffee" + "contributor_role_7": "Responsive frontend page Design and Maintenance & Documentation", }, + "donation": {"name": "Donate", "description": "Buy me a coffee"}, "check_update": { "name": "Check for updates", - "description": "Check for updates" + "description": "Check for updates", }, "website": { "name": "SecRandom Website", - "description": "Visit SecRandom's official website" + "description": "Visit SecRandom's official website", }, "channel": { "name": "Update channel", "description": "Select SecRandom software update channel", - "combo_items": { - "0": "Official version", - "1": "Beta version" - } - }, - "copyright": { - "name": "Copyright", - "description": "SecRandom follows GPL-3.0" + "combo_items": {"0": "Official version", "1": "Beta version"}, }, - "version": { - "name": "Version", - "description": "Show current version" - } + "copyright": {"name": "Copyright", "description": "SecRandom follows GPL-3.0"}, + "version": {"name": "Version", "description": "Show current version"}, }, } diff --git a/app/Language/modules/notification_settings.py b/app/Language/modules/notification_settings.py index a008d472..9ba1ee44 100644 --- a/app/Language/modules/notification_settings.py +++ b/app/Language/modules/notification_settings.py @@ -1,10 +1,10 @@ # 通知设置语言配置 notification_settings = { "ZH_CN": {"title": {"name": "通知设置", "description": "通知功能设置"}}, - "EN_US": { + "EN_US": { "title": { "name": "Notification settings", - "description": "Notification settings" + "description": "Notification settings", } }, } @@ -17,10 +17,10 @@ "description": "通用通知结果窗口标题", } }, - "EN_US": { + "EN_US": { "notification_result": { "name": "Notice results", - "description": "Generic notification result window title" + "description": "Generic notification result window title", } }, } @@ -84,34 +84,34 @@ "description": "设置浮窗自动关闭时间(秒),设为0表示不自动关闭", }, }, - "EN_US": { + "EN_US": { "title": { "name": "Picking notification settings", - "description": "Picking notification settings" + "description": "Picking notification settings", }, "basic_settings": { "name": "Basic settings", - "description": "Configure notification display base parameters" + "description": "Configure notification display base parameters", }, "window_mode": { "name": "Window mode", - "description": "Configure generic pick notification window display method" + "description": "Configure generic pick notification window display method", }, "floating_window_mode": { "name": "Floating window mode", - "description": "Configure generic pick notification floating window behavior mode" + "description": "Configure generic pick notification floating window behavior mode", }, "call_notification_service": { "name": "Call notification service", - "description": "Call the system notification service to send the picking result when enabled" + "description": "Call the system notification service to send the picking result when enabled", }, "animation": { "name": "Animation", - "description": "Configure Pick notification window display animation effect" + "description": "Configure Pick notification window display animation effect", }, "floating_window_enabled_monitor": { "name": "Monitor select", - "description": "Select the display monitor for picking notification floating windows" + "description": "Select the display monitor for picking notification floating windows", }, "floating_window_position": { "name": "Floating window position", @@ -125,25 +125,25 @@ "5": "Top left", "6": "Top right", "7": "Bottom left", - "8": "Bottom right" - } + "8": "Bottom right", + }, }, "floating_window_horizontal_offset": { "name": "Horizontal offset", - "description": "Configure the horizontal offset (in pixels) for the pick notification floating window relative to the default position" + "description": "Configure the horizontal offset (in pixels) for the pick notification floating window relative to the default position", }, "floating_window_vertical_offset": { "name": "Vertical offset", - "description": "Configure the vertical offset (in pixels) for the pick notification floating window relative to the default position" + "description": "Configure the vertical offset (in pixels) for the pick notification floating window relative to the default position", }, "floating_window_transparency": { "name": "Transparency", - "description": "Configure pick notification floating window transparency, where a smaller value indicates higher transparency (0-100)" + "description": "Configure pick notification floating window transparency, where a smaller value indicates higher transparency (0-100)", }, "floating_window_auto_close_time": { "name": "Floating window auto-close time", - "description": "Set the time to close the floating window automatically (second), set to 0 to not close automatically" - } + "description": "Set the time to close the floating window automatically (second), set to 0 to not close automatically", + }, }, } @@ -207,30 +207,30 @@ "description": "设置浮窗自动关闭时间(秒),设为0表示不自动关闭", }, }, - "EN_US": { + "EN_US": { "title": { "name": "Quick Pick notification settings", - "description": "Configure Quick Pick result notification display method and parameters" + "description": "Configure Quick Pick result notification display method and parameters", }, "basic_settings": { "name": "Basic settings", - "description": "Configure Quick Pick notification basic display parameters" + "description": "Configure Quick Pick notification basic display parameters", }, "window_mode": { "name": "Window mode", - "description": "Configure Quick Pick notification window display method" + "description": "Configure Quick Pick notification window display method", }, "floating_window_mode": { "name": "Floating window mode", - "description": "Configure Quick Pick notification floating window behavior mode" + "description": "Configure Quick Pick notification floating window behavior mode", }, "animation": { "name": "Animation", - "description": "Configure Quick Pick notification window display animation effect" + "description": "Configure Quick Pick notification window display animation effect", }, "floating_window_enabled_monitor": { "name": "Select the display monitor for Quick Pick notifications", - "description": "Select the display monitor for Quick Pick notification floating windows" + "description": "Select the display monitor for Quick Pick notification floating windows", }, "floating_window_position": { "name": "Floating window position", @@ -244,25 +244,25 @@ "5": "Top left", "6": "Top right", "7": "Bottom left", - "8": "Bottom right" - } + "8": "Bottom right", + }, }, "floating_window_horizontal_offset": { "name": "Horizontal offset", - "description": "Configure the horizontal offset (in pixels) for the Quick Pick notification floating window relative to the default position" + "description": "Configure the horizontal offset (in pixels) for the Quick Pick notification floating window relative to the default position", }, "floating_window_vertical_offset": { "name": "Vertical offset", - "description": "Configure the vertical offset (in pixels) for the Quick Pick notification floating window relative to the default position" + "description": "Configure the vertical offset (in pixels) for the Quick Pick notification floating window relative to the default position", }, "floating_window_transparency": { "name": "Floating window transparency", - "description": "Configure Quick Pick notification floating window transparency, where a smaller value indicates higher transparency (0-100)" + "description": "Configure Quick Pick notification floating window transparency, where a smaller value indicates higher transparency (0-100)", }, "floating_window_auto_close_time": { "name": "Floating window auto-close time", - "description": "Set the time to close the floating window automatically (seconds), set to 0 to not close automatically" - } + "description": "Set the time to close the floating window automatically (seconds), set to 0 to not close automatically", + }, }, } @@ -326,30 +326,30 @@ "description": "设置浮窗自动关闭时间(秒),设为0表示不自动关闭", }, }, - "EN_US": { + "EN_US": { "title": { "name": "Instant Pick notification settings", - "description": "Configure Instant Pick result notification display method and parameters" + "description": "Configure Instant Pick result notification display method and parameters", }, "basic_settings": { "name": "Basic settings", - "description": "Configure Instant Pick notification basic display parameters" + "description": "Configure Instant Pick notification basic display parameters", }, "window_mode": { "name": "Window mode", - "description": "Configure Instant Pick notification window display method" + "description": "Configure Instant Pick notification window display method", }, "floating_window_mode": { "name": "Floating window mode", - "description": "Configure Instant Pick notification floating window behavior mode" + "description": "Configure Instant Pick notification floating window behavior mode", }, "animation": { "name": "Animation", - "description": "Configure Instant Pick notification window display animation effect" + "description": "Configure Instant Pick notification window display animation effect", }, "floating_window_enabled_monitor": { "name": "Select the display monitor for Instant Pick notification floating windows", - "description": "Select the display monitor for Instant Pick notification floating windows" + "description": "Select the display monitor for Instant Pick notification floating windows", }, "floating_window_position": { "name": "Floating window position", @@ -363,25 +363,25 @@ "5": "Top left", "6": "Top right", "7": "Bottom left", - "8": "Bottom right" - } + "8": "Bottom right", + }, }, "floating_window_horizontal_offset": { "name": "Horizontal offset", - "description": "Configure the horizontal offset (in pixels) for the Instant Pick notification floating window relative to the default position" + "description": "Configure the horizontal offset (in pixels) for the Instant Pick notification floating window relative to the default position", }, "floating_window_vertical_offset": { "name": "Vertical offset", - "description": "Configure the vertical offset (in pixels) for the Instant Pick notification floating window relative to the default position" + "description": "Configure the vertical offset (in pixels) for the Instant Pick notification floating window relative to the default position", }, "floating_window_transparency": { "name": "Floating window transparency", - "description": "Configure Instant Pick notification floating window transparency, where a smaller value indicates higher transparency (0-100)" + "description": "Configure Instant Pick notification floating window transparency, where a smaller value indicates higher transparency (0-100)", }, "floating_window_auto_close_time": { "name": "Floating window auto-close time", - "description": "Set the time to close the floating window automatically (seconds), set to 0 to not close automatically" - } + "description": "Set the time to close the floating window automatically (seconds), set to 0 to not close automatically", + }, }, } @@ -444,34 +444,31 @@ "description": "设置浮窗自动关闭时间(秒),设为0表示不自动关闭", }, }, - "EN_US": { + "EN_US": { "title": { "name": "Custom pick notification settings", - "description": "Custom pick settings" - }, - "basic_settings": { - "name": "Basic settings", - "description": "Basic settings" + "description": "Custom pick settings", }, + "basic_settings": {"name": "Basic settings", "description": "Basic settings"}, "window_mode": { "name": "Window mode", - "description": "Configure custom pick notification window display method" + "description": "Configure custom pick notification window display method", }, "floating_window_mode": { "name": "Floating window mode", - "description": "Configure custom pick notification floating window behavior mode" + "description": "Configure custom pick notification floating window behavior mode", }, "call_notification_service": { "name": "Call notification service", - "description": "Whether to call the system notification service to send custom pick results" + "description": "Whether to call the system notification service to send custom pick results", }, "animation": { "name": "Animation", - "description": "Configure custom pick notification window display animation effect" + "description": "Configure custom pick notification window display animation effect", }, "floating_window_enabled_monitor": { "name": "Select the display monitor for custom pick notifications", - "description": "Select the display monitor for custom pick notification floating windows" + "description": "Select the display monitor for custom pick notification floating windows", }, "floating_window_position": { "name": "Floating window position", @@ -485,25 +482,25 @@ "5": "Top left", "6": "Top right", "7": "Bottom left", - "8": "Bottom right" - } + "8": "Bottom right", + }, }, "floating_window_horizontal_offset": { "name": "Horizontal offset", - "description": "Configure the horizontal offset (in pixels) for the custom pick notification floating window relative to the default position" + "description": "Configure the horizontal offset (in pixels) for the custom pick notification floating window relative to the default position", }, "floating_window_vertical_offset": { "name": "Vertical offset", - "description": "Configure the vertical offset (in pixels) for the custom pick notification floating window relative to the default position" + "description": "Configure the vertical offset (in pixels) for the custom pick notification floating window relative to the default position", }, "floating_window_transparency": { "name": "Floating window transparency", - "description": "Configure custom pick notification floating window transparency, where a smaller value indicates higher transparency (0-100)" + "description": "Configure custom pick notification floating window transparency, where a smaller value indicates higher transparency (0-100)", }, "floating_window_auto_close_time": { "name": "Floating window auto-close time", - "description": "Set the time to close the floating window automatically (seconds), set to 0 to not close automatically" - } + "description": "Set the time to close the floating window automatically (seconds), set to 0 to not close automatically", + }, }, } @@ -572,34 +569,34 @@ "description": "设置浮窗自动关闭时间(秒),设为0表示不自动关闭", }, }, - "EN_US": { + "EN_US": { "title": { "name": "Lottery notification settings", - "description": "Configure lottery result notification display method and parameters" + "description": "Configure lottery result notification display method and parameters", }, "basic_settings": { "name": "Basic settings", - "description": "Configure lottery notification basic display parameters" + "description": "Configure lottery notification basic display parameters", }, "window_mode": { "name": "Window mode", - "description": "Configure lottery notification window display method" + "description": "Configure lottery notification window display method", }, "floating_window_mode": { "name": "Floating window mode", - "description": "Configure lottery notification floating window behavior mode" + "description": "Configure lottery notification floating window behavior mode", }, "call_notification_service": { "name": "Call notification service", - "description": "Whether to call the system notification service to send lottery results" + "description": "Whether to call the system notification service to send lottery results", }, "animation": { "name": "Animation", - "description": "Configure lottery notification window display animation effect" + "description": "Configure lottery notification window display animation effect", }, "floating_window_enabled_monitor": { "name": "Select the display monitor for lottery notifications", - "description": "Select the display monitor for lottery notification floating windows" + "description": "Select the display monitor for lottery notification floating windows", }, "floating_window_position": { "name": "Floating window position", @@ -613,24 +610,24 @@ "5": "Top left", "6": "Top right", "7": "Bottom left", - "8": "Bottom right" - } + "8": "Bottom right", + }, }, "floating_window_horizontal_offset": { "name": "Horizontal offset", - "description": "Configure the horizontal offset (in pixels) for the lottery notification floating window relative to the default position" + "description": "Configure the horizontal offset (in pixels) for the lottery notification floating window relative to the default position", }, "floating_window_vertical_offset": { "name": "Vertical offset", - "description": "Configure the vertical offset (in pixels) for the lottery notification floating window relative to the default position" + "description": "Configure the vertical offset (in pixels) for the lottery notification floating window relative to the default position", }, "floating_window_transparency": { "name": "Floating window transparency", - "description": "Configure lottery notification floating window transparency, where a smaller value indicates higher transparency (0-100)" + "description": "Configure lottery notification floating window transparency, where a smaller value indicates higher transparency (0-100)", }, "floating_window_auto_close_time": { "name": "Floating window auto-close time", - "description": "Set the time to close the floating window automatically (seconds), set to 0 to not close automatically" - } + "description": "Set the time to close the floating window automatically (seconds), set to 0 to not close automatically", + }, }, } diff --git a/app/Language/modules/remaining_list.py b/app/Language/modules/remaining_list.py index 697cb398..6cf54548 100644 --- a/app/Language/modules/remaining_list.py +++ b/app/Language/modules/remaining_list.py @@ -32,30 +32,30 @@ "description": "学生信息卡片的显示格式", }, }, - "EN_US": { + "EN_US": { "title": { "name": "List of students not picked", - "description": "Title of Remaining list page" + "description": "Title of Remaining list page", }, "title_with_class": { "name": "Remaining list of {class_name}", - "description": "Title of page with class name" + "description": "Title of page with class name", }, "count_label": { "name": "Remaining person: {count}", - "description": "Showing the \"Remaining person\" label text" + "description": 'Showing the "Remaining person" label text', }, "group_count_label": { "name": "Remaining group: {count}", - "description": "Showing the \"Remaining group\" label text" + "description": 'Showing the "Remaining group" label text', }, "no_students": { "name": "No students remaining", - "description": "Error hint shown on no students on list" + "description": "Error hint shown on no students on list", }, "student_info": { "name": "Student ID: {id}\nGender: {gender}\nGroup: {group}", - "description": "Student info card style" - } + "description": "Student info card style", + }, }, } diff --git a/app/Language/modules/roll_call_list.py b/app/Language/modules/roll_call_list.py index 8b077630..d7229bf3 100644 --- a/app/Language/modules/roll_call_list.py +++ b/app/Language/modules/roll_call_list.py @@ -106,147 +106,132 @@ "description": "多个班级消失提示内容", }, }, - "EN_US": { + "EN_US": { "title": { "name": "Class name settings", - "description": "Set the title of the class name window" + "description": "Set the title of the class name window", }, "description": { "name": "In this window, you can set up the class name\nto enter a class name per line, and the system will store it in\n\nto enter only one class name per line, e.g.:\nClass 1, Senior 1\nClass 2, Senior 1\nClass 3, Senior 1", - "description": "Class name settings window description" + "description": "Class name settings window description", }, "input_title": { "name": "Class name list", - "description": "Class name enter area title" + "description": "Class name enter area title", }, "input_placeholder": { "name": "Please input class names here, one class name per line", - "description": "Class name input placeholder" - }, - "save_button": { - "name": "Save", - "description": "Button text of Save" - }, - "cancel_button": { - "name": "Cancel", - "description": "Button text of Cancel" - }, - "error_title": { - "name": "Error", - "description": "Message title of Error" - }, - "success_title": { - "name": "Success", - "description": "Message title of Success" - }, - "info_title": { - "name": "Prompt", - "description": "Message title of Info" + "description": "Class name input placeholder", }, + "save_button": {"name": "Save", "description": "Button text of Save"}, + "cancel_button": {"name": "Cancel", "description": "Button text of Cancel"}, + "error_title": {"name": "Error", "description": "Message title of Error"}, + "success_title": {"name": "Success", "description": "Message title of Success"}, + "info_title": {"name": "Prompt", "description": "Message title of Info"}, "no_class_names_error": { "name": "Please enter at least one class name", - "description": "Incorrect reminder when the class name is not entered" + "description": "Incorrect reminder when the class name is not entered", }, "invalid_names_error": { "name": "The following class names include invalid characters or reserved words: {names}", - "description": "Error hint when pool validation failed" + "description": "Error hint when pool validation failed", }, "save_error": { "name": "Failed to save class name", - "description": "Incorrect reminder when the class name is saving" + "description": "Incorrect reminder when the class name is saving", }, "success_message": { "name": "Succeed creating {count} classes", - "description": "Message show when the classes saved successfully" + "description": "Message show when the classes saved successfully", }, "no_new_classes_message": { "name": "All class names already exist, no new class names have been created", - "description": "Notification message when no new class is created" + "description": "Notification message when no new class is created", }, "unsaved_changes_title": { "name": "Unsaved changes", - "description": "Dialog title of change not saved" + "description": "Dialog title of change not saved", }, "unsaved_changes_message": { "name": "You have unsaved changes. Are you sure you want to close the window?", - "description": "Dialog content of change not saved" + "description": "Dialog content of change not saved", }, "discard_button": { "name": "Discard changes", - "description": "Discard change button text" + "description": "Discard change button text", }, "continue_editing_button": { "name": "Keep editing", - "description": "Continue editing button text" + "description": "Continue editing button text", }, "delete_class_title": { "name": "Delete class", - "description": "Delete class dialog title" + "description": "Delete class dialog title", }, "delete_class_message": { "name": "Are you sure to delete the class '{class_name}'? This will delete all student data of this class and can NOT be restored", - "description": "Delete class dialog message" + "description": "Delete class dialog message", }, "delete_class_button": { "name": "Delete class", - "description": "Delete class button text" + "description": "Delete class button text", }, "delete_multiple_classes_title": { "name": "Delete multiple classes", - "description": "Delete multiple class dialog title" + "description": "Delete multiple class dialog title", }, "delete_multiple_classes_message": { "name": "Are you sure to delete the following {count} classes? This will delete all student data of these classes and can NOT be restored\n\n{class_names}", - "description": "Delete multiple class dialog message" + "description": "Delete multiple class dialog message", }, "delete_success_title": { "name": "Delete success", - "description": "Delete success notification title" + "description": "Delete success notification title", }, "delete_success_message": { "name": "Succeed deleting {count} classes", - "description": "Delete success notification content" + "description": "Delete success notification content", }, "delete_cancel_button": { "name": "Cancel delete", - "description": "Button text of cancel delete" + "description": "Button text of cancel delete", }, "no_deletable_classes": { "name": "No class to delete", - "description": "Tips when no class can be deleted" + "description": "Tips when no class can be deleted", }, "select_class_to_delete": { "name": "Please select the class to delete", - "description": "Hint to select the class to delete" + "description": "Hint to select the class to delete", }, "select_class_dialog_title": { "name": "Select class to delete", - "description": "Dialog title of tips to choose classes to be deleted" + "description": "Dialog title of tips to choose classes to be deleted", }, "select_class_dialog_message": { "name": "Please select the class to delete:", - "description": "Dialog content of tips to choose classes to be deleted" + "description": "Dialog content of tips to choose classes to be deleted", }, "delete_selected_button": { "name": "Delete selected", - "description": "Delete selected button text" + "description": "Delete selected button text", }, "delete_class_error": { "name": "Failed to delete class: {error}", - "description": "Failed to delete class error" + "description": "Failed to delete class error", }, "class_disappeared_title": { "name": "Class disappeared", - "description": "Class missing hint title" + "description": "Class missing hint title", }, "class_disappeared_message": { "name": "Detected that the class '{class_name}' have been removed from the input box. Please save your changes to permanently delete it", - "description": "Class disappear tips" + "description": "Class disappear tips", }, "multiple_classes_disappeared_message": { "name": "Detected that the following {count} classes have been removed from the input box. Please save your changes to permanently delete them:\n{class_names}", - "description": "Multiple classes disappear tips" - } + "description": "Multiple classes disappear tips", + }, }, } @@ -384,179 +369,161 @@ "description": "取消导入选项", }, }, - "EN_US": { + "EN_US": { "title": { "name": "Import student names", - "description": "Import student names from Excel or CSV file" + "description": "Import student names from Excel or CSV file", }, "initial_subtitle": { "name": "Importing to:", - "description": "Importing to class tips" + "description": "Importing to class tips", }, "file_selection_title": { "name": "File select", - "description": "File selection area title" + "description": "File selection area title", }, "no_file_selected": { "name": "No file selected", - "description": "Didn't select ant file hint text" + "description": "Didn't select ant file hint text", }, "select_file": { "name": "File select", - "description": "Select file button text" + "description": "Select file button text", }, "supported_formats": { "name": "Supported formats: Excel (.xlsx, .xls) and CSV (.csv)", - "description": "Supported file format description" + "description": "Supported file format description", }, "file_filter": { "name": "Excel files (*.xlsx *.xls);;CSV files (*.csv)", - "description": "File filter in the file selection dialog" + "description": "File filter in the file selection dialog", }, "dialog_title": { "name": "File select", - "description": "File selection dialog title" + "description": "File selection dialog title", }, "column_mapping_title": { "name": "Column mapping", - "description": "Column map area title" + "description": "Column map area title", }, "column_mapping_description": { "name": "Please select a column containing the student information", - "description": "Column map area description" + "description": "Column map area description", }, "column_mapping_id_column": { "name": "Student ID column (required):", - "description": "Column label of Student ID" + "description": "Column label of Student ID", }, "column_mapping_name_column": { "name": "Name column (required):", - "description": "Column label of name" + "description": "Column label of name", }, "column_mapping_gender_column": { "name": "Gender column (optional):", - "description": "Column label of gender" + "description": "Column label of gender", }, "column_mapping_group_column": { "name": "Group column (optional):", - "description": "Column label of group" - }, - "column_mapping_none": { - "name": "Noneh", - "description": "Text of None" + "description": "Column label of group", }, + "column_mapping_none": {"name": "Noneh", "description": "Text of None"}, "data_preview_title": { "name": "Data preview", - "description": "Preview area title" + "description": "Preview area title", }, "student_id": { "name": "Student ID", - "description": "Column title of Student ID" - }, - "name": { - "name": "Name", - "description": "Column title of Name" - }, - "gender": { - "name": "Gender", - "description": "Column title of Gender" - }, - "group": { - "name": "Group", - "description": "Column title of Group" - }, - "buttons_import": { - "name": "Import", - "description": "Button text of Import" + "description": "Column title of Student ID", }, + "name": {"name": "Name", "description": "Column title of Name"}, + "gender": {"name": "Gender", "description": "Column title of Gender"}, + "group": {"name": "Group", "description": "Column title of Group"}, + "buttons_import": {"name": "Import", "description": "Button text of Import"}, "file_loaded_title": { "name": "File loaded", - "description": "File load success dialog title" + "description": "File load success dialog title", }, "file_loaded_content": { "name": "Files loaded successfully", - "description": "File load success dialog content" + "description": "File load success dialog content", }, "file_loaded_notification_title": { "name": "Files loaded successfully", - "description": "File load success notification title" + "description": "File load success notification title", }, "file_loaded_notification_content": { "name": "File loaded successfully, please check data preview", - "description": "File load success notification content" - }, - "error_title": { - "name": "Error", - "description": "Dialog title of Error" + "description": "File load success notification content", }, + "error_title": {"name": "Error", "description": "Dialog title of Error"}, "load_failed": { "name": "Failed to load files", - "description": "Failed to load files error" + "description": "Failed to load files error", }, "load_failed_notification_title": { "name": "Failed to load files", - "description": "Filed to load files notification title" + "description": "Filed to load files notification title", }, "load_failed_notification_content": { "name": "Unable to load files, please check file format and content", - "description": "Failed to load files notification content" + "description": "Failed to load files notification content", }, "import_failed": { "name": "Failed to import data", - "description": "Failed to import data name error" + "description": "Failed to import data name error", }, "import_failed_notification_title": { "name": "Failed to import data", - "description": "Filed to load data notification title" + "description": "Filed to load data notification title", }, "import_failed_notification_content": { "name": "Error importing data, please check data format and content", - "description": "Failed to load data notification content" + "description": "Failed to load data notification content", }, "unsupported_format": { "name": "Unsupported file format", - "description": "Unsupported file format error" + "description": "Unsupported file format error", }, "no_name_column": { "name": "Please select the name column", - "description": "Error: No name column selected" + "description": "Error: No name column selected", }, "no_id_column": { "name": "Please select the Student ID column", - "description": "Error: No Student ID column selected" + "description": "Error: No Student ID column selected", }, "import_success_title": { "name": "Import success", - "description": "Import success dialog title" + "description": "Import success dialog title", }, "import_success_content_template": { "name": "Succeed importing {count} students to class '{class_name}'", - "description": "Import success dialog content template" + "description": "Import success dialog content template", }, "import_success_notification_title": { "name": "Import success", - "description": "Import successful notification title" + "description": "Import successful notification title", }, "import_success_notification_content_template": { "name": "Succeed importing {count} students to class '{class_name}'", - "description": "Import success notification content template" + "description": "Import success notification content template", }, "existing_data_title": { "name": "Class data already available", - "description": "Class data already available dialog title" + "description": "Class data already available dialog title", }, "existing_data_prompt": { "name": "Pool '{class_name}' has already contained {count} students, please select handling method:", - "description": "Class data already available dialog tip text" + "description": "Class data already available dialog tip text", }, "existing_data_option_overwrite": { "name": "Overwrite existing data", - "description": "Overwrite existing data option" + "description": "Overwrite existing data option", }, "existing_data_option_cancel": { "name": "Cancel import", - "description": "Option of Cancel import" - } + "description": "Option of Cancel import", + }, }, } @@ -664,143 +631,119 @@ "description": "删除姓名提示内容", }, }, - "EN_US": { - "title": { - "name": "Name settings", - "description": "Set name window title" - }, + "EN_US": { + "title": {"name": "Name settings", "description": "Set name window title"}, "description": { "name": "In this window, you can set up student names\nto enter a student name per line, and the system will store it in\n\nto enter only one student name per line, e.g.:\nTom\nDick\nHarry", - "description": "Name settings window description" - }, - "input_title": { - "name": "Name list", - "description": "Name input area title" + "description": "Name settings window description", }, + "input_title": {"name": "Name list", "description": "Name input area title"}, "input_placeholder": { "name": "Please input names here, one name per line", - "description": "Name input box placeholder" - }, - "save_button": { - "name": "Save", - "description": "Button text of Save" - }, - "cancel_button": { - "name": "Cancel", - "description": "Button text of Cancel" - }, - "error_title": { - "name": "Error", - "description": "Message title of Error" - }, - "success_title": { - "name": "Success", - "description": "Message title of Success" - }, - "info_title": { - "name": "Prompt", - "description": "Message title of Info" + "description": "Name input box placeholder", }, + "save_button": {"name": "Save", "description": "Button text of Save"}, + "cancel_button": {"name": "Cancel", "description": "Button text of Cancel"}, + "error_title": {"name": "Error", "description": "Message title of Error"}, + "success_title": {"name": "Success", "description": "Message title of Success"}, + "info_title": {"name": "Prompt", "description": "Message title of Info"}, "no_names_error": { "name": "Please enter at least one name", - "description": "Error hint shown on no name is input" + "description": "Error hint shown on no name is input", }, "invalid_names_error": { "name": "The following names include invalid characters or reserved words: {names}", - "description": "Error hint when name validation failed" + "description": "Error hint when name validation failed", }, "save_error": { "name": "Failed to save names", - "description": "Error hint when name saved failed" + "description": "Error hint when name saved failed", }, "success_message": { "name": "Succeed creating {count} names", - "description": "Message show when the names saved successfully" + "description": "Message show when the names saved successfully", }, "no_new_names_message": { "name": "All names already exist, no new names have been created", - "description": "Notification message when no new name is created" + "description": "Notification message when no new name is created", }, "unsaved_changes_title": { "name": "Unsaved changes", - "description": "Dialog title of change not saved" + "description": "Dialog title of change not saved", }, "unsaved_changes_message": { "name": "You have unsaved changes. Are you sure you want to close the window?", - "description": "Dialog content of change not saved" + "description": "Dialog content of change not saved", }, "discard_button": { "name": "Discard changes", - "description": "Discard change button text" + "description": "Discard change button text", }, "continue_editing_button": { "name": "Keep editing", - "description": "Continue editing button text" - }, - "delete_button": { - "name": "Delete", - "description": "Button text of Delete" + "description": "Continue editing button text", }, + "delete_button": {"name": "Delete", "description": "Button text of Delete"}, "delete_name_title": { "name": "Delete name", - "description": "Delete name dialog title" + "description": "Delete name dialog title", }, "delete_name_message": { "name": "Are you sure to delete the name '{name}'? This will delete all information of this name and can NOT be restored", - "description": "Delete name dialog message" + "description": "Delete name dialog message", }, "delete_multiple_names_title": { "name": "Delete multiple names", - "description": "Delete multiple name dialog title" + "description": "Delete multiple name dialog title", }, "delete_multiple_names_message": { "name": "Are you sure to delete the following {count} names? This will delete all information of these names and can NOT be restored\n\n{names}", - "description": "Delete multiple name dialog message" + "description": "Delete multiple name dialog message", }, "delete_name_success_title": { "name": "Delete success", - "description": "Delete name success notification title" + "description": "Delete name success notification title", }, "delete_name_success_message": { "name": "Succeed deleting {count} names", - "description": "Delete name success notification content" + "description": "Delete name success notification content", }, "delete_name_cancel_button": { "name": "Cancel delete", - "description": "Button text of cancel delete name" + "description": "Button text of cancel delete name", }, "no_deletable_names": { "name": "No name to delete", - "description": "Tips when no name can be deleted" + "description": "Tips when no name can be deleted", }, "select_name_to_delete": { "name": "Please select name to delete", - "description": "Hint to select the name to delete" + "description": "Hint to select the name to delete", }, "select_name_dialog_title": { "name": "Select names to delete", - "description": "Dialog title of tips to choose name to be deleted" + "description": "Dialog title of tips to choose name to be deleted", }, "select_name_dialog_message": { "name": "Please select the name to delete:", - "description": "Dialog content of tips to choose names to be deleted" + "description": "Dialog content of tips to choose names to be deleted", }, "delete_selected_names_button": { "name": "Delete selected", - "description": "Delete selected names button text" + "description": "Delete selected names button text", }, "delete_name_error": { "name": "Failed to delete name: {error}", - "description": "Failed to delete name error" + "description": "Failed to delete name error", }, "name_deleted_title": { "name": "Name deleted", - "description": "Delete name tip title" + "description": "Delete name tip title", }, "name_deleted_message": { "name": "Detected that the name '{name}' have been removed from the input box. Please save your changes to permanently delete it", - "description": "Delete name hint" - } + "description": "Delete name hint", + }, }, } @@ -917,143 +860,125 @@ "description": "删除性别选项提示内容", }, }, - "EN_US": { + "EN_US": { "title": { "name": "Gender settings", - "description": "Set title of Gender settings window" + "description": "Set title of Gender settings window", }, "description": { "name": "In this window, you can set up student genders\nto enter a gender per line, and the system will store it in\n\nto enter only one gender per line, e.g.:\nMale\nFemale\nNon-binary", - "description": "Gender settings window description" + "description": "Gender settings window description", }, "input_title": { "name": "Gender list", - "description": "Gender input area title" + "description": "Gender input area title", }, "input_placeholder": { "name": "Please input genders here, one gender per line", - "description": "Gender input box placeholder" - }, - "save_button": { - "name": "Save", - "description": "Save button text" - }, - "cancel_button": { - "name": "Cancel", - "description": "Button text of Cancel" - }, - "error_title": { - "name": "Error", - "description": "Message title of Error" - }, - "success_title": { - "name": "Success", - "description": "Message title of Success" - }, - "info_title": { - "name": "Prompt", - "description": "Message title of Info" + "description": "Gender input box placeholder", }, + "save_button": {"name": "Save", "description": "Save button text"}, + "cancel_button": {"name": "Cancel", "description": "Button text of Cancel"}, + "error_title": {"name": "Error", "description": "Message title of Error"}, + "success_title": {"name": "Success", "description": "Message title of Success"}, + "info_title": {"name": "Prompt", "description": "Message title of Info"}, "no_genders_error": { "name": "Please enter at least one gender", - "description": "Error hint shown on no gender is input" + "description": "Error hint shown on no gender is input", }, "invalid_genders_error": { "name": "The following genders include invalid characters or reserved words: {genders}", - "description": "Error hint when gender validation failed" + "description": "Error hint when gender validation failed", }, "save_error": { "name": "Failed to save gender option", - "description": "Error hint when gender saved failed" + "description": "Error hint when gender saved failed", }, "success_message": { "name": "Succeed creating {count} genders", - "description": "Message show when the gender settings saved successfully" + "description": "Message show when the gender settings saved successfully", }, "no_new_genders_message": { "name": "All gender options already exist, no new gender options have been created", - "description": "Notification message when no new gender is created" + "description": "Notification message when no new gender is created", }, "unsaved_changes_title": { "name": "Unsaved changes", - "description": "Dialog title of change not saved" + "description": "Dialog title of change not saved", }, "unsaved_changes_message": { "name": "You have unsaved changes. Are you sure you want to close the window?", - "description": "Dialog content of change not saved" + "description": "Dialog content of change not saved", }, "discard_button": { "name": "Discard changes", - "description": "Discard change button text" + "description": "Discard change button text", }, "continue_editing_button": { "name": "Keep editing", - "description": "Continue editing button text" - }, - "delete_button": { - "name": "Delete", - "description": "Button text of delete" + "description": "Continue editing button text", }, + "delete_button": {"name": "Delete", "description": "Button text of delete"}, "delete_gender_title": { "name": "Option of delete gender", - "description": "Delete gender option dialog title" + "description": "Delete gender option dialog title", }, "delete_gender_message": { "name": "Are you sure to delete the gender option '{gender}'? This will delete all information of this gender and can NOT be restored", - "description": "Delete gender option dialog message" + "description": "Delete gender option dialog message", }, "delete_multiple_genders_title": { "name": "Delete multiple gender option", - "description": "Delete multiple gender dialog titles" + "description": "Delete multiple gender dialog titles", }, "delete_multiple_genders_message": { "name": "Are you sure to delete the following {count} genders? This will delete all information of these genders and can NOT be restored\n\n{genders}", - "description": "Delete multiple gender dialog message" + "description": "Delete multiple gender dialog message", }, "delete_gender_success_title": { "name": "Delete success", - "description": "Delete multiple gender dialog success titles" + "description": "Delete multiple gender dialog success titles", }, "delete_gender_success_message": { "name": "Succeed deleting {count} gender options", - "description": "Notification of delete the gender option successfully" + "description": "Notification of delete the gender option successfully", }, "delete_gender_cancel_button": { "name": "Cancel delete", - "description": "Button text of cancel delete gender option" + "description": "Button text of cancel delete gender option", }, "no_deletable_genders": { "name": "Option of no gender to delete", - "description": "Tips when no gender option can be deleted" + "description": "Tips when no gender option can be deleted", }, "select_gender_to_delete": { "name": "Select gender option to delete", - "description": "Hint to select the gender option to delete" + "description": "Hint to select the gender option to delete", }, "select_gender_dialog_title": { "name": "Option of select gender to delete", - "description": "Dialog title of tips to choose gender options to be deleted" + "description": "Dialog title of tips to choose gender options to be deleted", }, "select_gender_dialog_message": { "name": "Select gender option to delete:", - "description": "Select gender option to delete dialog message" + "description": "Select gender option to delete dialog message", }, "delete_selected_genders_button": { "name": "Delete selected", - "description": "Delete selected gender button text" + "description": "Delete selected gender button text", }, "delete_gender_error": { "name": "Failed to delete gender option: {error}", - "description": "Failed to delete gender error" + "description": "Failed to delete gender error", }, "gender_deleted_title": { "name": "Gender option deleted", - "description": "Delete gender option tip title" + "description": "Delete gender option tip title", }, "gender_deleted_message": { "name": "Detected that the gender option '{gender}' have been removed from the input box. Please save your changes to permanently delete it", - "description": "Delete gender option hint" - } + "description": "Delete gender option hint", + }, }, } @@ -1170,142 +1095,121 @@ "description": "删除小组选项提示内容", }, }, - "EN_US": { + "EN_US": { "title": { "name": "Group Settings", - "description": "Group settings window title" + "description": "Group settings window title", }, "description": { "name": "In this window, you can set up the group name\nto enter a group name per line, and the system will store it in\n\nto enter only one group name per line, e.g.:\nGroup A\nGroup B\nGroup C", - "description": "Group settings window description" - }, - "input_title": { - "name": "Group list", - "description": "Group input area title" + "description": "Group settings window description", }, + "input_title": {"name": "Group list", "description": "Group input area title"}, "input_placeholder": { "name": "Please input group name, one per line. ", - "description": "Group input box placeholder" - }, - "save_button": { - "name": "Save", - "description": "Button text of Save" - }, - "cancel_button": { - "name": "Cancel", - "description": "Button text of Cancel" - }, - "error_title": { - "name": "Error", - "description": "Message title of Error" - }, - "success_title": { - "name": "Success", - "description": "Message title of Success" - }, - "info_title": { - "name": "Prompt", - "description": "Message title of Info" + "description": "Group input box placeholder", }, + "save_button": {"name": "Save", "description": "Button text of Save"}, + "cancel_button": {"name": "Cancel", "description": "Button text of Cancel"}, + "error_title": {"name": "Error", "description": "Message title of Error"}, + "success_title": {"name": "Success", "description": "Message title of Success"}, + "info_title": {"name": "Prompt", "description": "Message title of Info"}, "no_groups_error": { "name": "Please enter at least one group", - "description": "Error hint shown on no group is input" + "description": "Error hint shown on no group is input", }, "invalid_groups_error": { "name": "The following groups include invalid characters or reserved words: {groups}", - "description": "Error hint when group name validation failed" + "description": "Error hint when group name validation failed", }, "save_error": { "name": "Failed to save group option", - "description": "Error hint when group saved failed" + "description": "Error hint when group saved failed", }, "success_message": { "name": "Succeed creating {count} group options", - "description": "Message show when the group settings saved successfully" + "description": "Message show when the group settings saved successfully", }, "no_new_groups_message": { "name": "All group options already exist, no new group options have been created", - "description": "Notification message when no new group is created" + "description": "Notification message when no new group is created", }, "unsaved_changes_title": { "name": "Unsaved changes", - "description": "Dialog title of change not saved" + "description": "Dialog title of change not saved", }, "unsaved_changes_message": { "name": "You have unsaved changes. Are you sure you want to close the window?", - "description": "Dialog content of change not saved" + "description": "Dialog content of change not saved", }, "discard_button": { "name": "Discard changes", - "description": "Discard change button text" + "description": "Discard change button text", }, "continue_editing_button": { "name": "Keep editing", - "description": "Continue editing button text" - }, - "delete_button": { - "name": "Delete", - "description": "Button text of Delete" + "description": "Continue editing button text", }, + "delete_button": {"name": "Delete", "description": "Button text of Delete"}, "delete_group_title": { "name": "Option of Delete group", - "description": "Delete group option dialog title" + "description": "Delete group option dialog title", }, "delete_group_message": { "name": "Are you sure to delete the group option '{group}'? This will delete all information of this group and can NOT be restored", - "description": "Delete group dialog message" + "description": "Delete group dialog message", }, "delete_multiple_groups_title": { "name": "Delete multiple group option", - "description": "Delete multiple group option dialog title" + "description": "Delete multiple group option dialog title", }, "delete_multiple_groups_message": { "name": "Are you sure to delete the following {count} groups? This will delete all information of these groups and can NOT be restored\n\n{groups}", - "description": "Delete multiple group dialog message" + "description": "Delete multiple group dialog message", }, "delete_group_success_title": { "name": "Delete success", - "description": "Delete group dialog success titles" + "description": "Delete group dialog success titles", }, "delete_group_success_message": { "name": "Succeed deleting {count} group options", - "description": "Notification of delete the group option successfully" + "description": "Notification of delete the group option successfully", }, "delete_group_cancel_button": { "name": "Cancel delete", - "description": "Button text of cancel delete group option" + "description": "Button text of cancel delete group option", }, "no_deletable_groups": { "name": "Option of no group to delete", - "description": "Tips when no group option can be deleted" + "description": "Tips when no group option can be deleted", }, "select_group_to_delete": { "name": "Please select the group option to delete", - "description": "Hint to select the group option to delete" + "description": "Hint to select the group option to delete", }, "select_group_dialog_title": { "name": "Option of select group to delete", - "description": "Dialog title of tips to choose group options to be deleted" + "description": "Dialog title of tips to choose group options to be deleted", }, "select_group_dialog_message": { "name": "Please select the group option to delete:", - "description": "Dialog content of tips to choose group options to be deleted" + "description": "Dialog content of tips to choose group options to be deleted", }, "delete_selected_groups_button": { "name": "Delete selected", - "description": "Delete selected names button text" + "description": "Delete selected names button text", }, "delete_group_error": { "name": "Failed to delete group option: {error}", - "description": "Failed to delete prize name error" + "description": "Failed to delete prize name error", }, "group_deleted_title": { "name": "Group option deleted", - "description": "Delete group options tip title" + "description": "Delete group options tip title", }, "group_deleted_message": { "name": "Detected that the group option '{group}' have been removed from the input box. Please save your changes to permanently delete it", - "description": "Delete group options hint" - } + "description": "Delete group options hint", + }, }, } diff --git a/app/Language/modules/roll_call_main.py b/app/Language/modules/roll_call_main.py index 8c888823..c26b2a7d 100644 --- a/app/Language/modules/roll_call_main.py +++ b/app/Language/modules/roll_call_main.py @@ -47,45 +47,37 @@ "text_5": "剩余组数: {remaining_count}", }, }, - "EN_US": { - "title": { - "name": "Pick", - "description": "Pick" - }, + "EN_US": { + "title": {"name": "Pick", "description": "Pick"}, "reset_button": { "name": "Reset", "description": "Reset picking count", - "pushbutton_name": "Reset" + "pushbutton_name": "Reset", }, "start_button": { "name": "Start", "description": "Start picking", - "pushbutton_name": "Start" + "pushbutton_name": "Start", }, "stop_button": { "name": "Stop", "description": "Stop picking", - "pushbutton_name": "Stop" + "pushbutton_name": "Stop", }, "range_combobox": { "name": "Range", "description": "Select pick range", - "combo_items": { - "0": "Pick all students", - "1": "Pick all groups" - } + "combo_items": {"0": "Pick all students", "1": "Pick all groups"}, }, "gender_combobox": { "name": "Gender", "description": "Select gender range", - "combo_items": { - "0": "Pick all gender" - } + "combo_items": {"0": "Pick all gender"}, }, "remaining_button": { "name": "View remaining list", "description": "Show remaining list window", - "pushbutton_name": "View remaining list" + "pushbutton_name": "View remaining list", }, "many_count_label": { "name": "Total / Remaining", @@ -95,11 +87,11 @@ "text_2": "Remain student count: {remaining_count}", "text_3": "Total group count: {total_count} | Remain: {remaining_count}", "text_4": "Total group count: {total_count}", - "text_5": "Remain group count: {remaining_count}" + "text_5": "Remain group count: {remaining_count}", }, "default_empty_item": { "name": "No list", - "description": "Default options when no list is available" - } + "description": "Default options when no list is available", + }, }, } diff --git a/app/Language/modules/safety_settings.py b/app/Language/modules/safety_settings.py index c1a38cd6..02389266 100644 --- a/app/Language/modules/safety_settings.py +++ b/app/Language/modules/safety_settings.py @@ -1,10 +1,10 @@ # 安全设置语言配置 safety_settings = { "ZH_CN": {"title": {"name": "安全设置", "description": "配置软件安全相关设置"}}, - "EN_US": { + "EN_US": { "title": { "name": "Security settings", - "description": "Configure app safety related settings" + "description": "Configure app safety related settings", } }, } @@ -156,14 +156,14 @@ "switchbutton_name": {"enable": "", "disable": ""}, }, }, - "EN_US": { + "EN_US": { "title": { "name": "Basic security settings", - "description": "Configure basic safety verification function" + "description": "Configure basic safety verification function", }, "verification_method": { "name": "Verification method", - "description": "Configure basic safety verification method" + "description": "Configure basic safety verification method", }, "verification_process": { "name": "Verification process", @@ -176,233 +176,138 @@ "4": "Password + TOTP", "5": "Password + USB drives", "6": "TOTP + USB drives", - "7": "Password + TOTP + USB drives" - } + "7": "Password + TOTP + USB drives", + }, }, "security_operations": { "name": "Security operations", - "description": "Configure actions need basic safety verification" + "description": "Configure actions need basic safety verification", }, "safety_switch": { "name": "Safety switch", - "description": "When enabled, all safety actions require password" + "description": "When enabled, all safety actions require password", }, "set_password": { "name": "Set password", - "description": "Set safety verification password" + "description": "Set safety verification password", }, "totp_switch": { "name": "TOTP verification", - "description": "Enable to use the TOTP dynamic password in secure operations" + "description": "Enable to use the TOTP dynamic password in secure operations", }, "set_totp": { "name": "Set TOTP", - "description": "Configure TOTP one-time password verification" + "description": "Configure TOTP one-time password verification", }, "usb_switch": { "name": "USB drive verification", - "description": "Enable to use USB drive verification in secure operations" + "description": "Enable to use USB drive verification in secure operations", }, "bind_usb": { "name": "Bind USB drive", - "description": "Bind the USB drive to verify" - }, - "unbind_usb": { - "name": "Unbind USB drive", - "description": "Unbind USB drive" + "description": "Bind the USB drive to verify", }, + "unbind_usb": {"name": "Unbind USB drive", "description": "Unbind USB drive"}, "show_hide_floating_window_switch": { "name": "Show/hide float window verification", - "description": "When enabled, showing or hiding float window will need verification" + "description": "When enabled, showing or hiding float window will need verification", }, "restart_switch": { "name": "Restart Verification", - "description": "When enabled, restarting app will need verification" + "description": "When enabled, restarting app will need verification", }, "exit_switch": { "name": "Exit Verification", - "description": "When enabled, exiting app will need verification" + "description": "When enabled, exiting app will need verification", }, "password_rules": { "name": "Password requirements", - "description": "Length > 8, with at least two categories of letters, numbers, and special characters (recommended three categories)" - }, - "current_password": { - "name": "Current password" - }, - "password_input_placeholder": { - "name": "Enter password to verify" - }, - "new_password": { - "name": "New password" - }, - "confirm_password": { - "name": "Confirm new password" - }, - "password_strength_title": { - "name": "Password strength" - }, - "strength_weak": { - "name": "Weak" - }, - "strength_medium": { - "name": "Mid" - }, - "strength_strong": { - "name": "Strong" - }, - "save_button": { - "name": "Save" - }, - "cancel_button": { - "name": "Cancel" - }, - "error_current_password": { - "name": "Current password is incorrect" - }, - "error_mismatch": { - "name": "New password does not match confirmation" - }, - "error_strength_insufficient": { - "name": "Not enough password" - }, - "success_updated": { - "name": "Password updated" - }, + "description": "Length > 8, with at least two categories of letters, numbers, and special characters (recommended three categories)", + }, + "current_password": {"name": "Current password"}, + "password_input_placeholder": {"name": "Enter password to verify"}, + "new_password": {"name": "New password"}, + "confirm_password": {"name": "Confirm new password"}, + "password_strength_title": {"name": "Password strength"}, + "strength_weak": {"name": "Weak"}, + "strength_medium": {"name": "Mid"}, + "strength_strong": {"name": "Strong"}, + "save_button": {"name": "Save"}, + "cancel_button": {"name": "Cancel"}, + "error_current_password": {"name": "Current password is incorrect"}, + "error_mismatch": {"name": "New password does not match confirmation"}, + "error_strength_insufficient": {"name": "Not enough password"}, + "success_updated": {"name": "Password updated"}, "remove_password": { "name": "Remove password", - "description": "Cancel current security verification password" - }, - "remove_password_confirm_title": { - "name": "Confirm Password Removal" + "description": "Cancel current security verification password", }, + "remove_password_confirm_title": {"name": "Confirm Password Removal"}, "remove_password_confirm_content": { "name": "Removing passwords will disable secure switches, continue?" }, "remove_password_success": { "name": "Password removed and security switch closed" }, - "error_title": { - "name": "Error" - }, - "dialog_yes_text": { - "name": "OK" - }, - "dialog_cancel_text": { - "name": "Cancel" - }, - "generate_totp_secret": { - "name": "Generate key" - }, - "verify_totp_code": { - "name": "Verify verification code" - }, - "totp_input_placeholder": { - "name": "Enter TOTP verification code to verify" - }, - "totp_secret_prefix": { - "name": "Key" - }, - "totp_uri_prefix": { - "name": "URI" - }, - "totp_generated_saved": { - "name": "Generated and saved TOTP key" - }, - "totp_generated_error": { - "name": "Failed to generate TOTP" - }, - "totp_code_valid": { - "name": "Valid code" - }, - "totp_code_invalid": { - "name": "Invalid code" - }, - "totp_save_success": { - "name": "Settings saved" - }, - "totp_verify_before_save": { - "name": "Please verify the code before saving" - }, + "error_title": {"name": "Error"}, + "dialog_yes_text": {"name": "OK"}, + "dialog_cancel_text": {"name": "Cancel"}, + "generate_totp_secret": {"name": "Generate key"}, + "verify_totp_code": {"name": "Verify verification code"}, + "totp_input_placeholder": {"name": "Enter TOTP verification code to verify"}, + "totp_secret_prefix": {"name": "Key"}, + "totp_uri_prefix": {"name": "URI"}, + "totp_generated_saved": {"name": "Generated and saved TOTP key"}, + "totp_generated_error": {"name": "Failed to generate TOTP"}, + "totp_code_valid": {"name": "Valid code"}, + "totp_code_invalid": {"name": "Invalid code"}, + "totp_save_success": {"name": "Settings saved"}, + "totp_verify_before_save": {"name": "Please verify the code before saving"}, "totp_qr_unavailable": { "name": "Failed to display QR code, please install QR library" }, - "usb_refresh": { - "name": "Refresh" - }, - "usb_bind": { - "name": "Bind" - }, - "usb_unbind_all": { - "name": "Unbind All" - }, - "usb_no_removable": { - "name": "No removable disk detected" - }, - "usb_bind_success": { - "name": "USB drive binded" - }, - "usb_unbind_all_success": { - "name": "Unbound all USB drives" - }, - "usb_require_key_file": { - "name": ".key file verification required" - }, + "usb_refresh": {"name": "Refresh"}, + "usb_bind": {"name": "Bind"}, + "usb_unbind_all": {"name": "Unbind All"}, + "usb_no_removable": {"name": "No removable disk detected"}, + "usb_bind_success": {"name": "USB drive binded"}, + "usb_unbind_all_success": {"name": "Unbound all USB drives"}, + "usb_require_key_file": {"name": ".key file verification required"}, "totp_secret_generated": { "name": "Key generated, please complete validation before saving" }, - "error_set_password_first": { - "name": "Please set password first" - }, - "error_set_totp_first": { - "name": "Please set TOTP first" - }, - "error_bind_usb_first": { - "name": "Please bind to a disk first" - }, - "verify_in_progress": { - "name": "Verifying, please wait" - }, + "error_set_password_first": {"name": "Please set password first"}, + "error_set_totp_first": {"name": "Please set TOTP first"}, + "error_bind_usb_first": {"name": "Please bind to a disk first"}, + "verify_in_progress": {"name": "Verifying, please wait"}, "verify_failed_generic": { "name": "Verification not passed, please check input" }, - "usb_unbind_selected": { - "name": "Unbind selected" - }, - "usb_unbind_selected_success": { - "name": "Unbound USB drives" - }, - "usb_select_bound_hint": { - "name": "Please select a bound device" - }, - "usb_bound_devices": { - "name": "Bind device" - }, - "usb_status_connected": { - "name": "USB drive connected" - }, - "usb_status_disconnected": { - "name": "USB drive unconnected" - }, + "usb_unbind_selected": {"name": "Unbind selected"}, + "usb_unbind_selected_success": {"name": "Unbound USB drives"}, + "usb_select_bound_hint": {"name": "Please select a bound device"}, + "usb_bound_devices": {"name": "Bind device"}, + "usb_status_connected": {"name": "USB drive connected"}, + "usb_status_disconnected": {"name": "USB drive unconnected"}, "open_settings_switch": { "name": "Open settings validation", - "description": "Secure authentication is required when opening settings" + "description": "Secure authentication is required when opening settings", }, "diagnostic_export_switch": { "name": "Diagnostic data export validation", - "description": "Secure validation to export diagnostic data when enabled" + "description": "Secure validation to export diagnostic data when enabled", }, "data_export_switch": { "name": "Data export Validation", - "description": "Secure verification before all data are exported when enabled" + "description": "Secure verification before all data are exported when enabled", }, "import_overwrite_switch": { "name": "Import Overwrite Verification", - "description": "Authentication is required to overwrite existing files after import" + "description": "Authentication is required to overwrite existing files after import", }, "import_version_mismatch_switch": { "name": "Version mismatch import validation", - "description": "Authentication is required for importing versions when they do not match" - } + "description": "Authentication is required for importing versions when they do not match", + }, }, } diff --git a/app/Language/modules/sidebar_tray_management.py b/app/Language/modules/sidebar_tray_management.py index 2c11c0a2..f5698bba 100644 --- a/app/Language/modules/sidebar_tray_management.py +++ b/app/Language/modules/sidebar_tray_management.py @@ -82,35 +82,35 @@ "description": "设置浮窗贴边时箭头按钮显示的文字", }, }, - "EN_US": { + "EN_US": { "title": { "name": "Floating window management", - "description": "Configure floating window related settings" + "description": "Configure floating window related settings", }, "basic_settings": { "name": "Basic settings", - "description": "Configure floating window basic settings" + "description": "Configure floating window basic settings", }, "appearance_settings": { "name": "Appearance settings", - "description": "Configure floating window appearance settings" + "description": "Configure floating window appearance settings", }, "edge_settings": { "name": "Edge settings", - "description": "Configure floating window edge settings" + "description": "Configure floating window edge settings", }, "startup_display_floating_window": { "name": "Show popup on startup", - "description": "Set whether to show the floating window after boot" + "description": "Set whether to show the floating window after boot", }, "floating_window_opacity": { "name": "Floating window transparency", - "description": "Adjust floating window transparency" + "description": "Adjust floating window transparency", }, "reset_floating_window_position_button": { "name": "Reset floating window position", "description": "Reset floating window to default position", - "pushbutton_name": "Reset position" + "pushbutton_name": "Reset position", }, "floating_window_button_control": { "name": "Floating window controls config", @@ -131,56 +131,44 @@ "12": "Pick + Quick Pick + Lottery", "13": "Pick + Custom pick + Lottery", "14": "Quick Pick + Custom Pick + Lottery", - "15": "Pick + Quick Pick + Custom Pick + Lottery" - } + "15": "Pick + Quick Pick + Custom Pick + Lottery", + }, }, "floating_window_placement": { "name": "Floating window layout", "description": "Configure layout of buttons in floating window", - "combo_items": { - "0": "Rectangle", - "1": "Portrait", - "2": "Landscape" - } + "combo_items": {"0": "Rectangle", "1": "Portrait", "2": "Landscape"}, }, "floating_window_display_style": { "name": "Floating window style", "description": "Configure style of buttons in floating window", - "combo_items": { - "0": "Icon + Text", - "1": "Icon only", - "2": "Text only" - } + "combo_items": {"0": "Icon + Text", "1": "Icon only", "2": "Text only"}, }, "floating_window_stick_to_edge": { "name": "Edge function", - "description": "Whether to dock floating window automatically" + "description": "Whether to dock floating window automatically", }, "floating_window_stick_to_edge_recover_seconds": { "name": "Edge receipt time", - "description": "Set the automatic reception time after the floating window near side (seconds)" + "description": "Set the automatic reception time after the floating window near side (seconds)", }, "floating_window_stick_to_edge_display_style": { "name": "Edge style", "description": "Configure docked floating window style", - "combo_items": { - "0": "Icon", - "1": "Text", - "2": "Arrow" - } + "combo_items": {"0": "Icon", "1": "Text", "2": "Arrow"}, }, "floating_window_long_press_duration": { "name": "Long press time", - "description": "Set floating window long by time (milliseconds)" + "description": "Set floating window long by time (milliseconds)", }, "floating_window_draggable": { "name": "Floating window draggable", - "description": "Set if floating window is draggable" + "description": "Set if floating window is draggable", }, "floating_window_stick_to_edge_arrow_text": { "name": "Pick", - "description": "Set the text to show on arrow button when the floating window is docked" - } + "description": "Set the text to show on arrow button when the floating window is docked", + }, }, } @@ -192,10 +180,10 @@ "description": "配置侧边栏和系统托盘相关设置", } }, - "EN_US": { + "EN_US": { "title": { "name": "Sidebar/Tray management", - "description": "Configure sidebar and system tray related settings" + "description": "Configure sidebar and system tray related settings", } }, } @@ -233,56 +221,36 @@ "combo_items": ["顶部", "底部", "不显示"], }, }, - "EN_US": { + "EN_US": { "title": { "name": "Home sidebar", - "description": "Configure home sidebar related settings" + "description": "Configure home sidebar related settings", }, "roll_call_sidebar_position": { "name": "Position of Picking", "description": "Set the position of Pick in sidebar", - "combo_items": { - "0": "Top", - "1": "Bottom", - "2": "Hide" - } + "combo_items": {"0": "Top", "1": "Bottom", "2": "Hide"}, }, "custom_roll_call_sidebar_position": { "name": "Custom pick sidebar position", "description": "Set the position of Custom Pick in sidebar", - "combo_items": { - "0": "Top", - "1": "Bottom", - "2": "Hide" - } + "combo_items": {"0": "Top", "1": "Bottom", "2": "Hide"}, }, "lottery_sidebar_position": { "name": "Position of Lottery", "description": "Set the position of Lottery in sidebar", - "combo_items": { - "0": "Top", - "1": "Bottom", - "2": "Hide" - } + "combo_items": {"0": "Top", "1": "Bottom", "2": "Hide"}, }, "main_window_history": { "name": "Main window history position", "description": "Set history position in sidebar", - "combo_items": { - "0": "Top", - "1": "Bottom", - "2": "Hide" - } + "combo_items": {"0": "Top", "1": "Bottom", "2": "Hide"}, }, "settings_icon": { "name": "Set icon position", "description": "Set the position of Settings in sidebar", - "combo_items": { - "0": "Top", - "1": "Bottom", - "2": "Hide" - } - } + "combo_items": {"0": "Top", "1": "Bottom", "2": "Hide"}, + }, }, } @@ -339,100 +307,61 @@ "combo_items": ["顶部", "底部", "不显示"], }, }, - "EN_US": { + "EN_US": { "title": { "name": "Set window sidebar", - "description": "Configure set window sidebar" + "description": "Configure set window sidebar", }, "home": { "name": "Home position", "description": "Set the position of Home in sidebar", - "combo_items": { - "0": "Top", - "1": "Bottom", - "2": "Hide" - } + "combo_items": {"0": "Top", "1": "Bottom", "2": "Hide"}, }, "base_settings": { "description": "Set the position of Basic settings in sidebar", - "combo_items": { - "0": "Top", - "1": "Bottom", - "2": "Hide" - }, - "name": "Basic position settings" + "combo_items": {"0": "Top", "1": "Bottom", "2": "Hide"}, + "name": "Basic position settings", }, "name_management": { "description": "Set the position of List management in sidebar", - "combo_items": { - "0": "Top", - "1": "Bottom", - "2": "Hide" - }, - "name": "Position of List management" + "combo_items": {"0": "Top", "1": "Bottom", "2": "Hide"}, + "name": "Position of List management", }, "draw_settings": { "description": "Set the position of Picking settings in sidebar", - "combo_items": { - "0": "Top", - "1": "Bottom", - "2": "Hide" - }, - "name": "Position of Pick settings" + "combo_items": {"0": "Top", "1": "Bottom", "2": "Hide"}, + "name": "Position of Pick settings", }, "notification_service": { "description": "Set the position of Notification settings in sidebar", - "combo_items": { - "0": "Top", - "1": "Bottom", - "2": "Hide" - }, - "name": "Position of Notification settings" + "combo_items": {"0": "Top", "1": "Bottom", "2": "Hide"}, + "name": "Position of Notification settings", }, "security_settings": { "description": "Set the position of Safety settings in sidebar", - "combo_items": { - "0": "Top", - "1": "Bottom", - "2": "Hide" - }, - "name": "Position of Security settings" + "combo_items": {"0": "Top", "1": "Bottom", "2": "Hide"}, + "name": "Position of Security settings", }, "personal_settings": { "description": "Set the position of Custom settings in sidebar", - "combo_items": { - "0": "Top", - "1": "Bottom" - }, - "name": "Position of Profile settings" + "combo_items": {"0": "Top", "1": "Bottom"}, + "name": "Position of Profile settings", }, "voice_settings": { "description": "Set the position of Voice settings in sidebar", - "combo_items": { - "0": "Top", - "1": "Bottom", - "2": "Hide" - }, - "name": "Position of Voice settings" + "combo_items": {"0": "Top", "1": "Bottom", "2": "Hide"}, + "name": "Position of Voice settings", }, "settings_history": { "description": "Set history position in sidebar", - "combo_items": { - "0": "Top", - "1": "Bottom", - "2": "Hide" - }, - "name": "Set history position" + "combo_items": {"0": "Top", "1": "Bottom", "2": "Hide"}, + "name": "Set history position", }, "more_settings": { "description": "Set the position of More settings in sidebar", - "combo_items": { - "0": "Top", - "1": "Bottom", - "2": "Hide" - }, - "name": "Position of More settings" - } + "combo_items": {"0": "Top", "1": "Bottom", "2": "Hide"}, + "name": "Position of More settings", + }, }, } @@ -466,30 +395,30 @@ "switchbutton_name": {"enable": "", "disable": ""}, }, }, - "EN_US": { + "EN_US": { "title": { "name": "Tray management", - "description": "Configure system tray related settings" + "description": "Configure system tray related settings", }, "show_hide_main_window": { "name": "Show/hide main window", - "description": "Control whether main window to show or not" + "description": "Control whether main window to show or not", }, "open_settings": { "name": "Open settings window", - "description": "Control whether to show settings option in the tray menu" + "description": "Control whether to show settings option in the tray menu", }, "show_hide_float_window": { "name": "Show/hide float window", - "description": "Control whether floating window to show or not" + "description": "Control whether floating window to show or not", }, "restart": { "name": "Restart app", - "description": "Control whether to show restart option in the tray menu" + "description": "Control whether to show restart option in the tray menu", }, "exit": { "name": "Exit app", - "description": "Control whether to show exit option in the tray menu" - } + "description": "Control whether to show exit option in the tray menu", + }, }, } diff --git a/app/Language/modules/update.py b/app/Language/modules/update.py index d35c877c..87ed5040 100644 --- a/app/Language/modules/update.py +++ b/app/Language/modules/update.py @@ -57,86 +57,36 @@ "combo_items": ["github", "ghfast", "gh-proxy"], }, }, - "EN_US": { + "EN_US": { "title": { "name": "Update settings", - "description": "Check and install software updates" - }, - "secrandom_update_text": { - "name": "SecRandom update" - }, - "check_update": { - "name": "Check for updates" - }, - "latest_version": { - "name": "is up to date" - }, - "new_version_available": { - "name": "New version found" - }, - "update_progress": { - "name": "Update progress" - }, - "current_version": { - "name": "Current version" - }, - "latest_version_label": { - "name": "Latest version" - }, - "checking_update": { - "name": "Checking for updates..." - }, - "check_for_updates": { - "name": "Check for updates" - }, - "already_latest_version": { - "name": "You are up to date!" - }, - "check_update_failed": { - "name": "Failed to check for updates" - }, - "last_check_time": { - "name": "Last check update time" - }, - "downloading_update": { - "name": "Downloading updates..." - }, - "installing_update": { - "name": "Installing updates..." - }, - "update_installed_successfully": { - "name": "Update installed successfully!" - }, - "update_installed": { - "name": "Update installation successful" - }, - "install_failed": { - "name": "Installation failed" - }, - "failed_to_install_update": { - "name": "Failed to install update" - }, - "download_failed": { - "name": "Download failed" - }, - "failed_to_get_version_info": { - "name": "Failed to get version information" - }, - "failed_to_download_update": { - "name": "Failed to download update" - }, - "download_and_install": { - "name": "Download and install" - }, - "cancel_update": { - "name": "Cancel update" - }, - "update_cancelled": { - "name": "Update cancelled" - }, - "cancelling_update": { - "name": "Canceling update..." - }, + "description": "Check and install software updates", + }, + "secrandom_update_text": {"name": "SecRandom update"}, + "check_update": {"name": "Check for updates"}, + "latest_version": {"name": "is up to date"}, + "new_version_available": {"name": "New version found"}, + "update_progress": {"name": "Update progress"}, + "current_version": {"name": "Current version"}, + "latest_version_label": {"name": "Latest version"}, + "checking_update": {"name": "Checking for updates..."}, + "check_for_updates": {"name": "Check for updates"}, + "already_latest_version": {"name": "You are up to date!"}, + "check_update_failed": {"name": "Failed to check for updates"}, + "last_check_time": {"name": "Last check update time"}, + "downloading_update": {"name": "Downloading updates..."}, + "installing_update": {"name": "Installing updates..."}, + "update_installed_successfully": {"name": "Update installed successfully!"}, + "update_installed": {"name": "Update installation successful"}, + "install_failed": {"name": "Installation failed"}, + "failed_to_install_update": {"name": "Failed to install update"}, + "download_failed": {"name": "Download failed"}, + "failed_to_get_version_info": {"name": "Failed to get version information"}, + "failed_to_download_update": {"name": "Failed to download update"}, + "download_and_install": {"name": "Download and install"}, + "cancel_update": {"name": "Cancel update"}, + "update_cancelled": {"name": "Update cancelled"}, + "cancelling_update": {"name": "Canceling update..."}, "auto_update_mode": { "name": "Automatically check for updates and install", "description": "Set the auto-update mode of the app", @@ -144,8 +94,8 @@ "0": "Never update automatically", "1": "Automatically check for updates and notice", "2": "Automatically check for updates and download", - "3": "Automatically check for updates and install" - } + "3": "Automatically check for updates and install", + }, }, "update_channel": { "name": "Update channel select", @@ -153,44 +103,28 @@ "combo_items": { "0": "Stable channel", "1": "Test channel", - "2": "Publish preview channel" - } + "2": "Publish preview channel", + }, }, "update_source": { "name": "Update source selection", "description": "Select source of download for software update", - "combo_items": { - "0": "GitHub", - "1": "ghfast", - "2": "gh-proxy" - } - }, - "force_check": { - "name": "Force check for updates" + "combo_items": {"0": "GitHub", "1": "ghfast", "2": "gh-proxy"}, }, + "force_check": {"name": "Force check for updates"}, "already_downloaded_same_version": { "name": "The latest version has been downloaded" }, - "update_confirmation_title": { - "name": "Update confirmation" - }, + "update_confirmation_title": {"name": "Update confirmation"}, "update_confirmation_content": { "name": "Update has been downloaded. Install now?" }, - "yes_update_now": { - "name": "Update Now" - }, - "no_update_later": { - "name": "Update Later" - }, - "update_cancelled_by_user": { - "name": "Update cancelled" - }, - "update_notification_title": { - "name": "SecRandom update notification" - }, + "yes_update_now": {"name": "Update Now"}, + "no_update_later": {"name": "Update Later"}, + "update_cancelled_by_user": {"name": "Update cancelled"}, + "update_notification_title": {"name": "SecRandom update notification"}, "update_notification_content": { "name": "New version available:{version}\nClick to see details " - } + }, }, } diff --git a/app/Language/modules/voice_settings.py b/app/Language/modules/voice_settings.py index 945aa8d1..ef503d90 100644 --- a/app/Language/modules/voice_settings.py +++ b/app/Language/modules/voice_settings.py @@ -1,10 +1,10 @@ # 语音设置语言配置 voice_settings = { "ZH_CN": {"title": {"name": "语音设置", "description": "配置语音播报相关功能"}}, - "EN_US": { + "EN_US": { "title": { "name": "Voice settings", - "description": "Configure voice playback related functions" + "description": "Configure voice playback related functions", } }, } @@ -51,30 +51,27 @@ "description": "设置系统音量的大小", }, }, - "EN_US": { + "EN_US": { "title": { "name": "Basic voice settings", - "description": "Configure basic voice setting" + "description": "Configure basic voice setting", }, "voice_engine_group": { "name": "Voice engine", - "description": "Choose TTS engine type" + "description": "Choose TTS engine type", }, "volume_group": { "name": "Volume settings", - "description": "Adjust speech volume" + "description": "Adjust speech volume", }, "system_volume_group": { "name": "System volume control", - "description": "Select volume type to control" + "description": "Select volume type to control", }, "voice_engine": { "name": "Voice engine", "description": "Choose TTS engine", - "combo_items": { - "0": "System TTS", - "1": "Edge TTS" - } + "combo_items": {"0": "System TTS", "1": "Edge TTS"}, }, "edge_tts_voice_name": { "name": "Voice name of Edge TTS", @@ -84,8 +81,8 @@ "1": "zh-CN-YunxiNeural", "2": "zh-CN-XiaoyiNeural", "3": "en-US-JennyNeural", - "4": "en-US-GuyNeural" - } + "4": "en-US-GuyNeural", + }, }, "voice_playback": { "name": "Voice playback device", @@ -94,17 +91,11 @@ "0": "System default", "1": "Speakers", "2": "Headphones", - "3": "Bluetooth devices" - } - }, - "volume_size": { - "name": "Speech volume", - "description": "Adjust speech volume" - }, - "speech_rate": { - "name": "Speech rate", - "description": "Adjust speech rate" + "3": "Bluetooth devices", + }, }, + "volume_size": {"name": "Speech volume", "description": "Adjust speech volume"}, + "speech_rate": {"name": "Speech rate", "description": "Adjust speech rate"}, "system_volume_control": { "name": "System volume control", "description": "Select volume type to control", @@ -112,13 +103,13 @@ "0": "Main volume", "1": "App volume", "2": "System sound", - "3": "Microphone volume" - } + "3": "Microphone volume", + }, }, "system_volume_size": { "name": "System volume", - "description": "Adjust system volume" - } + "description": "Adjust system volume", + }, }, } @@ -173,69 +164,56 @@ "description": "用于TTS发音的替换名称,留空则使用默认发音", }, }, - "EN_US": { + "EN_US": { "title": { "name": "Specific speech setting", - "description": "Speech for specific results" + "description": "Speech for specific results", }, "enabled": { "name": "Enable specific speech", - "description": "Totally enable speech for specific results" - }, - "header": { - "name": "Enabled" + "description": "Totally enable speech for specific results", }, + "header": {"name": "Enabled"}, "mode": { "name": "Announcements mode", "description": "Choose a speech mode", - "combo_items": { - "0": "Picking mode", - "1": "Lottery mode" - } + "combo_items": {"0": "Picking mode", "1": "Lottery mode"}, }, "roll_call_title": { "name": "Picking mode configuration", - "description": "Configure speech on drawing mode" + "description": "Configure speech on drawing mode", }, "select_class_name": { "name": "Select a class/pool", - "description": "Choose a class or pool to manage TTS" - }, - "id_field": { - "name": "Student ID" - }, - "name_field": { - "name": "Name" + "description": "Choose a class or pool to manage TTS", }, + "id_field": {"name": "Student ID"}, + "name_field": {"name": "Name"}, "prefix_field": { "name": "Speech prefix", - "description": "Add text before speech content" + "description": "Add text before speech content", }, "suffix_field": { "name": "Speech suffix", - "description": "Add text after speech content" + "description": "Add text after speech content", }, "lottery_title": { "name": "Lottery mode configuration", - "description": "Configure speech on lottery mode" - }, - "lottery_id_field": { - "name": "Serial" - }, - "lottery_name_field": { - "name": "Name" + "description": "Configure speech on lottery mode", }, + "lottery_id_field": {"name": "Serial"}, + "lottery_name_field": {"name": "Name"}, "lottery_prefix_field": { "name": "Lottery prefix", - "description": "Add text before speech content" + "description": "Add text before speech content", }, "lottery_suffix_field": { "name": "Lottery suffix", - "description": "Add text after speech content" + "description": "Add text after speech content", }, "tts_alias": { "name": "Replacement", - "description": "Replacement names for TTS pronunciation. Leave a blank to use default pronunciation" - } + "description": "Replacement names for TTS pronunciation. Leave a blank to use default pronunciation", + }, }, }