mirror of
https://github.com/yeongpin/cursor-free-vip.git
synced 2025-08-02 12:47:34 +08:00
Refactor cursor reset process to include translator support in file and directory deletion functions. Enhance user feedback with new messages for removal failures and deep scanning operations in English and Chinese (Simplified and Traditional) locales.
This commit is contained in:
parent
eb31209b6a
commit
0b2081175d
@ -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",
|
||||
|
@ -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 注册自动化",
|
||||
|
@ -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 注册自动化",
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user