feat: Phase 1 WinAuth Go 移植完整实现
将原 C#/.NET WinAuth 移植为 Go + Gio GUI,覆盖 Phase 1 全部功能。 核心模块: - internal/authenticator: TOTP (Google/Microsoft/Okta) + HOTP + BattleNet + Steam,含 enroll/sync/code 生成、Steam 交易确认轮询 - internal/config: YAML 配置 + 老版 WinAuth XML 导入(DPAPI + Password + Blowfish/PBKDF2 解密链) - internal/crypto: 现代加密 (WAGO1) + DPAPI 跨平台封装 + 老版 Blowfish ECB - internal/win32: 单实例 Mutex 锁 + 全局热键管理器 (RegisterHotKey + PeekMessage 泵) + SendInput Unicode 注入 + 剪贴板文本/CF_DIB 图像读写 + AttachThreadInput 焦点切换 - internal/hotkey: "Ctrl+Alt+G" 风格快捷键字符串解析/格式化 - internal/qr: gozxing 二维码解码 + otpauth:// URI 解析 - internal/i18n: en/zh-CN/de 三语 TOML UI 模块 (Gio): - 主窗口:圆环倒计时进度条、复制按钮 + Toast 反馈、空列表占位、行分隔线 - 添加流程:vendor 菜单 + 各 vendor 独立对话框 + 二维码扫描入口(文件 / 剪贴板) - 设置:密码加密、老版 XML 导入、每条目热键配置 - Steam:注册向导(含 captcha/email/SMS 多步)+ 交易确认窗 构建:Windows 主目标,非 Windows 平台所有 Win32 功能走 build-tag 桩实现。
This commit is contained in:
@@ -0,0 +1,371 @@
|
||||
# English locale file for winauth-go.
|
||||
# Use {{.Name}} placeholders for go-i18n templating, or %s/%d style for
|
||||
# direct fmt-based substitution via T(id, args...).
|
||||
|
||||
[app_title]
|
||||
other = "WinAuth"
|
||||
|
||||
[menu_file]
|
||||
other = "File"
|
||||
|
||||
[menu_help]
|
||||
other = "Help"
|
||||
|
||||
[menu_add_authenticator]
|
||||
other = "Add authenticator"
|
||||
|
||||
[menu_choose_vendor]
|
||||
other = "Choose authenticator type"
|
||||
|
||||
[btn_ok]
|
||||
other = "OK"
|
||||
|
||||
[btn_cancel]
|
||||
other = "Cancel"
|
||||
|
||||
[btn_add]
|
||||
other = "Add"
|
||||
|
||||
[btn_remove]
|
||||
other = "Remove"
|
||||
|
||||
[btn_close]
|
||||
other = "Close"
|
||||
|
||||
[btn_enroll]
|
||||
other = "Enroll"
|
||||
|
||||
[vendor_google]
|
||||
other = "Google"
|
||||
|
||||
[vendor_microsoft]
|
||||
other = "Microsoft"
|
||||
|
||||
[vendor_okta]
|
||||
other = "Okta Verify"
|
||||
|
||||
[vendor_hotp]
|
||||
other = "HOTP (counter-based)"
|
||||
|
||||
[vendor_battlenet]
|
||||
other = "Battle.Net"
|
||||
|
||||
[vendor_steam]
|
||||
other = "Steam"
|
||||
|
||||
[vendor_battlenet_restore]
|
||||
other = "Battle.Net (restore from paper code)"
|
||||
|
||||
[dialog_add_google_title]
|
||||
other = "Add Google Authenticator"
|
||||
|
||||
[dialog_add_microsoft_title]
|
||||
other = "Add Microsoft Authenticator"
|
||||
|
||||
[dialog_add_okta_title]
|
||||
other = "Add Okta Verify"
|
||||
|
||||
[dialog_add_hotp_title]
|
||||
other = "Add HOTP Authenticator"
|
||||
|
||||
[dialog_add_battlenet_title]
|
||||
other = "Add Battle.Net Authenticator"
|
||||
|
||||
[dialog_add_steam_title]
|
||||
other = "Add Steam Authenticator"
|
||||
|
||||
[label_secret_key]
|
||||
other = "Secret key"
|
||||
|
||||
[label_name]
|
||||
other = "Name"
|
||||
|
||||
[label_counter]
|
||||
other = "Counter"
|
||||
|
||||
[label_serial]
|
||||
other = "Serial number"
|
||||
|
||||
[label_device_id]
|
||||
other = "Device ID"
|
||||
|
||||
[label_steam_data]
|
||||
other = "Steam data (JSON, optional)"
|
||||
|
||||
[label_region]
|
||||
other = "Region"
|
||||
|
||||
[label_show_secret]
|
||||
other = "Show secret"
|
||||
|
||||
[region_auto]
|
||||
other = "Auto detect"
|
||||
|
||||
[msg_empty_secret]
|
||||
other = "Please enter a secret key."
|
||||
|
||||
[msg_invalid_secret]
|
||||
other = "The secret key is not valid Base32."
|
||||
|
||||
[msg_empty_serial]
|
||||
other = "Please enter the serial number."
|
||||
|
||||
[msg_invalid_counter]
|
||||
other = "Counter must be a non-negative integer."
|
||||
|
||||
[msg_enrolling]
|
||||
other = "Contacting server..."
|
||||
|
||||
[msg_enroll_failed]
|
||||
other = "Enrollment failed: %s"
|
||||
|
||||
[menu_settings]
|
||||
other = "Settings"
|
||||
|
||||
[menu_set_password]
|
||||
other = "Set password..."
|
||||
|
||||
[menu_about]
|
||||
other = "About"
|
||||
|
||||
[dialog_password_title]
|
||||
other = "Enter password"
|
||||
|
||||
[dialog_set_password_title]
|
||||
other = "Set password"
|
||||
|
||||
[label_password]
|
||||
other = "Password"
|
||||
|
||||
[label_password_confirm]
|
||||
other = "Confirm password"
|
||||
|
||||
[hint_password_empty_disables]
|
||||
other = "Leave both fields empty to disable encryption."
|
||||
|
||||
[msg_password_required]
|
||||
other = "The configuration is encrypted. Please enter the password."
|
||||
|
||||
[msg_password_wrong]
|
||||
other = "Wrong password."
|
||||
|
||||
[msg_password_mismatch]
|
||||
other = "The two passwords do not match."
|
||||
|
||||
[msg_save_failed]
|
||||
other = "Saving the configuration failed: %s"
|
||||
|
||||
[msg_load_failed]
|
||||
other = "Loading the configuration failed: %s"
|
||||
|
||||
# --- Steam enrollment wizard ---
|
||||
|
||||
[steam_step_credentials]
|
||||
other = "Enter your Steam account credentials. The password is sent encrypted with Steam's public RSA key and is never stored locally."
|
||||
|
||||
[steam_step_captcha]
|
||||
other = "Steam asked for a captcha. Open the image below and type the characters."
|
||||
|
||||
[steam_step_email]
|
||||
other = "Steam sent a verification code to %s. Enter it below."
|
||||
|
||||
[steam_step_activation]
|
||||
other = "Steam sent an SMS code to your phone. Enter it below to finish enrolling the authenticator."
|
||||
|
||||
[steam_step_done]
|
||||
other = "Enrollment complete. Write the revocation code down NOW — without it you cannot remove this authenticator from your Steam account."
|
||||
|
||||
[label_username]
|
||||
other = "Username"
|
||||
|
||||
[label_captcha_text]
|
||||
other = "Captcha"
|
||||
|
||||
[label_email_code]
|
||||
other = "Email code"
|
||||
|
||||
[label_activation_code]
|
||||
other = "Activation code (SMS)"
|
||||
|
||||
[label_revocation_code]
|
||||
other = "Revocation code"
|
||||
|
||||
[hint_captcha_loading]
|
||||
other = "Loading captcha image..."
|
||||
|
||||
[hint_captcha_failed]
|
||||
other = "Could not load captcha image: %s"
|
||||
|
||||
[btn_login]
|
||||
other = "Sign in"
|
||||
|
||||
[btn_continue]
|
||||
other = "Continue"
|
||||
|
||||
[btn_activate]
|
||||
other = "Activate"
|
||||
|
||||
[btn_finish]
|
||||
other = "Finish"
|
||||
|
||||
[btn_trades]
|
||||
other = "Trades"
|
||||
|
||||
[btn_refresh]
|
||||
other = "Refresh"
|
||||
|
||||
[btn_accept]
|
||||
other = "Accept"
|
||||
|
||||
[btn_reject]
|
||||
other = "Reject"
|
||||
|
||||
[msg_empty_username]
|
||||
other = "Please enter a username."
|
||||
|
||||
[msg_empty_password]
|
||||
other = "Please enter a password."
|
||||
|
||||
[msg_empty_captcha]
|
||||
other = "Please enter the captcha text."
|
||||
|
||||
[msg_empty_email_code]
|
||||
other = "Please enter the code from your email."
|
||||
|
||||
[msg_empty_activation_code]
|
||||
other = "Please enter the activation code from the SMS."
|
||||
|
||||
[msg_busy]
|
||||
other = "Working — please wait..."
|
||||
|
||||
# --- Steam trade confirmations window ---
|
||||
|
||||
[dialog_steam_trades_title]
|
||||
other = "Steam confirmations"
|
||||
|
||||
[steam_trades_empty]
|
||||
other = "No pending confirmations."
|
||||
|
||||
[steam_trades_loading]
|
||||
other = "Loading confirmations..."
|
||||
|
||||
[steam_trades_session_missing]
|
||||
other = "This Steam authenticator has no saved login session. Re-add it through the enrollment wizard before you can manage trade confirmations."
|
||||
|
||||
[steam_trades_error]
|
||||
other = "Failed to load confirmations: %s"
|
||||
|
||||
# --- Battle.Net paper-code restore ---
|
||||
|
||||
[dialog_restore_battlenet_title]
|
||||
other = "Restore Battle.Net Authenticator"
|
||||
|
||||
[battlenet_restore_intro]
|
||||
other = "Enter the serial number and the 10-character restore code you wrote down when first enrolling the authenticator. Anyone holding both can recover full account access — keep the code secret."
|
||||
|
||||
[label_restore_code]
|
||||
other = "Restore code"
|
||||
|
||||
[label_show_restore_code]
|
||||
other = "Show restore code"
|
||||
|
||||
[btn_restore]
|
||||
other = "Restore"
|
||||
|
||||
[msg_empty_restore_code]
|
||||
other = "Please enter the 10-character restore code."
|
||||
|
||||
[msg_restoring]
|
||||
other = "Restoring from Battle.Net..."
|
||||
|
||||
[msg_restore_failed]
|
||||
other = "Restore failed: %s"
|
||||
|
||||
# --- Legacy WinAuth XML import ---
|
||||
|
||||
[menu_import_legacy]
|
||||
other = "Import legacy WinAuth XML..."
|
||||
|
||||
[dialog_import_legacy_title]
|
||||
other = "Import legacy WinAuth config"
|
||||
|
||||
[import_legacy_intro]
|
||||
other = "Locate the winauth.xml from the original WinAuth (usually under %APPDATA%\\WinAuth). DPAPI-encrypted entries can only be decrypted on the same Windows account / machine that produced them. Imported entries are appended to your current list."
|
||||
|
||||
[label_import_path]
|
||||
other = "Path to winauth.xml"
|
||||
|
||||
[btn_import]
|
||||
other = "Import"
|
||||
|
||||
[msg_empty_import_path]
|
||||
other = "Please enter the path to winauth.xml."
|
||||
|
||||
[msg_legacy_password_required]
|
||||
other = "This file contains password-encrypted entries — enter the original WinAuth password."
|
||||
|
||||
[msg_legacy_password_wrong]
|
||||
other = "Wrong password for the legacy WinAuth file."
|
||||
|
||||
[msg_import_failed]
|
||||
other = "Import failed: %s"
|
||||
|
||||
# --- Hotkey configuration ---
|
||||
|
||||
[btn_hotkey]
|
||||
other = "Hotkey..."
|
||||
|
||||
[btn_clear_hotkey]
|
||||
other = "Clear hotkey"
|
||||
|
||||
[dialog_hotkey_title]
|
||||
other = "Edit hotkey"
|
||||
|
||||
[label_hotkey]
|
||||
other = "Hotkey"
|
||||
|
||||
[hotkey_intro]
|
||||
other = "Type a global keyboard shortcut for this entry, e.g. \"Ctrl+Alt+G\". Requires at least one modifier (Ctrl, Alt, Shift or Win). Pressing the shortcut anywhere on the desktop copies the OTP to the clipboard and types it into the foreground window."
|
||||
|
||||
# --- Misc UX ---
|
||||
|
||||
[btn_copy]
|
||||
other = "Copy"
|
||||
|
||||
[msg_copied]
|
||||
other = "Code copied to clipboard"
|
||||
|
||||
[msg_copy_failed]
|
||||
other = "Could not copy to clipboard"
|
||||
|
||||
[msg_empty_list]
|
||||
other = "No authenticators yet. Click \"Add\" to enroll one."
|
||||
|
||||
# --- QR scan dialog ---
|
||||
|
||||
[vendor_scan_qr]
|
||||
other = "Scan QR code (otpauth://)"
|
||||
|
||||
[dialog_scan_qr_title]
|
||||
other = "Scan otpauth QR code"
|
||||
|
||||
[qr_intro]
|
||||
other = "Either enter the path to a PNG/JPG containing the QR code, then click \"From file\". Or copy the QR image to the clipboard (Win+Shift+S works) and click \"From clipboard\"."
|
||||
|
||||
[label_qr_path]
|
||||
other = "Path to image file"
|
||||
|
||||
[btn_qr_from_file]
|
||||
other = "From file"
|
||||
|
||||
[btn_qr_from_clipboard]
|
||||
other = "From clipboard"
|
||||
|
||||
[msg_empty_qr_path]
|
||||
other = "Please enter a path to an image file, or use \"From clipboard\"."
|
||||
|
||||
[msg_qr_failed]
|
||||
other = "QR scan failed: %s"
|
||||
|
||||
[msg_clipboard_no_image]
|
||||
other = "Clipboard does not contain an image"
|
||||
Reference in New Issue
Block a user