diff --git a/locales/en.json b/locales/en.json index 27c27a9..58b285f 100644 --- a/locales/en.json +++ b/locales/en.json @@ -15,7 +15,8 @@ "error_occurred": "An error occurred: {error}. Please try again", "press_enter": "Press Enter to Exit", "disable_auto_update": "Disable Cursor Auto-Update", - "lifetime_access_enabled": "LIFETIME ACCESS ENABLED" + "lifetime_access_enabled": "LIFETIME ACCESS ENABLED", + "totally_reset": "Totally Reset Cursor" }, "languages": { "en": "English", diff --git a/locales/vi.json b/locales/vi.json index f96a245..f345fd3 100644 --- a/locales/vi.json +++ b/locales/vi.json @@ -12,8 +12,9 @@ "program_terminated": "Chương trình đã bị người dùng chấm dứt", "error_occurred": "Đã xảy ra lỗi: {error}. Vui lòng thử lại", "press_enter": "Nhấn Enter để Thoát", - "disable_auto_update": "Tắt Tự Động Cập Nhật Cursor", - "lifetime_access_enabled": "LIFETIME ACCESS ENABLED" + "disable_auto_update": "Tắt tự động cập nhật Cursor", + "lifetime_access_enabled": "ĐÃ BẬT TRUY CẬP TRỌN ĐỜI", + "totally_reset": "Đặt lại hoàn toàn Cursor" }, "languages": { "en": "English", diff --git a/locales/zh_cn.json b/locales/zh_cn.json index e59477a..7a6b41b 100644 --- a/locales/zh_cn.json +++ b/locales/zh_cn.json @@ -15,7 +15,8 @@ "error_occurred": "发生错误:{error},请重试", "press_enter": "按回车键退出", "disable_auto_update": "禁用 Cursor 自动更新", - "lifetime_access_enabled": "永久订阅" + "lifetime_access_enabled": "永久订阅", + "totally_reset": "完全重置 Cursor" }, "languages": { "en": "English", diff --git a/locales/zh_tw.json b/locales/zh_tw.json index 0aed4ca..de13caa 100644 --- a/locales/zh_tw.json +++ b/locales/zh_tw.json @@ -12,8 +12,9 @@ "program_terminated": "程式已被使用者終止", "error_occurred": "發生錯誤:{error},請重試", "press_enter": "按返回鍵退出", - "disable_auto_update": "停用 Cursor 自動更新", - "lifetime_access_enabled": "永久訂閱" + "disable_auto_update": "禁用 Cursor 自動更新", + "lifetime_access_enabled": "終身訪問已啟用", + "totally_reset": "完全重置 Cursor" }, "languages": { "en": "English", diff --git a/main.py b/main.py index 1e6b9e9..b7568ec 100644 --- a/main.py +++ b/main.py @@ -227,6 +227,7 @@ def print_menu(): print(f"{Fore.GREEN}6{Style.RESET_ALL}. {EMOJI['ERROR']} {translator.get('menu.quit')}") print(f"{Fore.GREEN}7{Style.RESET_ALL}. {EMOJI['LANG']} {translator.get('menu.select_language')}") print(f"{Fore.GREEN}8{Style.RESET_ALL}. {EMOJI['UPDATE']} {translator.get('menu.disable_auto_update')}") + print(f"{Fore.GREEN}9{Style.RESET_ALL}. {EMOJI['RESET']} {translator.get('menu.totally_reset')}") print(f"{Fore.YELLOW}{'─' * 40}{Style.RESET_ALL}") def select_language(): @@ -386,7 +387,7 @@ def main(): while True: try: - choice = input(f"\n{EMOJI['ARROW']} {Fore.CYAN}{translator.get('menu.input_choice', choices='0-8')}: {Style.RESET_ALL}") + choice = input(f"\n{EMOJI['ARROW']} {Fore.CYAN}{translator.get('menu.input_choice', choices='0-9')}: {Style.RESET_ALL}") if choice == "0": print(f"\n{Fore.YELLOW}{EMOJI['INFO']} {translator.get('menu.exit')}...{Style.RESET_ALL}") @@ -424,6 +425,10 @@ def main(): import disable_auto_update disable_auto_update.run(translator) print_menu() + elif choice == "9": + import totally_reset_cursor + totally_reset_cursor.run(translator) + print_menu() else: print(f"{Fore.RED}{EMOJI['ERROR']} {translator.get('menu.invalid_choice')}{Style.RESET_ALL}") print_menu() diff --git a/totally_reset_cursor.py b/totally_reset_cursor.py index 8792cff..de10f8d 100644 --- a/totally_reset_cursor.py +++ b/totally_reset_cursor.py @@ -473,3 +473,15 @@ if __name__ == "__main__": print(f"\n❌ An unexpected error occurred: {str(e)}\n") print(" Please report this issue to Prathmesh on Discord: prathmesh_pro") sys.exit(1) + +def run(translator=None): + """Entry point for the totally reset cursor functionality when called from the main menu.""" + try: + reset_cursor() + input("\nPress Enter to return to main menu...") + except KeyboardInterrupt: + print("\n\n🛑 Process interrupted by user. Returning to main menu...\n") + except Exception as e: + print(f"\n❌ An unexpected error occurred: {str(e)}\n") + print(" Please report this issue to Prathmesh on Discord: prathmesh_pro") + input("\nPress Enter to return to main menu...")