PyBreeze 1.0.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- automation_ide/__init__.py +7 -0
- automation_ide/__main__.py +0 -0
- automation_ide/automation_editor_ui/__init__.py +0 -0
- automation_ide/automation_editor_ui/connect_gui/__init__.py +0 -0
- automation_ide/automation_editor_ui/connect_gui/ssh/__init__.py +0 -0
- automation_ide/automation_editor_ui/connect_gui/ssh/ssh_command_widget.py +246 -0
- automation_ide/automation_editor_ui/connect_gui/ssh/ssh_file_viewer_widget.py +501 -0
- automation_ide/automation_editor_ui/connect_gui/ssh/ssh_login_widget.py +67 -0
- automation_ide/automation_editor_ui/connect_gui/ssh/ssh_main_widget.py +49 -0
- automation_ide/automation_editor_ui/connect_gui/url/__init__.py +0 -0
- automation_ide/automation_editor_ui/connect_gui/url/ai_code_review_gui.py +177 -0
- automation_ide/automation_editor_ui/editor_main/__init__.py +0 -0
- automation_ide/automation_editor_ui/editor_main/main_ui.py +104 -0
- automation_ide/automation_editor_ui/extend_ai_gui/__init__.py +0 -0
- automation_ide/automation_editor_ui/extend_ai_gui/ai_gui_global_variable.py +40 -0
- automation_ide/automation_editor_ui/extend_ai_gui/code_review/__init__.py +0 -0
- automation_ide/automation_editor_ui/extend_ai_gui/code_review/code_review_thread.py +81 -0
- automation_ide/automation_editor_ui/extend_ai_gui/code_review/cot_code_review_gui.py +82 -0
- automation_ide/automation_editor_ui/extend_ai_gui/prompt_edit_gui/__init__.py +0 -0
- automation_ide/automation_editor_ui/extend_ai_gui/prompt_edit_gui/cot_code_review_prompt_templates/__init__.py +0 -0
- automation_ide/automation_editor_ui/extend_ai_gui/prompt_edit_gui/cot_code_review_prompt_templates/code_smell_detector.py +22 -0
- automation_ide/automation_editor_ui/extend_ai_gui/prompt_edit_gui/cot_code_review_prompt_templates/first_code_review.py +17 -0
- automation_ide/automation_editor_ui/extend_ai_gui/prompt_edit_gui/cot_code_review_prompt_templates/first_summary_prompt.py +17 -0
- automation_ide/automation_editor_ui/extend_ai_gui/prompt_edit_gui/cot_code_review_prompt_templates/global_rule.py +59 -0
- automation_ide/automation_editor_ui/extend_ai_gui/prompt_edit_gui/cot_code_review_prompt_templates/judge.py +91 -0
- automation_ide/automation_editor_ui/extend_ai_gui/prompt_edit_gui/cot_code_review_prompt_templates/judge_single_review.py +85 -0
- automation_ide/automation_editor_ui/extend_ai_gui/prompt_edit_gui/cot_code_review_prompt_templates/linter.py +17 -0
- automation_ide/automation_editor_ui/extend_ai_gui/prompt_edit_gui/cot_code_review_prompt_templates/step_by_step_analysis.py +35 -0
- automation_ide/automation_editor_ui/extend_ai_gui/prompt_edit_gui/cot_code_review_prompt_templates/total_summary.py +66 -0
- automation_ide/automation_editor_ui/extend_ai_gui/prompt_edit_gui/cot_prompt_editor_widget.py +136 -0
- automation_ide/automation_editor_ui/extend_ai_gui/prompt_edit_gui/skills_prompt_editor_widget.py +136 -0
- automation_ide/automation_editor_ui/extend_ai_gui/prompt_edit_gui/skills_prompt_templates/__init__.py +0 -0
- automation_ide/automation_editor_ui/extend_ai_gui/prompt_edit_gui/skills_prompt_templates/code_explainer.py +21 -0
- automation_ide/automation_editor_ui/extend_ai_gui/prompt_edit_gui/skills_prompt_templates/code_review.py +37 -0
- automation_ide/automation_editor_ui/extend_ai_gui/skills/__init__.py +0 -0
- automation_ide/automation_editor_ui/extend_ai_gui/skills/skills_send_gui.py +98 -0
- automation_ide/automation_editor_ui/extend_multi_language/__init__.py +0 -0
- automation_ide/automation_editor_ui/extend_multi_language/extend_english.py +272 -0
- automation_ide/automation_editor_ui/extend_multi_language/extend_traditional_chinese.py +272 -0
- automation_ide/automation_editor_ui/extend_multi_language/update_language_dict.py +8 -0
- automation_ide/automation_editor_ui/menu/__init__.py +0 -0
- automation_ide/automation_editor_ui/menu/automation_menu/__init__.py +0 -0
- automation_ide/automation_editor_ui/menu/automation_menu/api_testka_menu/__init__.py +0 -0
- automation_ide/automation_editor_ui/menu/automation_menu/api_testka_menu/build_api_testka_menu.py +137 -0
- automation_ide/automation_editor_ui/menu/automation_menu/auto_control_menu/__init__.py +0 -0
- automation_ide/automation_editor_ui/menu/automation_menu/auto_control_menu/build_autocontrol_menu.py +169 -0
- automation_ide/automation_editor_ui/menu/automation_menu/automation_file_menu/__init__.py +0 -0
- automation_ide/automation_editor_ui/menu/automation_menu/automation_file_menu/build_automation_file_menu.py +122 -0
- automation_ide/automation_editor_ui/menu/automation_menu/load_density_menu/__init__.py +0 -0
- automation_ide/automation_editor_ui/menu/automation_menu/load_density_menu/build_load_density_menu.py +137 -0
- automation_ide/automation_editor_ui/menu/automation_menu/mail_thunder_menu/__init__.py +0 -0
- automation_ide/automation_editor_ui/menu/automation_menu/mail_thunder_menu/build_mail_thunder_menu.py +88 -0
- automation_ide/automation_editor_ui/menu/automation_menu/test_pioneer_menu/__init__.py +0 -0
- automation_ide/automation_editor_ui/menu/automation_menu/test_pioneer_menu/build_test_pioneer_menu.py +62 -0
- automation_ide/automation_editor_ui/menu/automation_menu/web_runner_menu/__init__.py +0 -0
- automation_ide/automation_editor_ui/menu/automation_menu/web_runner_menu/build_webrunner_menu.py +119 -0
- automation_ide/automation_editor_ui/menu/build_menubar.py +47 -0
- automation_ide/automation_editor_ui/menu/install_menu/__init__.py +0 -0
- automation_ide/automation_editor_ui/menu/install_menu/automation_menu/__init__.py +0 -0
- automation_ide/automation_editor_ui/menu/install_menu/automation_menu/build_automation_install_menu.py +82 -0
- automation_ide/automation_editor_ui/menu/install_menu/install_utils.py +21 -0
- automation_ide/automation_editor_ui/menu/install_menu/tools_menu/__init__.py +0 -0
- automation_ide/automation_editor_ui/menu/install_menu/tools_menu/build_tool_install_menu.py +29 -0
- automation_ide/automation_editor_ui/menu/menu_utils.py +16 -0
- automation_ide/automation_editor_ui/menu/tools/__init__.py +0 -0
- automation_ide/automation_editor_ui/menu/tools/tools_menu.py +162 -0
- automation_ide/automation_editor_ui/show_code_window/__init__.py +0 -0
- automation_ide/automation_editor_ui/show_code_window/code_window.py +21 -0
- automation_ide/automation_editor_ui/syntax/__init__.py +0 -0
- automation_ide/automation_editor_ui/syntax/syntax_extend.py +40 -0
- automation_ide/automation_editor_ui/syntax/syntax_keyword.py +163 -0
- automation_ide/extend/__init__.py +0 -0
- automation_ide/extend/mail_thunder_extend/__init__.py +0 -0
- automation_ide/extend/mail_thunder_extend/mail_thunder_setting.py +36 -0
- automation_ide/extend/process_executor/__init__.py +0 -0
- automation_ide/extend/process_executor/api_testka/__init__.py +0 -0
- automation_ide/extend/process_executor/api_testka/api_testka_process.py +66 -0
- automation_ide/extend/process_executor/auto_control/__init__.py +0 -0
- automation_ide/extend/process_executor/auto_control/auto_control_process.py +62 -0
- automation_ide/extend/process_executor/file_automation/__init__.py +0 -0
- automation_ide/extend/process_executor/file_automation/file_automation_process.py +66 -0
- automation_ide/extend/process_executor/load_density/__init__.py +0 -0
- automation_ide/extend/process_executor/load_density/load_density_process.py +66 -0
- automation_ide/extend/process_executor/mail_thunder/__init__.py +0 -0
- automation_ide/extend/process_executor/mail_thunder/mail_thunder_process.py +16 -0
- automation_ide/extend/process_executor/process_executor_utils.py +72 -0
- automation_ide/extend/process_executor/python_task_process_manager.py +177 -0
- automation_ide/extend/process_executor/test_pioneer/__init__.py +0 -0
- automation_ide/extend/process_executor/test_pioneer/test_pioneer_process_manager.py +181 -0
- automation_ide/extend/process_executor/web_runner/__init__.py +0 -0
- automation_ide/extend/process_executor/web_runner/web_runner_process.py +66 -0
- automation_ide/utils/__init__.py +0 -0
- automation_ide/utils/exception/__init__.py +0 -0
- automation_ide/utils/exception/exception_tags.py +37 -0
- automation_ide/utils/exception/exceptions.py +50 -0
- automation_ide/utils/file_process/__init__.py +0 -0
- automation_ide/utils/file_process/get_dir_file_list.py +29 -0
- automation_ide/utils/json_format/__init__.py +1 -0
- automation_ide/utils/json_format/json_process.py +28 -0
- automation_ide/utils/logging/__init__.py +0 -0
- automation_ide/utils/logging/logger.py +50 -0
- automation_ide/utils/manager/__init__.py +0 -0
- automation_ide/utils/manager/package_manager/__init__.py +0 -0
- automation_ide/utils/manager/package_manager/package_manager_class.py +18 -0
- pybreeze-1.0.4.dist-info/METADATA +69 -0
- pybreeze-1.0.4.dist-info/RECORD +109 -0
- pybreeze-1.0.4.dist-info/WHEEL +5 -0
- pybreeze-1.0.4.dist-info/licenses/LICENSE +21 -0
- pybreeze-1.0.4.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
from je_editor import traditional_chinese_word_dict
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def update_traditional_chinese_word_dict():
|
|
5
|
+
traditional_chinese_word_dict.update(
|
|
6
|
+
{
|
|
7
|
+
# application name
|
|
8
|
+
"automation_editor_application_name": "Automation Editor",
|
|
9
|
+
# Menubar
|
|
10
|
+
"automation_menu_label": "自動化",
|
|
11
|
+
"install_menu_label": "安裝",
|
|
12
|
+
# Normal label
|
|
13
|
+
"run_label": "運行",
|
|
14
|
+
"help_label": "幫助",
|
|
15
|
+
"project_label": "專案",
|
|
16
|
+
# APITestka Menu
|
|
17
|
+
"apitestka_menu_label": "APITestka",
|
|
18
|
+
"apitestka_run_script_label": "運行 APITestka 腳本",
|
|
19
|
+
"apitestka_run_script_with_send_label": "運行 APITestka 腳本並寄信",
|
|
20
|
+
"apitestka_run_multi_script_label": "運行多個 APITestka 腳本",
|
|
21
|
+
"apitestka_run_multi_script_with_send_label": "運行多個 APITestka 腳本並寄信",
|
|
22
|
+
"apitestka_doc_label": "開啟 APITestka 文件",
|
|
23
|
+
"apitestka_doc_tab_label": "APITestka 文件",
|
|
24
|
+
"apitestka_github_label": "開啟 APITestka GitHub",
|
|
25
|
+
"apitestka_github_tab_label": "APITestka GitHub",
|
|
26
|
+
"apitestka_create_project_label": "建立 APITestka 專案",
|
|
27
|
+
# Autocontrol Menu
|
|
28
|
+
"autocontrol_menu_label": "Autocontrol",
|
|
29
|
+
"autocontrol_run_script_label": "運行 Autocontrol 腳本",
|
|
30
|
+
"autocontrol_run_script_with_send_label": "運行 Autocontrol 腳本並寄信",
|
|
31
|
+
"autocontrol_run_multi_script_label": "運行 Multi Autocontrol 腳本",
|
|
32
|
+
"autocontrol_run_multi_script_with_send_label": "運行 Multi Autocontrol 腳本 腳本並寄信",
|
|
33
|
+
"autocontrol_doc_label": "開啟 Autocontrol 文件",
|
|
34
|
+
"autocontrol_doc_tab_label": "Autocontrol 文件",
|
|
35
|
+
"autocontrol_github_label": "開啟 Autocontrol GitHub",
|
|
36
|
+
"autocontrol_github_tab_label": "Autocontrol GitHub",
|
|
37
|
+
"autocontrol_create_project_label": "建立 Autocontrol 專案",
|
|
38
|
+
"autocontrol_record_menu_label": "紀錄",
|
|
39
|
+
"autocontrol_record_start_label": "紀錄 Start",
|
|
40
|
+
"autocontrol_record_stop_label": "紀錄 Stop",
|
|
41
|
+
# File Automation Menu
|
|
42
|
+
"file_automation_menu_label": "FileAutomation",
|
|
43
|
+
"file_automation_run_script_label": "運行 FileAutomation 腳本",
|
|
44
|
+
"file_automation_run_script_with_send_label": "運行 FileAutomation 腳本並寄信",
|
|
45
|
+
"file_automation_run_multi_script_label": "運行 Multi FileAutomation 腳本",
|
|
46
|
+
"file_automation_run_multi_script_with_send_label": "運行 Multi FileAutomation 腳本 腳本並寄信",
|
|
47
|
+
"file_automation_doc_label": "開啟 FileAutomation 文件",
|
|
48
|
+
"file_automation_doc_tab_label": "FileAutomation 文件",
|
|
49
|
+
"file_automation_github_label": "開啟 FileAutomation GitHub",
|
|
50
|
+
"file_automation_github_tab_label": "FileAutomation GitHub",
|
|
51
|
+
"file_automation_create_project_label": "建立 FileAutomation 專案",
|
|
52
|
+
# Load Density Menu
|
|
53
|
+
"load_density_menu_label": "LoadDensity",
|
|
54
|
+
"load_density_run_script_label": "運行 LoadDensity 腳本",
|
|
55
|
+
"load_density_run_script_with_send_label": "運行 LoadDensity 腳本並寄信",
|
|
56
|
+
"load_density_run_multi_script_label": "運行 Multi LoadDensity 腳本",
|
|
57
|
+
"load_density_run_multi_script_with_send_label": "運行 Multi LoadDensity 腳本 腳本並寄信",
|
|
58
|
+
"load_density_doc_label": "開啟 LoadDensity 文件",
|
|
59
|
+
"load_density_doc_tab_label": "LoadDensity 文件",
|
|
60
|
+
"load_density_github_label": "開啟 LoadDensity GitHub",
|
|
61
|
+
"load_density_github_tab_label": "LoadDensity GitHub",
|
|
62
|
+
"load_density_create_project_label": "建立 LoadDensity 專案",
|
|
63
|
+
# Mail Thunder Menu
|
|
64
|
+
"mail_thunder_menu_label": "MailThunder",
|
|
65
|
+
"mail_thunder_run_script_label": "運行 MailThunder 腳本",
|
|
66
|
+
"mail_thunder_doc_label": "開啟 MailThunder 文件",
|
|
67
|
+
"mail_thunder_doc_tab_label": "MailThunder 文件",
|
|
68
|
+
"mail_thunder_github_label": "開啟 MailThunder GitHub",
|
|
69
|
+
"mail_thunder_github_tab_label": "MailThunder GitHub",
|
|
70
|
+
"mail_thunder_create_project_label": "建立 MailThunder 專案",
|
|
71
|
+
# Webrunner Menu
|
|
72
|
+
"web_runner_menu_label": "WebRunner",
|
|
73
|
+
"web_runner_run_script_label": "運行 WebRunner 腳本",
|
|
74
|
+
"web_runner_run_script_with_send_label": "運行 WebRunner 腳本並寄信",
|
|
75
|
+
"web_runner_run_multi_script_label": "運行 Multi WebRunner 腳本",
|
|
76
|
+
"web_runner_run_multi_script_with_send_label": "運行 Multi WebRunner 腳本 腳本並寄信",
|
|
77
|
+
"web_runner_doc_label": "開啟 WebRunner 文件",
|
|
78
|
+
"web_runner_doc_tab_label": "WebRunner 文件",
|
|
79
|
+
"web_runner_github_label": "開啟 WebRunner GitHub",
|
|
80
|
+
"web_runner_github_tab_label": "WebRunner GitHub",
|
|
81
|
+
"web_runner_create_project_label": "建立 WebRunner 專案",
|
|
82
|
+
# Install Menu
|
|
83
|
+
"install_menu_autocontrol": "安裝 AutoControl",
|
|
84
|
+
"install_menu_apitestka": "安裝 APITestka",
|
|
85
|
+
"install_menu_loaddensity": "安裝 LoadDensity",
|
|
86
|
+
"install_menu_webrunner": "安裝 WebRunner",
|
|
87
|
+
"install_menu_automation_file": "安裝 Automation File",
|
|
88
|
+
"install_menu_mail_thunder": "安裝 MailThunder",
|
|
89
|
+
"install_menu_tools_install_menu_label": "工具",
|
|
90
|
+
"install_menu_tools_install_build_tools": "安裝 Build Tools",
|
|
91
|
+
# Tools Menu
|
|
92
|
+
"tools_menu_re_edge_gpt_label": "ReEdgeGPT",
|
|
93
|
+
"tools_menu_re_edge_gpt_doc_label": "開啟 ReEdgeGPT 文件",
|
|
94
|
+
"tools_menu_re_edge_gpt_doc_tab_label": "ReEdgeGPT 文件",
|
|
95
|
+
"tools_menu_re_edge_gpt_github_label": "開啟 ReEdgeGPT GitHub",
|
|
96
|
+
"tools_menu_re_edge_gpt_github_tab_label": "ReEdgeGPT GitHub",
|
|
97
|
+
# Test Pioneer Menu
|
|
98
|
+
"test_pioneer_label": "TestPioneer",
|
|
99
|
+
"test_pioneer_create_template_label": "建立 TestPioneer Yaml 模板",
|
|
100
|
+
"test_pioneer_run_yaml": "執行 Test Pioneer Yaml",
|
|
101
|
+
"test_pioneer_not_choose_yaml": "請選擇 Yaml 檔案",
|
|
102
|
+
# SSH command widget
|
|
103
|
+
"ssh_command_widget_window_title_ssh_command_widget": "SSH 指令介面",
|
|
104
|
+
"ssh_command_widget_button_label_send_command": "送出",
|
|
105
|
+
"ssh_command_widget_input_placeholder_command_line": "輸入指令後按 Enter...",
|
|
106
|
+
"ssh_command_widget_dialog_title_input_error": "輸入錯誤",
|
|
107
|
+
"ssh_command_widget_dialog_message_input_error_host_user_required": "必須輸入主機與使用者名稱。",
|
|
108
|
+
"ssh_command_widget_dialog_title_key_error": "金鑰錯誤",
|
|
109
|
+
"ssh_command_widget_dialog_message_key_file_not_exist": "金鑰檔案不存在。",
|
|
110
|
+
"ssh_command_widget_error_message_unsupported_private_key": "不支援或無效的私鑰。",
|
|
111
|
+
"ssh_command_widget_error_message_key_auth_failed": "金鑰驗證失敗",
|
|
112
|
+
"ssh_command_widget_status_label_connected": "已連線",
|
|
113
|
+
"ssh_command_widget_status_label_disconnected": "已斷線",
|
|
114
|
+
"ssh_command_widget_log_message_connected": "已連線至",
|
|
115
|
+
"ssh_command_widget_log_message_error": "[錯誤]",
|
|
116
|
+
"ssh_command_widget_error_message_decode_failed": "<解碼錯誤> {error}",
|
|
117
|
+
"ssh_command_widget_log_message_channel_closed": "[通道已關閉]",
|
|
118
|
+
"ssh_command_widget_error_message_reader_failed": "讀取錯誤",
|
|
119
|
+
"ssh_command_widget_log_message_reader_closed": "讀取已關閉",
|
|
120
|
+
"ssh_command_widget_error_message_send_failed": "[傳送錯誤]",
|
|
121
|
+
"ssh_command_widget_dialog_title_not_connected": "尚未連線",
|
|
122
|
+
"ssh_command_widget_dialog_message_not_connected_shell": "SSH shell 尚未連線。",
|
|
123
|
+
"ssh_command_widget_log_message_disconnect_in_progress": "[正在斷線...]",
|
|
124
|
+
# SSH File Viewer GUI
|
|
125
|
+
"ssh_file_viewer_dialog_title_list_error": "列出錯誤",
|
|
126
|
+
"ssh_file_viewer_dialog_message_list_failed": "無法列出",
|
|
127
|
+
"ssh_file_viewer_dialog_title_operation_failed": "操作失敗",
|
|
128
|
+
"ssh_file_viewer_dialog_message_operation_failed": "錯誤",
|
|
129
|
+
"ssh_file_viewer_context_menu_action_refresh": "重新整理",
|
|
130
|
+
"ssh_file_viewer_context_menu_action_create_folder": "建立資料夾",
|
|
131
|
+
"ssh_file_viewer_context_menu_action_rename": "重新命名",
|
|
132
|
+
"ssh_file_viewer_context_menu_action_delete": "刪除",
|
|
133
|
+
"ssh_file_viewer_context_menu_action_download": "下載",
|
|
134
|
+
"ssh_file_viewer_context_menu_action_upload": "上傳至此資料夾",
|
|
135
|
+
"ssh_file_viewer_log_message_refreshing": "正在重新整理目前項目的子項(或根)",
|
|
136
|
+
"ssh_file_viewer_dialog_title_no_selection": "未選取",
|
|
137
|
+
"ssh_file_viewer_dialog_message_select_folder_to_create": "請選擇一個資料夾以建立子資料夾。",
|
|
138
|
+
"ssh_file_viewer_dialog_title_create_folder": "建立資料夾",
|
|
139
|
+
"ssh_file_viewer_dialog_label_folder_name": "資料夾名稱:",
|
|
140
|
+
"ssh_file_viewer_dialog_title_rename": "重新命名",
|
|
141
|
+
"ssh_file_viewer_dialog_label_new_name_for_item": "新名稱",
|
|
142
|
+
"ssh_file_viewer_dialog_title_confirm_delete": "確認刪除",
|
|
143
|
+
"ssh_file_viewer_dialog_message_confirm_delete": "是否刪除",
|
|
144
|
+
"ssh_file_viewer_dialog_title_invalid_selection": "選取無效",
|
|
145
|
+
"ssh_file_viewer_dialog_message_select_file_to_download": "請選擇要下載的檔案。",
|
|
146
|
+
"ssh_file_viewer_dialog_title_save_as": "另存新檔",
|
|
147
|
+
"ssh_file_viewer_dialog_title_downloaded": "已下載",
|
|
148
|
+
"ssh_file_viewer_dialog_message_saved_to": "已儲存至",
|
|
149
|
+
"ssh_file_viewer_dialog_title_select_local_file": "選擇要上傳的本地檔案",
|
|
150
|
+
"ssh_file_viewer_dialog_title_uploaded": "已上傳",
|
|
151
|
+
"ssh_file_viewer_dialog_message_uploaded_to": "已上傳至",
|
|
152
|
+
"ssh_file_viewer_dialog_label_input_text": "輸入文字",
|
|
153
|
+
"ssh_file_viewer_dialog_button_ok": "確定",
|
|
154
|
+
"ssh_file_viewer_window_title_file_tree_manager": "SSH 檔案樹狀管理器",
|
|
155
|
+
"ssh_file_viewer_tree_header_name": "名稱",
|
|
156
|
+
"ssh_file_viewer_tree_header_type": "類型",
|
|
157
|
+
"ssh_file_viewer_tree_header_size": "大小",
|
|
158
|
+
"ssh_file_viewer_tree_header_path": "路徑",
|
|
159
|
+
"ssh_file_viewer_dialog_title_missing_input": "缺少輸入",
|
|
160
|
+
"ssh_file_viewer_dialog_message_missing_input": "必須輸入主機、使用者與密碼。",
|
|
161
|
+
"ssh_file_viewer_dialog_title_connection_failed": "連線失敗",
|
|
162
|
+
"ssh_file_viewer_dialog_message_connection_failed": "連線失敗",
|
|
163
|
+
# SSH Login Widget
|
|
164
|
+
"ssh_login_widget_label_host": "主機",
|
|
165
|
+
"ssh_login_widget_label_port": "連接埠",
|
|
166
|
+
"ssh_login_widget_label_user": "使用者",
|
|
167
|
+
"ssh_login_widget_label_key": "金鑰",
|
|
168
|
+
"ssh_login_widget_label_password": "密碼",
|
|
169
|
+
"ssh_login_widget_placeholder_host": "主機 (例如: 192.168.0.10)",
|
|
170
|
+
"ssh_login_widget_placeholder_username": "使用者名稱",
|
|
171
|
+
"ssh_login_widget_placeholder_password": "密碼",
|
|
172
|
+
"ssh_login_widget_placeholder_private_key": "私鑰路徑 (.pem/.ppk)",
|
|
173
|
+
"ssh_login_widget_button_use_key_auth": "使用金鑰驗證",
|
|
174
|
+
"ssh_login_widget_button_connect": "連線",
|
|
175
|
+
"ssh_login_widget_button_disconnect": "斷線",
|
|
176
|
+
"ssh_login_widget_status_disconnected": "已斷線",
|
|
177
|
+
# AI Code Review GUI
|
|
178
|
+
"ai_code_review_gui_window_title": "AI 程式碼審查客戶端",
|
|
179
|
+
"ai_code_review_gui_label_url": "網址:",
|
|
180
|
+
"ai_code_review_gui_label_method": "方法:",
|
|
181
|
+
"ai_code_review_gui_label_code_to_send": "要送出的程式碼:",
|
|
182
|
+
"ai_code_review_gui_label_response": "回應:",
|
|
183
|
+
"ai_code_review_gui_button_send_request": "送出請求",
|
|
184
|
+
"ai_code_review_gui_button_accept_response": "接受回應",
|
|
185
|
+
"ai_code_review_gui_button_reject_response": "拒絕回應",
|
|
186
|
+
"ai_code_review_gui_message_enter_valid_url": "請輸入有效的網址",
|
|
187
|
+
"ai_code_review_gui_message_url_already_recorded": "此網址已被紀錄,仍然送出請求...",
|
|
188
|
+
"ai_code_review_gui_message_new_url_recorded": "新網址已紀錄,正在送出請求...",
|
|
189
|
+
"ai_code_review_gui_message_unsupported_http_method": "不支援的 HTTP 方法",
|
|
190
|
+
"ai_code_review_gui_message_error": "錯誤",
|
|
191
|
+
"ai_code_review_gui_status_accepted": "[已接受]",
|
|
192
|
+
"ai_code_review_gui_status_rejected": "[已拒絕]",
|
|
193
|
+
"ai_code_review_gui_status_save_failed": "儲存失敗",
|
|
194
|
+
# Cot Prompt Editor
|
|
195
|
+
"cot_prompt_editor_window_title": "CoT 提示編輯器",
|
|
196
|
+
"cot_prompt_editor_groupbox_edit_file_content": "編輯檔案內容",
|
|
197
|
+
"cot_prompt_editor_button_create_file": "建立檔案",
|
|
198
|
+
"cot_prompt_editor_button_save_file": "儲存",
|
|
199
|
+
"cot_prompt_editor_button_reload_file": "重新載入",
|
|
200
|
+
"cot_prompt_editor_msgbox_info_title": "資訊",
|
|
201
|
+
"cot_prompt_editor_msgbox_success_title": "成功",
|
|
202
|
+
"cot_prompt_editor_msgbox_error_title": "錯誤",
|
|
203
|
+
"cot_prompt_editor_msgbox_file_exists": "檔案 {filename} 已存在,無需建立",
|
|
204
|
+
"cot_prompt_editor_msgbox_file_created": "檔案 {filename} 已建立",
|
|
205
|
+
"cot_prompt_editor_msgbox_file_saved": "檔案 {filename} 已儲存",
|
|
206
|
+
"cot_prompt_editor_msgbox_no_file_selected": "尚未選擇檔案",
|
|
207
|
+
"cot_prompt_editor_file_not_exist": "(檔案 {filename} 不存在)",
|
|
208
|
+
# Skill Prompt Editor
|
|
209
|
+
"skill_prompt_editor_window_title": "技能提示編輯器",
|
|
210
|
+
"skill_prompt_editor_groupbox_edit_file_content": "編輯檔案內容",
|
|
211
|
+
"skill_prompt_editor_button_create_file": "建立檔案",
|
|
212
|
+
"skill_prompt_editor_button_save_file": "儲存",
|
|
213
|
+
"skill_prompt_editor_button_reload_file": "重新載入",
|
|
214
|
+
"skill_prompt_editor_msgbox_info_title": "資訊",
|
|
215
|
+
"skill_prompt_editor_msgbox_success_title": "成功",
|
|
216
|
+
"skill_prompt_editor_msgbox_error_title": "錯誤",
|
|
217
|
+
"skill_prompt_editor_msgbox_file_exists": "檔案 {filename} 已存在,無需建立",
|
|
218
|
+
"skill_prompt_editor_msgbox_file_created": "檔案 {filename} 已建立",
|
|
219
|
+
"skill_prompt_editor_msgbox_file_saved": "檔案 {filename} 已儲存",
|
|
220
|
+
"skill_prompt_editor_msgbox_no_file_selected": "未選擇檔案",
|
|
221
|
+
"skill_prompt_editor_file_not_exist": "(檔案 {filename} 不存在)",
|
|
222
|
+
# Extend Menu
|
|
223
|
+
"extend_tools_menu_tools_menu": "工具",
|
|
224
|
+
"extend_tools_menu_tools_ssh_menu": "SSH",
|
|
225
|
+
"extend_tools_menu_tools_ai_menu": "AI",
|
|
226
|
+
"extend_tools_menu_ssh_client_tab_action": "SSH 用戶端分頁",
|
|
227
|
+
"extend_tools_menu_ssh_client_tab_label": "SSH 用戶端",
|
|
228
|
+
"extend_tools_menu_ai_code_review_tab_action": "AI 程式碼審查分頁",
|
|
229
|
+
"extend_tools_menu_ai_code_review_tab_label": "AI 程式碼審查",
|
|
230
|
+
"extend_tools_menu_cot_prompt_editor_tab_action": "CoT 提示詞編輯器",
|
|
231
|
+
"extend_tools_menu_cot_prompt_editor_tab_label": "CoT 提示詞編輯器",
|
|
232
|
+
"extend_tools_menu_skill_prompt_editor_tab_action": "Skill 提示詞編輯器",
|
|
233
|
+
"extend_tools_menu_skill_prompt_editor_tab_label": "Skill 提示詞編輯器",
|
|
234
|
+
"extend_tools_menu_skill_prompt_send_tab_label": "Skill 提示詞傳送 GUI",
|
|
235
|
+
"extend_tools_menu_dock_ssh_menu": "SSH",
|
|
236
|
+
"extend_tools_menu_dock_ai_menu": "AI",
|
|
237
|
+
"extend_tools_menu_ssh_client_dock_action": "SSH 用戶端停駐窗格",
|
|
238
|
+
"extend_tools_menu_ai_code_review_dock_action": "AI 程式碼審查停駐窗格",
|
|
239
|
+
"extend_tools_menu_cot_prompt_editor_dock_action": "CoT 提示詞編輯器停駐窗格",
|
|
240
|
+
"extend_tools_menu_skill_prompt_editor_dock_action": "Skill 提示詞編輯器停駐窗格",
|
|
241
|
+
"extend_tools_menu_ssh_client_dock_title": "SSH 用戶端",
|
|
242
|
+
"extend_tools_menu_ai_code_review_dock_title": "AI 程式碼審查",
|
|
243
|
+
"extend_tools_menu_cot_prompt_editor_dock_title": "CoT 提示詞編輯器",
|
|
244
|
+
"extend_tools_menu_skill_prompt_editor_dock_title": "Skill 提示詞編輯器",
|
|
245
|
+
"extend_tools_menu_skill_prompt_send_dock_action": "Skill Prompt 傳送停駐窗格",
|
|
246
|
+
"extend_tools_menu_skill_prompt_send_dock_title": "Skill 提示詞傳送 GUI",
|
|
247
|
+
# CoT code-review GUI
|
|
248
|
+
"cot_gui_window_title": "Prompt Sender UI",
|
|
249
|
+
"cot_gui_label_api_url": "API URL:",
|
|
250
|
+
"cot_gui_placeholder_api_url": "請輸入要傳送的 API URL,例如 http://127.0.0.1:5000/api",
|
|
251
|
+
"cot_gui_placeholder_code_paste_area": "這裡會顯示要傳送的 Prompt 內容",
|
|
252
|
+
"cot_gui_label_prompt_area": "傳送資料區域",
|
|
253
|
+
"cot_gui_label_response_area": "回傳區域",
|
|
254
|
+
"cot_gui_button_send": "開始傳送",
|
|
255
|
+
"cot_gui_error_read_file": "無法讀取檔案:",
|
|
256
|
+
"cot_gui_error_no_url": "請先輸入 API URL!",
|
|
257
|
+
"cot_gui_error_sending": "Error sending:",
|
|
258
|
+
# Skills GUI
|
|
259
|
+
"skills_finished_signal": "成功或錯誤訊息",
|
|
260
|
+
"skills_error_signal": "發生例外",
|
|
261
|
+
"skills_error_status": "錯誤: {status_code}\n{text}",
|
|
262
|
+
"skills_exception": "發生例外: {error}",
|
|
263
|
+
"skills_api_url_label": "LLM API URL:",
|
|
264
|
+
"skills_api_url_placeholder": "請輸入要傳送的 API URL,例如 http://127.0.0.1:5000/api",
|
|
265
|
+
"skills_prompt_select_label": "選擇 Prompt 範本:",
|
|
266
|
+
"skills_prompt_label": "Prompt:",
|
|
267
|
+
"skills_send_button": "傳送",
|
|
268
|
+
"skills_response_label": "回傳結果:",
|
|
269
|
+
"skills_missing_input": "請輸入 API URL 和 Prompt",
|
|
270
|
+
"skills_generating": "產生中...",
|
|
271
|
+
}
|
|
272
|
+
)
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
from automation_ide.automation_editor_ui.extend_multi_language.extend_english import update_english_word_dict
|
|
2
|
+
from automation_ide.automation_editor_ui.extend_multi_language.extend_traditional_chinese import \
|
|
3
|
+
update_traditional_chinese_word_dict
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def update_language_dict():
|
|
7
|
+
update_traditional_chinese_word_dict()
|
|
8
|
+
update_english_word_dict()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
automation_ide/automation_editor_ui/menu/automation_menu/api_testka_menu/build_api_testka_menu.py
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from je_api_testka.gui.main_widget import APITestkaWidget
|
|
6
|
+
from je_editor import language_wrapper
|
|
7
|
+
|
|
8
|
+
from automation_ide.automation_editor_ui.menu.menu_utils import open_web_browser
|
|
9
|
+
|
|
10
|
+
if TYPE_CHECKING:
|
|
11
|
+
from automation_ide.automation_editor_ui.editor_main.main_ui import AutomationEditor
|
|
12
|
+
import sys
|
|
13
|
+
|
|
14
|
+
from PySide6.QtGui import QAction
|
|
15
|
+
|
|
16
|
+
from automation_ide.extend.process_executor.api_testka.api_testka_process import call_api_testka, \
|
|
17
|
+
call_api_testka_with_send, call_api_testka_multi_file, call_api_testka_multi_file_and_send
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def set_apitestka_menu(ui_we_want_to_set: AutomationEditor):
|
|
21
|
+
"""
|
|
22
|
+
Build menu include APITestka feature.
|
|
23
|
+
:param ui_we_want_to_set: main window to add menu.
|
|
24
|
+
:return: None
|
|
25
|
+
"""
|
|
26
|
+
ui_we_want_to_set.apitestka_menu = ui_we_want_to_set.automation_menu.addMenu(
|
|
27
|
+
language_wrapper.language_word_dict.get("apitestka_menu_label")
|
|
28
|
+
)
|
|
29
|
+
ui_we_want_to_set.apitestka_run_menu = ui_we_want_to_set.apitestka_menu.addMenu(
|
|
30
|
+
language_wrapper.language_word_dict.get("run_label"))
|
|
31
|
+
# Run APITestka Script
|
|
32
|
+
ui_we_want_to_set.run_apitestka_action = QAction(
|
|
33
|
+
language_wrapper.language_word_dict.get("apitestka_run_script_label"))
|
|
34
|
+
ui_we_want_to_set.run_apitestka_action.triggered.connect(
|
|
35
|
+
lambda: call_api_testka(
|
|
36
|
+
ui_we_want_to_set,
|
|
37
|
+
)
|
|
38
|
+
)
|
|
39
|
+
ui_we_want_to_set.apitestka_run_menu.addAction(ui_we_want_to_set.run_apitestka_action)
|
|
40
|
+
# Run APITestka Script With Send
|
|
41
|
+
ui_we_want_to_set.run_apitestka_action_with_send = QAction(
|
|
42
|
+
language_wrapper.language_word_dict.get("apitestka_run_script_with_send_label"))
|
|
43
|
+
ui_we_want_to_set.run_apitestka_action_with_send.triggered.connect(
|
|
44
|
+
lambda: call_api_testka_with_send(
|
|
45
|
+
ui_we_want_to_set,
|
|
46
|
+
)
|
|
47
|
+
)
|
|
48
|
+
ui_we_want_to_set.apitestka_run_menu.addAction(
|
|
49
|
+
ui_we_want_to_set.run_apitestka_action_with_send
|
|
50
|
+
)
|
|
51
|
+
# Run Multi APITestka Script
|
|
52
|
+
ui_we_want_to_set.run_multi_apitestka_action = QAction(
|
|
53
|
+
language_wrapper.language_word_dict.get("apitestka_run_multi_script_label"))
|
|
54
|
+
ui_we_want_to_set.run_multi_apitestka_action.triggered.connect(
|
|
55
|
+
lambda: call_api_testka_multi_file(
|
|
56
|
+
ui_we_want_to_set,
|
|
57
|
+
)
|
|
58
|
+
)
|
|
59
|
+
ui_we_want_to_set.apitestka_run_menu.addAction(
|
|
60
|
+
ui_we_want_to_set.run_multi_apitestka_action
|
|
61
|
+
)
|
|
62
|
+
# Run Multi APITestka Script With Send
|
|
63
|
+
ui_we_want_to_set.run_multi_apitestka_action_with_send = QAction(
|
|
64
|
+
language_wrapper.language_word_dict.get("apitestka_run_multi_script_with_send_label"))
|
|
65
|
+
ui_we_want_to_set.run_multi_apitestka_action_with_send.triggered.connect(
|
|
66
|
+
lambda: call_api_testka_multi_file_and_send(
|
|
67
|
+
ui_we_want_to_set,
|
|
68
|
+
)
|
|
69
|
+
)
|
|
70
|
+
ui_we_want_to_set.apitestka_run_menu.addAction(
|
|
71
|
+
ui_we_want_to_set.run_multi_apitestka_action_with_send
|
|
72
|
+
)
|
|
73
|
+
ui_we_want_to_set.apitestka_help_menu = ui_we_want_to_set.apitestka_menu.addMenu(
|
|
74
|
+
language_wrapper.language_word_dict.get("help_label"))
|
|
75
|
+
# Open Doc
|
|
76
|
+
ui_we_want_to_set.open_apitestka_doc_action = QAction(
|
|
77
|
+
language_wrapper.language_word_dict.get("apitestka_doc_label"))
|
|
78
|
+
ui_we_want_to_set.open_apitestka_doc_action.triggered.connect(
|
|
79
|
+
lambda: open_web_browser(
|
|
80
|
+
ui_we_want_to_set,
|
|
81
|
+
"https://apitestka.readthedocs.io/en/latest/",
|
|
82
|
+
language_wrapper.language_word_dict.get("apitestka_doc_tab_label")
|
|
83
|
+
)
|
|
84
|
+
)
|
|
85
|
+
ui_we_want_to_set.apitestka_help_menu.addAction(
|
|
86
|
+
ui_we_want_to_set.open_apitestka_doc_action
|
|
87
|
+
)
|
|
88
|
+
# Open Github
|
|
89
|
+
ui_we_want_to_set.open_apitestka_github_action = QAction(
|
|
90
|
+
language_wrapper.language_word_dict.get("apitestka_github_label"))
|
|
91
|
+
ui_we_want_to_set.open_apitestka_github_action.triggered.connect(
|
|
92
|
+
lambda: open_web_browser(
|
|
93
|
+
ui_we_want_to_set,
|
|
94
|
+
"https://github.com/Intergration-Automation-Testing/APITestka",
|
|
95
|
+
language_wrapper.language_word_dict.get("apitestka_github_tab_label")
|
|
96
|
+
)
|
|
97
|
+
)
|
|
98
|
+
ui_we_want_to_set.apitestka_help_menu.addAction(
|
|
99
|
+
ui_we_want_to_set.open_apitestka_github_action
|
|
100
|
+
)
|
|
101
|
+
ui_we_want_to_set.apitestka_project_menu = ui_we_want_to_set.apitestka_menu.addMenu(
|
|
102
|
+
language_wrapper.language_word_dict.get("project_label"))
|
|
103
|
+
# Create Project
|
|
104
|
+
ui_we_want_to_set.create_apitestka_project_action = QAction(
|
|
105
|
+
language_wrapper.language_word_dict.get("apitestka_create_project_label"))
|
|
106
|
+
ui_we_want_to_set.create_apitestka_project_action.triggered.connect(
|
|
107
|
+
create_project
|
|
108
|
+
)
|
|
109
|
+
ui_we_want_to_set.apitestka_project_menu.addAction(
|
|
110
|
+
ui_we_want_to_set.create_apitestka_project_action
|
|
111
|
+
)
|
|
112
|
+
# APITestka GUI
|
|
113
|
+
ui_we_want_to_set.api_testka_gui_action = QAction(
|
|
114
|
+
"APITestka GUI"
|
|
115
|
+
)
|
|
116
|
+
ui_we_want_to_set.api_testka_gui_action.triggered.connect(
|
|
117
|
+
lambda: add_api_testka_gui(ui_we_want_to_set)
|
|
118
|
+
)
|
|
119
|
+
ui_we_want_to_set.apitestka_menu.addAction(
|
|
120
|
+
ui_we_want_to_set.api_testka_gui_action
|
|
121
|
+
)
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
def create_project() -> None:
|
|
125
|
+
try:
|
|
126
|
+
import je_api_testka
|
|
127
|
+
package = je_api_testka
|
|
128
|
+
if package is not None:
|
|
129
|
+
package.create_project_dir()
|
|
130
|
+
except ImportError as error:
|
|
131
|
+
print(repr(error), file=sys.stderr)
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
def add_api_testka_gui(ui_we_want_to_set: AutomationEditor) -> None:
|
|
135
|
+
ui_we_want_to_set.tab_widget.addTab(
|
|
136
|
+
APITestkaWidget(), "APITestka GUI"
|
|
137
|
+
)
|
|
File without changes
|
automation_ide/automation_editor_ui/menu/automation_menu/auto_control_menu/build_autocontrol_menu.py
ADDED
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from je_auto_control.gui.main_widget import AutoControlGUIWidget
|
|
6
|
+
from je_editor import EditorWidget, language_wrapper
|
|
7
|
+
from je_editor.pyside_ui.main_ui.save_settings.user_color_setting_file import actually_color_dict
|
|
8
|
+
|
|
9
|
+
from automation_ide.automation_editor_ui.menu.menu_utils import open_web_browser
|
|
10
|
+
|
|
11
|
+
if TYPE_CHECKING:
|
|
12
|
+
from automation_ide.automation_editor_ui.editor_main.main_ui import AutomationEditor
|
|
13
|
+
import sys
|
|
14
|
+
|
|
15
|
+
import je_auto_control
|
|
16
|
+
from PySide6.QtGui import QAction, QTextCharFormat
|
|
17
|
+
|
|
18
|
+
from automation_ide.extend.process_executor.auto_control.auto_control_process import \
|
|
19
|
+
call_auto_control, call_auto_control_with_send, call_auto_control_multi_file, \
|
|
20
|
+
call_auto_control_multi_file_and_send
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def set_autocontrol_menu(ui_we_want_to_set: AutomationEditor):
|
|
24
|
+
"""
|
|
25
|
+
Build menu include AutoControl feature.
|
|
26
|
+
:param ui_we_want_to_set: main window to add menu.
|
|
27
|
+
:return: None
|
|
28
|
+
"""
|
|
29
|
+
ui_we_want_to_set.autocontrol_menu = ui_we_want_to_set.automation_menu.addMenu(
|
|
30
|
+
language_wrapper.language_word_dict.get("autocontrol_menu_label"))
|
|
31
|
+
ui_we_want_to_set.autocontrol_run_menu = ui_we_want_to_set.autocontrol_menu.addMenu(
|
|
32
|
+
language_wrapper.language_word_dict.get("run_label"))
|
|
33
|
+
# Run AutoControl Script
|
|
34
|
+
ui_we_want_to_set.run_autocontrol_action = QAction(
|
|
35
|
+
language_wrapper.language_word_dict.get("autocontrol_run_script_label"))
|
|
36
|
+
ui_we_want_to_set.run_autocontrol_action.triggered.connect(
|
|
37
|
+
lambda: call_auto_control(
|
|
38
|
+
ui_we_want_to_set,
|
|
39
|
+
)
|
|
40
|
+
)
|
|
41
|
+
ui_we_want_to_set.autocontrol_run_menu.addAction(ui_we_want_to_set.run_autocontrol_action)
|
|
42
|
+
# Run AutoControl Script With Send
|
|
43
|
+
ui_we_want_to_set.run_autocontrol_action_with_send = QAction(
|
|
44
|
+
language_wrapper.language_word_dict.get("autocontrol_run_script_with_send_label"))
|
|
45
|
+
ui_we_want_to_set.run_autocontrol_action_with_send.triggered.connect(
|
|
46
|
+
lambda: call_auto_control_with_send(
|
|
47
|
+
ui_we_want_to_set,
|
|
48
|
+
)
|
|
49
|
+
)
|
|
50
|
+
ui_we_want_to_set.autocontrol_run_menu.addAction(
|
|
51
|
+
ui_we_want_to_set.run_autocontrol_action_with_send
|
|
52
|
+
)
|
|
53
|
+
# Run Multi AutoControl Script
|
|
54
|
+
ui_we_want_to_set.run_multi_autocontrol_action = QAction(
|
|
55
|
+
language_wrapper.language_word_dict.get("autocontrol_run_multi_script_label"))
|
|
56
|
+
ui_we_want_to_set.run_multi_autocontrol_action.triggered.connect(
|
|
57
|
+
lambda: call_auto_control_multi_file(
|
|
58
|
+
ui_we_want_to_set,
|
|
59
|
+
)
|
|
60
|
+
)
|
|
61
|
+
ui_we_want_to_set.autocontrol_run_menu.addAction(
|
|
62
|
+
ui_we_want_to_set.run_multi_autocontrol_action
|
|
63
|
+
)
|
|
64
|
+
# Run Multi AutoControl Script With Send
|
|
65
|
+
ui_we_want_to_set.run_multi_autocontrol_action_with_send = QAction(
|
|
66
|
+
language_wrapper.language_word_dict.get("autocontrol_run_multi_script_with_send_label")
|
|
67
|
+
)
|
|
68
|
+
ui_we_want_to_set.run_multi_autocontrol_action_with_send.triggered.connect(
|
|
69
|
+
lambda: call_auto_control_multi_file_and_send(
|
|
70
|
+
ui_we_want_to_set,
|
|
71
|
+
)
|
|
72
|
+
)
|
|
73
|
+
ui_we_want_to_set.autocontrol_run_menu.addAction(
|
|
74
|
+
ui_we_want_to_set.run_multi_autocontrol_action_with_send
|
|
75
|
+
)
|
|
76
|
+
ui_we_want_to_set.autocontrol_help_menu = ui_we_want_to_set.autocontrol_menu.addMenu(
|
|
77
|
+
language_wrapper.language_word_dict.get("help_label"))
|
|
78
|
+
# Open Doc
|
|
79
|
+
ui_we_want_to_set.open_autocontrol_doc_action = QAction(
|
|
80
|
+
language_wrapper.language_word_dict.get("autocontrol_doc_label"))
|
|
81
|
+
ui_we_want_to_set.open_autocontrol_doc_action.triggered.connect(
|
|
82
|
+
lambda: open_web_browser(
|
|
83
|
+
ui_we_want_to_set,
|
|
84
|
+
"https://autocontrol.readthedocs.io/en/latest/",
|
|
85
|
+
language_wrapper.language_word_dict.get("autocontrol_doc_tab_label")
|
|
86
|
+
)
|
|
87
|
+
)
|
|
88
|
+
ui_we_want_to_set.autocontrol_help_menu.addAction(
|
|
89
|
+
ui_we_want_to_set.open_autocontrol_doc_action
|
|
90
|
+
)
|
|
91
|
+
# Open Github
|
|
92
|
+
ui_we_want_to_set.open_autocontrol_github_action = QAction(
|
|
93
|
+
language_wrapper.language_word_dict.get("autocontrol_github_label"))
|
|
94
|
+
ui_we_want_to_set.open_autocontrol_github_action.triggered.connect(
|
|
95
|
+
lambda: open_web_browser(
|
|
96
|
+
ui_we_want_to_set,
|
|
97
|
+
"https://github.com/Intergration-Automation-Testing/AutoControl",
|
|
98
|
+
language_wrapper.language_word_dict.get("autocontrol_github_tab_label")
|
|
99
|
+
)
|
|
100
|
+
)
|
|
101
|
+
ui_we_want_to_set.autocontrol_help_menu.addAction(
|
|
102
|
+
ui_we_want_to_set.open_autocontrol_github_action
|
|
103
|
+
)
|
|
104
|
+
ui_we_want_to_set.autocontrol_project_menu = ui_we_want_to_set.autocontrol_menu.addMenu(
|
|
105
|
+
language_wrapper.language_word_dict.get("project_label"))
|
|
106
|
+
# Create Project
|
|
107
|
+
ui_we_want_to_set.create_autocontrol_project_action = QAction(
|
|
108
|
+
language_wrapper.language_word_dict.get("autocontrol_create_project_label"))
|
|
109
|
+
ui_we_want_to_set.create_autocontrol_project_action.triggered.connect(
|
|
110
|
+
create_project
|
|
111
|
+
)
|
|
112
|
+
ui_we_want_to_set.autocontrol_project_menu.addAction(
|
|
113
|
+
ui_we_want_to_set.create_autocontrol_project_action
|
|
114
|
+
)
|
|
115
|
+
# Record
|
|
116
|
+
ui_we_want_to_set.autocontrol_record_menu = ui_we_want_to_set.autocontrol_menu.addMenu(
|
|
117
|
+
language_wrapper.language_word_dict.get("autocontrol_record_menu_label"))
|
|
118
|
+
ui_we_want_to_set.record_action = QAction(
|
|
119
|
+
language_wrapper.language_word_dict.get("autocontrol_record_start_label"))
|
|
120
|
+
ui_we_want_to_set.record_action.triggered.connect(
|
|
121
|
+
je_auto_control.record
|
|
122
|
+
)
|
|
123
|
+
ui_we_want_to_set.autocontrol_record_menu.addAction(
|
|
124
|
+
ui_we_want_to_set.record_action
|
|
125
|
+
)
|
|
126
|
+
# Stop Record
|
|
127
|
+
ui_we_want_to_set.stop_record_action = QAction(
|
|
128
|
+
language_wrapper.language_word_dict.get("autocontrol_record_stop_label"))
|
|
129
|
+
ui_we_want_to_set.stop_record_action.triggered.connect(
|
|
130
|
+
lambda: stop_record(ui_we_want_to_set)
|
|
131
|
+
)
|
|
132
|
+
ui_we_want_to_set.autocontrol_record_menu.addAction(
|
|
133
|
+
ui_we_want_to_set.stop_record_action
|
|
134
|
+
)
|
|
135
|
+
# AutoControl GUI
|
|
136
|
+
ui_we_want_to_set.autocontrol_gui_action = QAction(
|
|
137
|
+
"AutoControl GUI"
|
|
138
|
+
)
|
|
139
|
+
ui_we_want_to_set.autocontrol_gui_action.triggered.connect(
|
|
140
|
+
lambda: add_autocontrol_gui(ui_we_want_to_set)
|
|
141
|
+
)
|
|
142
|
+
ui_we_want_to_set.autocontrol_menu.addAction(
|
|
143
|
+
ui_we_want_to_set.autocontrol_gui_action
|
|
144
|
+
)
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
def create_project() -> None:
|
|
148
|
+
try:
|
|
149
|
+
package = je_auto_control
|
|
150
|
+
if package is not None:
|
|
151
|
+
package.create_project_dir()
|
|
152
|
+
except ImportError as error:
|
|
153
|
+
print(repr(error), file=sys.stderr)
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
def stop_record(editor_instance: AutomationEditor):
|
|
157
|
+
widget = editor_instance.tab_widget.currentWidget()
|
|
158
|
+
if isinstance(widget, EditorWidget):
|
|
159
|
+
text_cursor = widget.code_edit.textCursor()
|
|
160
|
+
text_format = QTextCharFormat()
|
|
161
|
+
text_format.setForeground(actually_color_dict.get("normal_output_color"))
|
|
162
|
+
text_cursor.insertText(str(je_auto_control.stop_record()), text_format)
|
|
163
|
+
text_cursor.insertBlock()
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
def add_autocontrol_gui(ui_we_want_to_set: AutomationEditor) -> None:
|
|
167
|
+
ui_we_want_to_set.tab_widget.addTab(
|
|
168
|
+
AutoControlGUIWidget(), "AutoControl GUI"
|
|
169
|
+
)
|
|
File without changes
|