From 607055b75e1e27721506e22848a3d74a6bd9a5f8 Mon Sep 17 00:00:00 2001 From: "Orca (ecs-claude)" Date: Fri, 14 Aug 2026 00:40:20 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20remove=20Chinese=20from=20the=20repo?= =?UTF-8?q?=20=E2=80=94=20English=20UI=20strings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The updater button and its status/log strings were hardcoded in Traditional Chinese, so the shipped app showed a Chinese "檢查更新" button. Translate all user-facing strings to English and de-CJK the one remaining source occurrence. - console (main.ts / index.html): the topbar update button and every updater status + activity-log string are now English ("Check for updates", "Checking…", "Update to vX ↻", "Up to date", "New version … available", "Update check/install failed: …"). - src-tauri: doc comment referencing the button. - oabctl: the unicode-sanitization test's alias switched from CJK to a Latin accented sample ("botéé"); same non-ASCII count, so the assertion is unchanged. Repo-wide scan (\p{Han} + CJK punctuation/kana) is now clean. Co-Authored-By: Claude Opus 4.8 --- console/index.html | 2 +- console/src/main.ts | 22 +++++++++++----------- crates/oabctl/src/scale.rs | 2 +- src-tauri/src/lib.rs | 2 +- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/console/index.html b/console/index.html index 84f4aba..b2f33a9 100644 --- a/console/index.html +++ b/console/index.html @@ -14,7 +14,7 @@
- +
diff --git a/console/src/main.ts b/console/src/main.ts index 35a098f..7034cdd 100644 --- a/console/src/main.ts +++ b/console/src/main.ts @@ -239,7 +239,7 @@ async function startCore(): Promise { } } -// Remote upgrade: the topbar "檢查更新" button. First click checks the nightly +// Remote upgrade: the topbar "Check for updates" button. First click checks the nightly // release; if a newer signed build exists, the button turns into an install // action that downloads, verifies, and restarts into it. Desktop-only — hidden // in the browser build (no command bridge). @@ -257,28 +257,28 @@ function setupUpdater(): void { const reset = (): void => { pending = null; - el.textContent = "檢查更新"; + el.textContent = "Check for updates"; el.classList.remove("has-update"); }; async function check(btn: HTMLButtonElement, inv: Invoke): Promise { btn.disabled = true; - btn.textContent = "檢查中…"; + btn.textContent = "Checking…"; try { const info = await inv("check_update"); if (info) { pending = info; - btn.textContent = `更新到 v${info.version} ↻`; + btn.textContent = `Update to v${info.version} ↻`; btn.classList.add("has-update"); - note("info", `發現新版 v${info.version}(目前 v${info.current})— 按按鈕安裝並重啟`); + note("info", `New version v${info.version} available (current v${info.current}) — click to install and restart`); } else { - note("info", "已是最新版"); - btn.textContent = "已是最新版"; + note("info", "Already up to date"); + btn.textContent = "Up to date"; window.setTimeout(reset, 4000); } } catch (e) { reset(); - note("error", `檢查更新失敗:${errText(e)}`); + note("error", `Update check failed: ${errText(e)}`); } finally { btn.disabled = false; } @@ -286,14 +286,14 @@ function setupUpdater(): void { async function install(btn: HTMLButtonElement, inv: Invoke): Promise { btn.disabled = true; - btn.textContent = "安裝中…"; + btn.textContent = "Installing…"; try { // On success the backend restarts the app, so this may never resolve. await inv("install_update"); } catch (e) { btn.disabled = false; - btn.textContent = pending ? `更新到 v${pending.version} ↻` : "檢查更新"; - note("error", `安裝更新失敗:${errText(e)}`); + btn.textContent = pending ? `Update to v${pending.version} ↻` : "Check for updates"; + note("error", `Update install failed: ${errText(e)}`); } } diff --git a/crates/oabctl/src/scale.rs b/crates/oabctl/src/scale.rs index 77765a3..f7cd390 100644 --- a/crates/oabctl/src/scale.rs +++ b/crates/oabctl/src/scale.rs @@ -617,7 +617,7 @@ mod tests { #[test] fn test_schedule_name_sanitization_unicode() { // Unicode chars are NOT valid in AWS schedule names — replaced with '-' - let alias = "bot名前"; + let alias = "botéé"; let safe_alias = alias.replace( |c: char| !c.is_ascii_alphanumeric() && c != '-' && c != '_' && c != '.', "-", diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index 9a832e8..2f6033e 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -179,7 +179,7 @@ struct UpdateInfo { } /// Ask the release endpoint whether a newer signed build exists. Returns `None` -/// when we're already current. Drives the topbar "檢查更新" button. +/// when we're already current. Drives the topbar "Check for updates" button. #[tauri::command] async fn check_update(app: tauri::AppHandle) -> Result, String> { let updater = app.updater().map_err(|e| e.to_string())?;