diff --git a/locales/en.json b/locales/en.json index 2176245..e784172 100644 --- a/locales/en.json +++ b/locales/en.json @@ -396,7 +396,15 @@ "warning_4": "to only target Cursor AI editor files and trial detection mechanisms.", "warning_5": "Other applications on your system will not be affected.", "warning_6": "You will need to set up Cursor AI again after running this tool.", - "warning_7": "Use at your own risk" + "warning_7": "Use at your own risk", + "removed": "Removed: {path}", + "failed_to_reset_machine_guid": "Failed to reset machine GUID", + "failed_to_remove": "Failed to remove: {path}", + "failed_to_delete_file": "Failed to delete file: {path}", + "failed_to_delete_directory": "Failed to delete directory: {path}", + "failed_to_delete_file_or_directory": "Failed to delete file or directory: {path}", + "deep_scanning": "Performing deep scan for additional trial/license files", + "resetting_cursor": "Resetting Cursor AI Editor... Please wait." }, "github_register": { "title": "GitHub + Cursor AI Registration Automation", diff --git a/locales/zh_cn.json b/locales/zh_cn.json index 291a64c..8c81b10 100644 --- a/locales/zh_cn.json +++ b/locales/zh_cn.json @@ -390,7 +390,15 @@ "warning_4": "仅针对 Cursor AI 编辑器文件和试用检测机制。", "warning_5": "系统中的其他应用程序不会受到影响。", "warning_6": "运行此工具后,您需要重新设置 Cursor AI。", - "warning_7": "请自行承担风险" + "warning_7": "请自行承担风险", + "removed": "已删除:{path}", + "failed_to_reset_machine_guid": "无法重置机器 GUID", + "failed_to_remove": "无法删除:{path}", + "failed_to_delete_file": "无法删除文件:{path}", + "failed_to_delete_directory": "无法删除目录:{path}", + "failed_to_delete_file_or_directory": "无法删除文件或目录:{path}", + "deep_scanning": "正在进行深度扫描以查找其他试用/授权文件", + "resetting_cursor": "正在重置 Cursor AI 编辑器... 请稍候。" }, "github_register": { "title": "GitHub + Cursor AI 注册自动化", diff --git a/locales/zh_tw.json b/locales/zh_tw.json index 125f6e7..9414b49 100644 --- a/locales/zh_tw.json +++ b/locales/zh_tw.json @@ -369,7 +369,16 @@ "warning_4": "Cursor AI 編輯器檔案與試用偵測機制。", "warning_5": "系統中的其他應用程式不會受到影響。", "warning_6": "執行此工具後,您需要重新設定 Cursor AI。", - "warning_7": "請自行承擔風險" + "warning_7": "請自行承擔風險", + "removed": "已刪除:{path}", + "failed_to_reset_machine_guid": "無法重置機器 GUID", + "failed_to_remove": "無法刪除:{path}", + "failed_to_delete_file": "無法刪除檔案:{path}", + "failed_to_delete_directory": "無法刪除目錄:{path}", + "failed_to_delete_file_or_directory": "無法刪除檔案或目錄:{path}", + "deep_scanning": "正在進行深度掃描以查找其他試用/授權檔案", + "resetting_cursor": "正在重置 Cursor AI 編輯器... 請稍候。" + }, "github_register": { "title": "GitHub + Cursor AI 注册自动化", diff --git a/totally_reset_cursor.py b/totally_reset_cursor.py index 3661870..52678bc 100644 --- a/totally_reset_cursor.py +++ b/totally_reset_cursor.py @@ -144,7 +144,7 @@ def reset_cursor(translator=None): # Remove directories for path in paths: - delete_directory(path) + delete_directory(path, translator) # Remove common files related to Cursor files = [ @@ -155,7 +155,7 @@ def reset_cursor(translator=None): ] for file in files: - delete_file(file) + delete_file(file, translator) # Extra cleanup (wildcard search) print(f"\n{Fore.YELLOW}{EMOJI['INFO']} {translator.get('totally_reset.deep_scanning')}") @@ -167,13 +167,13 @@ def reset_cursor(translator=None): for root, dirs, files in os.walk(base): for dir in dirs: if "cursor" in dir.lower(): - delete_directory(os.path.join(root, dir)) + delete_directory(os.path.join(root, dir), translator) for file in files: if "cursor" in file.lower(): - delete_file(os.path.join(root, file)) + delete_file(os.path.join(root, file), translator) # Reset machine ID - reset_machine_id() + reset_machine_id(translator) print(f"\n{Fore.GREEN}{EMOJI['SUCCESS']} {translator.get('totally_reset.cursor_reset')}") @@ -192,4 +192,5 @@ def main(translator=None): print(f"\n{Fore.RED}❌ {translator.get('reset.operation_cancelled')}{Style.RESET_ALL}") if __name__ == '__main__': - main(translator=None) + from main import translator + main(translator)