update auth message & reset message

This commit is contained in:
yeongpin 2025-01-17 10:12:18 +08:00
parent eb69f933af
commit 13483eed77
6 changed files with 30 additions and 13 deletions

View File

@ -37,6 +37,14 @@ This is a tool to automatically register (except for Google verification code),
## 🔄 更新日志
<details open>
<summary>v1.0.7 - HotFix</summary>
1. Fix Reset Machine | 修復重置機器
2. Fix Locale Language | 修復多語言
</details>
<details>
<summary>Other Version Change Log</summary>
<details>
<summary>v1.0.7</summary>
1. Add Locale Language Support | 增加多語言支持
@ -45,8 +53,6 @@ This is a tool to automatically register (except for Google verification code),
</p>
</details>
<details>
<summary>Other Version Change Log</summary>
<details>
<summary>v1.0.6</summary>
1. Add Quit Cursor Option | 增加退出Cursor選項

View File

@ -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}")

View File

@ -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",

View File

@ -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": "生成新邮箱",

View File

@ -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": "生成新郵箱",

View File

@ -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()