diff --git a/internal/gui/assets/i18n.js b/internal/gui/assets/i18n.js index 6db662e4f..b82399d4c 100644 --- a/internal/gui/assets/i18n.js +++ b/internal/gui/assets/i18n.js @@ -3448,9 +3448,9 @@ const I18N = { "{n}/week": "{n}/周", "{n} downloads on npm last week": "上周在 npm 下载 {n} 次", "Didn't load": "加载失败", - "Also built in": "也有内置", - "magpie also signs in to this itself, for now; the plugin keeps it working if the built-in one is retired": "magpie 暂时也内置了此订阅;内置版下线后,插件可让它继续可用", - "magpie also signs in to this itself, for now; the plugin keeps it working if the built-in one is retired.": "magpie 暂时也内置了此订阅;内置版下线后,插件可让它继续可用。", + "Replaces built-in": "替代内置", + "magpie's own sign-in to this subscription is deprecated: this plugin takes its place, and accounts signed in there move to it": "magpie 内置的此订阅登录已弃用:由此插件接替,内置里登录的账号会迁到插件", + "magpie's own sign-in to this subscription is deprecated: this plugin takes its place, and accounts signed in there move to it.": "magpie 内置的此订阅登录已弃用:由此插件接替,内置里登录的账号会迁到插件。", "Search plugins and npm…": "搜索插件和 npm…", "Mirrors in China": "国内镜像", "Download the plugin list, plugins and Bun from mirrors in China first (npmmirror, jsDelivr), their official addresses after. Each is a copy of the very file, checked as the original is": "插件列表、插件和 Bun 优先从国内镜像(npmmirror、jsDelivr)下载,失败再用官方地址。镜像文件与官方相同,校验方式一致", @@ -7049,9 +7049,9 @@ const I18N = { "{n}/week": "{n}/週", "{n} downloads on npm last week": "上週在 npm 下載 {n} 次", "Didn't load": "載入失敗", - "Also built in": "也有內建", - "magpie also signs in to this itself, for now; the plugin keeps it working if the built-in one is retired": "magpie 暫時也內建了此訂閱;內建版下線後,外掛可讓它繼續可用", - "magpie also signs in to this itself, for now; the plugin keeps it working if the built-in one is retired.": "magpie 暫時也內建了此訂閱;內建版下線後,外掛可讓它繼續可用。", + "Replaces built-in": "取代內建", + "magpie's own sign-in to this subscription is deprecated: this plugin takes its place, and accounts signed in there move to it": "magpie 內建的此訂閱登入已棄用:由此外掛接替,內建裡登入的帳號會遷到外掛", + "magpie's own sign-in to this subscription is deprecated: this plugin takes its place, and accounts signed in there move to it.": "magpie 內建的此訂閱登入已棄用:由此外掛接替,內建裡登入的帳號會遷到外掛。", "Search plugins and npm…": "搜尋外掛和 npm…", "Mirrors in China": "國內鏡像", "Download the plugin list, plugins and Bun from mirrors in China first (npmmirror, jsDelivr), their official addresses after. Each is a copy of the very file, checked as the original is": "外掛列表、外掛和 Bun 優先從國內鏡像(npmmirror、jsDelivr)下載,失敗再用官方位址。鏡像檔案與官方相同,驗證方式一致", @@ -10672,9 +10672,9 @@ const I18N = { "{n}/week": "{n}/週", "{n} downloads on npm last week": "先週の npm でのダウンロード数 {n}", "Didn't load": "読み込めませんでした", - "Also built in": "内蔵版もあり", - "magpie also signs in to this itself, for now; the plugin keeps it working if the built-in one is retired": "現在は magpie 自体もこれにサインインできます。内蔵版が廃止されても、プラグインで引き続き使えます", - "magpie also signs in to this itself, for now; the plugin keeps it working if the built-in one is retired.": "現在は magpie 自体もこれにサインインできます。内蔵版が廃止されても、プラグインで引き続き使えます。", + "Replaces built-in": "内蔵版の後継", + "magpie's own sign-in to this subscription is deprecated: this plugin takes its place, and accounts signed in there move to it": "magpie 内蔵のこのサブスクリプションへのサインインは非推奨です。このプラグインが引き継ぎ、内蔵版でサインインしたアカウントはプラグインに移ります", + "magpie's own sign-in to this subscription is deprecated: this plugin takes its place, and accounts signed in there move to it.": "magpie 内蔵のこのサブスクリプションへのサインインは非推奨です。このプラグインが引き継ぎ、内蔵版でサインインしたアカウントはプラグインに移ります。", "Search plugins and npm…": "プラグインと npm を検索…", "Mirrors in China": "中国のミラー", "Download the plugin list, plugins and Bun from mirrors in China first (npmmirror, jsDelivr), their official addresses after. Each is a copy of the very file, checked as the original is": "プラグインリスト、プラグイン、Bun をまず中国のミラー(npmmirror、jsDelivr)から、次に公式のアドレスからダウンロードします。ミラーのものは同じファイルのコピーで、オリジナルと同じように検証されます", @@ -14308,9 +14308,9 @@ const I18N = { "{n}/week": "{n}/Woche", "{n} downloads on npm last week": "{n} Downloads auf npm letzte Woche", "Didn't load": "Nicht geladen", - "Also built in": "Auch integriert", - "magpie also signs in to this itself, for now; the plugin keeps it working if the built-in one is retired": "magpie meldet sich hier vorerst auch selbst an; die Erweiterung hält es am Laufen, falls die integrierte Anmeldung eingestellt wird", - "magpie also signs in to this itself, for now; the plugin keeps it working if the built-in one is retired.": "magpie meldet sich hier vorerst auch selbst an; die Erweiterung hält es am Laufen, falls die integrierte Anmeldung eingestellt wird.", + "Replaces built-in": "Ersetzt integrierte Anmeldung", + "magpie's own sign-in to this subscription is deprecated: this plugin takes its place, and accounts signed in there move to it": "Die integrierte Anmeldung von magpie für dieses Abo ist veraltet: Diese Erweiterung tritt an ihre Stelle, und dort angemeldete Konten ziehen zu ihr um", + "magpie's own sign-in to this subscription is deprecated: this plugin takes its place, and accounts signed in there move to it.": "Die integrierte Anmeldung von magpie für dieses Abo ist veraltet: Diese Erweiterung tritt an ihre Stelle, und dort angemeldete Konten ziehen zu ihr um.", "Search plugins and npm…": "Erweiterungen und npm durchsuchen…", "Mirrors in China": "Spiegel in China", "Download the plugin list, plugins and Bun from mirrors in China first (npmmirror, jsDelivr), their official addresses after. Each is a copy of the very file, checked as the original is": "Erweiterungsliste, Erweiterungen und Bun zuerst von Spiegeln in China (npmmirror, jsDelivr) laden, danach von den offiziellen Adressen. Jede ist eine Kopie genau derselben Datei und wird wie das Original geprüft", diff --git a/internal/gui/assets/plugins.js b/internal/gui/assets/plugins.js index a854b2bb3..0327aae8e 100644 --- a/internal/gui/assets/plugins.js +++ b/internal/gui/assets/plugins.js @@ -520,8 +520,8 @@ if (e?.error && !e.off) meta.append(el("span", "pm-chip bad", t("Didn't load"))); else if (e?.off) meta.append(el("span", "pm-chip", t("Off"))); if (l.replaces) { - const b = el("span", "pm-chip soft", t("Also built in")); - b.title = t("magpie also signs in to this itself, for now; the plugin keeps it working if the built-in one is retired"); + const b = el("span", "pm-chip soft", t("Replaces built-in")); + b.title = t("magpie's own sign-in to this subscription is deprecated: this plugin takes its place, and accounts signed in there move to it"); meta.append(b); } c.append(top, sum, meta); @@ -1384,7 +1384,7 @@ w.append(glyph(SHIELD, 12, 1.5), el("span", "", t(from, { owner: l.github.owner, topic }))); main.append(w); } - if (l.replaces) main.append(el("p", "pm-note", t("magpie also signs in to this itself, for now; the plugin keeps it working if the built-in one is retired."))); + if (l.replaces) main.append(el("p", "pm-note", t("magpie's own sign-in to this subscription is deprecated: this plugin takes its place, and accounts signed in there move to it."))); const readme = el("div", "pm-readme"); readme.append(el("div", "pm-rskel"), el("div", "pm-rskel short"), el("div", "pm-rskel")); main.append(readme); diff --git a/internal/gui/tests/plugin-market.test.cjs b/internal/gui/tests/plugin-market.test.cjs index f0089e5f9..576473b7f 100644 --- a/internal/gui/tests/plugin-market.test.cjs +++ b/internal/gui/tests/plugin-market.test.cjs @@ -98,10 +98,12 @@ function server(lang, asked) { const L = { en: { tab: "Plugins", ours: "Subscriptions", install: "Install", soon: "Coming soon", signIn: "Sign in", onNpm: "On npm", installed: "Installed", failed: /Didn't load: Cannot find module/, update: "Update", remove: "Remove", moreTile: "More in Plugins", - lookFor: "look for a plugin", week: "48k/week", readme: "Install", signing: "GitHub Copilot" }, + lookFor: "look for a plugin", week: "48k/week", readme: "Install", signing: "GitHub Copilot", + replaces: "Replaces built-in", replacesWhy: /sign-in to this subscription is deprecated: this plugin takes its place/ }, zh: { tab: "插件", ours: "订阅", install: "安装", soon: "即将上线", signIn: "登录", onNpm: "npm 上的插件", installed: "已安装", failed: /没有加载成功:Cannot find module/, update: "更新", remove: "移除", moreTile: "插件中还有更多", - lookFor: "找找插件", week: "48k/周", readme: "Install", signing: "GitHub Copilot" }, + lookFor: "找找插件", week: "48k/周", readme: "Install", signing: "GitHub Copilot", + replaces: "替代内置", replacesWhy: /此订阅登录已弃用:由此插件接替/ }, }; const shot = async (loc, name) => { @@ -145,6 +147,12 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium", assert.doesNotMatch(await view.innerText(), /OpenCode 社区|OpenCode's community/); assert.equal(await view.locator('.pm-card[data-pkg="@magpie-community/opencode-qoder-auth"] .pm-act').innerText(), w.soon); assert.ok(await view.locator('.pm-card[data-pkg="@magpie-community/opencode-qoder-auth"] .pm-act').isDisabled()); + // a plugin that takes a deprecated built-in's place says so, not + // that magpie still has it too (molvqingtai on Discord: a new + // user can't add the built-in at all) + const replaces = view.locator('.pm-card[data-pkg="@magpie-community/opencode-zed-auth"] .pm-chip.soft'); + assert.equal((await replaces.innerText()).trim(), w.replaces); + assert.match(await replaces.getAttribute("title"), w.replacesWhy); await shot(view, `plugins-discover-${engine}-${lang}`); await view.locator(".pm-find input").fill("copilot"); const copilot = view.locator('.pm-card[data-pkg="opencode-copilot-auth"]');