diff --git a/internal/gui/assets/app.js b/internal/gui/assets/app.js index cc33e4978..a6510476a 100644 --- a/internal/gui/assets/app.js +++ b/internal/gui/assets/app.js @@ -6241,7 +6241,7 @@ function renderProviders() { let key; if (p.account && lapsed) { key = el("span", "key acct none", t("Signed out")); - key.title = t("Signed out — add this account again to use it"); + key.title = t("Signed out — choose Sign in again on this account under Providers"); } else if (p.account) { // the row names the vendor: a plan too long for the pill goes without it const plan = accountPlan(p.account), bare = plan.startsWith(p.name + " ") ? plan.slice(p.name.length + 1) : ""; @@ -13499,7 +13499,9 @@ function loginUsageOf(agent) { const SIGN_IN_GONE = /sign-in has (expired|lapsed)|sign in again/i; function quotaError(err, q) { - if (/sign-in has expired/.test(err)) return t("Signed out — add this account again to use it"); + // signed in again in place, settings kept, from the row's Sign in again + // (blue12345655 on Discord looked for a way to add it again, found none) + if (/sign-in has expired/.test(err)) return t("Signed out — choose Sign in again on this account under Providers"); // a Copilot account GitHub refused the token of (copilot_lapsed.go), as // its row says it, in English or already in the user's language const copilotLapsed = "GitHub refused this Copilot sign-in; sign in again"; diff --git a/internal/gui/assets/i18n.js b/internal/gui/assets/i18n.js index f9c57db31..1b4b960f5 100644 --- a/internal/gui/assets/i18n.js +++ b/internal/gui/assets/i18n.js @@ -2955,7 +2955,7 @@ const I18N = { "Reset time passed {when}": "重置时间已过 {when}", "Hide allowances": "收起额度", "Show allowances": "展开额度", - "Signed out — add this account again to use it": "登录已失效,请重新添加此账号", + "Signed out — choose Sign in again on this account under Providers": "已退出登录 — 请在「供应商」中此账号上选择「重新登录」", "Needs a Google Cloud project — hover for how": "需要指定 Google Cloud 项目,悬停查看方法", "Google no longer serves personal accounts to Gemini CLI — hover for more": "Google 已停止向个人账号提供 Gemini CLI,悬停查看详情", "Google has suspended this account — hover for details": "此账号已被 Google 停用,悬停查看详情", @@ -7046,7 +7046,7 @@ const I18N = { "Reset time passed {when}": "重置時間已過 {when}", "Hide allowances": "收起額度", "Show allowances": "展開額度", - "Signed out — add this account again to use it": "登入已失效,請重新新增此帳號", + "Signed out — choose Sign in again on this account under Providers": "已登出 — 請在「供應商」中此帳號上選擇「重新登入」", "Needs a Google Cloud project — hover for how": "需要指定 Google Cloud 專案,懸停檢視方法", "Google no longer serves personal accounts to Gemini CLI — hover for more": "Google 已停止向個人帳號提供 Gemini CLI,懸停檢視詳情", "Google has suspended this account — hover for details": "此帳號已被 Google 停用,懸停檢視詳情", @@ -11142,7 +11142,7 @@ const I18N = { "Reset time passed {when}": "リセット時刻を過ぎました({when})", "Hide allowances": "利用枠を隠す", "Show allowances": "利用枠を表示", - "Signed out — add this account again to use it": "サインアウトされました — 使うにはこのアカウントを再度追加してください", + "Signed out — choose Sign in again on this account under Providers": "サインアウトされました — 「プロバイダ」でこのアカウントの「再度サインイン」を選んでください", "Needs a Google Cloud project — hover for how": "Google Cloud プロジェクトが必要です — ホバーで手順を表示", "Google no longer serves personal accounts to Gemini CLI — hover for more": "Google は Gemini CLI での個人アカウントの提供を終了しました — ホバーで詳細を表示", "Google has suspended this account — hover for details": "このアカウントは Google により停止されています — ホバーで詳細を表示", @@ -15248,7 +15248,7 @@ const I18N = { "Reset time passed {when}": "Rücksetzzeitpunkt {when} überschritten", "Hide allowances": "Kontingente ausblenden", "Show allowances": "Kontingente anzeigen", - "Signed out — add this account again to use it": "Abgemeldet – fügen Sie dieses Konto erneut hinzu, um es zu nutzen", + "Signed out — choose Sign in again on this account under Providers": "Abgemeldet – wählen Sie unter „Anbieter“ bei diesem Konto „Erneut anmelden“", "Needs a Google Cloud project — hover for how": "Benötigt ein Google-Cloud-Projekt – für Anleitung darüberfahren", "Google no longer serves personal accounts to Gemini CLI — hover for more": "Google bedient private Konten nicht mehr über Gemini CLI – für mehr darüberfahren", "Google has suspended this account — hover for details": "Google hat dieses Konto gesperrt – für Details darüberfahren", diff --git a/internal/gui/tests/plugin-quota-error.test.cjs b/internal/gui/tests/plugin-quota-error.test.cjs index 545a51892..796da57c0 100644 --- a/internal/gui/tests/plugin-quota-error.test.cjs +++ b/internal/gui/tests/plugin-quota-error.test.cjs @@ -63,7 +63,16 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium", assert.ok(long.length < 220, long); // magpie's own errors keep their words: a plugin error it knows is // still said its way, and one that isn't the plugin's stays generic - assert.equal(await page.evaluate(() => quotaError("your sign-in has expired", { pluginError: true })), await page.evaluate(() => t("Signed out — add this account again to use it"))); + const out = await page.evaluate(() => quotaError("your sign-in has expired", { pluginError: true })); + assert.equal(out, await page.evaluate(() => t("Signed out — choose Sign in again on this account under Providers"))); + // a signed-out account is signed in again in place, so the words name + // the row's own button and the page it is on, never "add it again" + // (blue12345655 on Discord: Command Code signed out, no 重新登录 found) + for (const word of await page.evaluate(() => [t("Sign in again"), t("Providers")])) assert.ok(out.includes(word), `${lang}: ${out} names ${word}`); + assert.ok(!/add this account again/.test(out), out); + // so do Command Code's and Devin's plugins, in their own words + for (const e of ["Command Code's sign-in has expired; sign in again", "Devin's sign-in has expired — sign in again"]) + assert.equal(await page.evaluate((e) => quotaError(e, { pluginError: true }), e), out); assert.equal(await page.evaluate((w) => quotaError(w, { error: w }), why), generic); assert.equal(await page.evaluate((w) => quotaError(w), why), generic); assert.deepEqual(errors, []);