From 13483eed77f36a5caf58adc53ad7533057432113 Mon Sep 17 00:00:00 2001 From: yeongpin Date: Fri, 17 Jan 2025 10:12:18 +0800 Subject: [PATCH] update auth message & reset message --- README.md | 10 ++++++++-- cursor_auth.py | 10 +++++----- locales/en.json | 3 ++- locales/zh_cn.json | 9 +++++++-- locales/zh_tw.json | 9 +++++++-- reset_machine_manual.py | 2 +- 6 files changed, 30 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 034d61f..211435c 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,14 @@ This is a tool to automatically register (except for Google verification code), ## 🔄 更新日志
+v1.0.7 - HotFix + +1. Fix Reset Machine | 修復重置機器 +2. Fix Locale Language | 修復多語言 +
+
+Other Version Change Log +
v1.0.7 1. Add Locale Language Support | 增加多語言支持 @@ -45,8 +53,6 @@ This is a tool to automatically register (except for Google verification code),

-Other Version Change Log -
v1.0.6 1. Add Quit Cursor Option | 增加退出Cursor選項 diff --git a/cursor_auth.py b/cursor_auth.py index a1e29bf..4df112d 100644 --- a/cursor_auth.py +++ b/cursor_auth.py @@ -56,7 +56,7 @@ class CursorAuth: # 重新连接数据库 conn = sqlite3.connect(self.db_path) - print(f"{EMOJI['INFO']} {Fore.GREEN}{self.translator.get('auth.connected_to_database')}{Style.RESET_ALL}") + print(f"{EMOJI['INFO']} {Fore.GREEN} {self.translator.get('auth.connected_to_database')}{Style.RESET_ALL}") cursor = conn.cursor() # 增加超时和其他优化设置 @@ -90,7 +90,7 @@ class CursorAuth: UPDATE ItemTable SET value = ? WHERE key = ? """, (value, key)) - print(f"{EMOJI['INFO']} {Fore.CYAN}Updating {key.split('/')[-1]}...{Style.RESET_ALL}") + print(f"{EMOJI['INFO']} {Fore.CYAN} {self.translator.get('auth.updating_pair')} {key.split('/')[-1]}...{Style.RESET_ALL}") cursor.execute("COMMIT") print(f"{EMOJI['SUCCESS']} {Fore.GREEN}{self.translator.get('auth.database_updated_successfully')}{Style.RESET_ALL}") @@ -101,14 +101,14 @@ class CursorAuth: raise e except sqlite3.Error as e: - print(f"\n{EMOJI['ERROR']} {Fore.RED}{self.translator.get('auth.database_error', error=str(e))}{Style.RESET_ALL}") + print(f"\n{EMOJI['ERROR']} {Fore.RED} {self.translator.get('auth.database_error', error=str(e))}{Style.RESET_ALL}") return False except Exception as e: - print(f"\n{EMOJI['ERROR']} {Fore.RED}{self.translator.get('auth.an_error_occurred', error=str(e))}{Style.RESET_ALL}") + print(f"\n{EMOJI['ERROR']} {Fore.RED} {self.translator.get('auth.an_error_occurred', error=str(e))}{Style.RESET_ALL}") return False finally: if conn: conn.close() - print(f"{EMOJI['DB']} {Fore.CYAN}{self.translator.get('auth.database_connection_closed')}{Style.RESET_ALL}") + print(f"{EMOJI['DB']} {Fore.CYAN} {self.translator.get('auth.database_connection_closed')}{Style.RESET_ALL}") diff --git a/locales/en.json b/locales/en.json index 35ae9f4..87a4d01 100644 --- a/locales/en.json +++ b/locales/en.json @@ -107,7 +107,8 @@ "reset_machine_id": "Reset Machine ID", "database_connection_closed": "Database Connection Closed", "database_updated_successfully": "Database Updated Successfully", - "connected_to_database": "Connected to Database" + "connected_to_database": "Connected to Database", + "updating_pair": "Updating Key-Value Pair" }, "control": { "generate_email": "Generating New Email", diff --git a/locales/zh_cn.json b/locales/zh_cn.json index 05adeec..65f4d66 100644 --- a/locales/zh_cn.json +++ b/locales/zh_cn.json @@ -89,7 +89,8 @@ "account_info_saved": "账户信息已保存", "save_account_info_failed": "保存账户信息失败", "get_email_address": "获取邮箱地址", - "register_process_error": "注册流程错误: {error}" + "register_process_error": "注册流程错误: {error}", + "update_cursor_auth_info": "更新Cursor认证信息" }, "auth": { "title": "Cursor 认证管理器", @@ -102,7 +103,11 @@ "auth_update_failed": "认证信息更新失败: {error}", "auth_file_created": "认证文件已创建", "auth_file_create_failed": "认证文件创建失败: {error}", - "press_enter": "按回车键退出" + "press_enter": "按回车键退出", + "connected_to_database": "已连接到数据库", + "database_updated_successfully": "数据库更新成功", + "database_connection_closed": "数据库连接已关闭", + "updating_pair": "更新键值对" }, "control": { "generate_email": "生成新邮箱", diff --git a/locales/zh_tw.json b/locales/zh_tw.json index 4e494f9..4539b65 100644 --- a/locales/zh_tw.json +++ b/locales/zh_tw.json @@ -89,7 +89,8 @@ "account_info_saved": "賬戶信息已保存", "save_account_info_failed": "保存賬戶信息失敗", "get_email_address": "獲取郵箱地址", - "register_process_error": "註冊流程錯誤: {error}" + "register_process_error": "註冊流程錯誤: {error}", + "update_cursor_auth_info": "更新Cursor認證信息" }, "auth": { "title": "Cursor 認證管理器", @@ -102,7 +103,11 @@ "auth_update_failed": "認證信息更新失敗: {error}", "auth_file_created": "認證文件已創建", "auth_file_create_failed": "認證文件創建失敗: {error}", - "press_enter": "按回車鍵退出" + "press_enter": "按回車鍵退出", + "connected_to_database": "已連接到數據庫", + "database_updated_successfully": "數據庫更新成功", + "database_connection_closed": "數據庫連接已關閉", + "updating_pair": "更新鍵值對" }, "control": { "generate_email": "生成新郵箱", diff --git a/reset_machine_manual.py b/reset_machine_manual.py index 4af402d..bb72f1f 100644 --- a/reset_machine_manual.py +++ b/reset_machine_manual.py @@ -98,7 +98,7 @@ class MachineIDResetter: INSERT OR REPLACE INTO ItemTable (key, value) VALUES (?, ?) """, (key, value)) - print(f"{EMOJI['INFO']} {Fore.CYAN}{self.translator.get('reset.updating_pair')}: {key}{Style.RESET_ALL}") + print(f"{EMOJI['INFO']} {Fore.CYAN} {self.translator.get('reset.updating_pair')}: {key}{Style.RESET_ALL}") conn.commit() conn.close()