From a4fa7bbd8ceefee15e15b7944a2096b74aca5654 Mon Sep 17 00:00:00 2001 From: yetone Date: Fri, 16 Oct 2026 21:59:03 +0800 Subject: [PATCH] gui: "Waiting for a request" is a core word, and app.js's comment no longer says "New group" (#2586) i18n-keys' "a plugin's words are its own" was red on main 9b04c4e20: - 9b04c4e20 (#2118) uses "Waiting for a request" in plugins.js, as a gateway hook's idle state. Its translation was only in the Routing plugin's i18n.js, so with Routing off it showed in English. It moves to the core i18n.js in all four languages, beside the hook's other states ("Context injected" and the rest). Routing's empty list reads it from there. - 78827954f's comment at app.js:31 said "New group". The check matches substrings, so the comment reworded is enough. Run: i18n-keys is red on 9b04c4e20 and green with this. group-found-off, group-new-head, group-template, gui-zh-tw, gui-ja and gui-de all pass, in both engines. --- internal/gui/assets/app.js | 3 ++- internal/gui/assets/i18n.js | 4 ++++ internal/gui/assets/plugins/routing/i18n.js | 4 ---- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/internal/gui/assets/app.js b/internal/gui/assets/app.js index 695c88816..b75aed783 100644 --- a/internal/gui/assets/app.js +++ b/internal/gui/assets/app.js @@ -28,7 +28,8 @@ const GATEWAY_HIDES = ["agents", "library"]; // same either way. Whatever is marked data-feature-off="" is the // other way round, there only while its feature is off: where a page // says what went and turns it back on (bigbenniu on X: with routing -// groups off, the Routing page had no New group and said nothing of why). +// groups off, the Routing page offered no new group and said nothing of +// why). let featuresOff = new Set(window.bootPrefs?.featuresOff || []); const featureSel = () => [...featuresOff].map((id) => `[data-feature~="${id}"]`).join(","); const featureHides = (n) => { const sel = featureSel(); return !!sel && !!n?.closest(sel); }; diff --git a/internal/gui/assets/i18n.js b/internal/gui/assets/i18n.js index 1d3fd74b7..54d4e7940 100644 --- a/internal/gui/assets/i18n.js +++ b/internal/gui/assets/i18n.js @@ -9,6 +9,7 @@ const I18N = { "Request hook": "请求 Hook", "Gateway request hook": "网关请求 Hook", "Context injected": "已注入上下文", + "Waiting for a request": "等待请求", "No matching context": "没有匹配的上下文", "Scope not bound": "Scope 未绑定", "Authorization failed": "认证失败", @@ -3700,6 +3701,7 @@ const I18N = { "Request hook": "請求 Hook", "Gateway request hook": "閘道請求 Hook", "Context injected": "已注入上下文", + "Waiting for a request": "等待請求", "No matching context": "沒有符合的上下文", "Scope not bound": "Scope 未綁定", "Authorization failed": "認證失敗", @@ -7376,6 +7378,7 @@ const I18N = { "Request hook": "リクエストフック", "Gateway request hook": "ゲートウェイリクエストフック", "Context injected": "コンテキストを追加済み", + "Waiting for a request": "リクエストを待っています", "No matching context": "一致するコンテキストなし", "Scope not bound": "Scope が未設定", "Authorization failed": "認証に失敗", @@ -11054,6 +11057,7 @@ const I18N = { "Request hook": "Anfrage-Hook", "Gateway request hook": "Gateway-Anfrage-Hook", "Context injected": "Kontext eingefügt", + "Waiting for a request": "Warte auf eine Anfrage", "No matching context": "Kein passender Kontext", "Scope not bound": "Scope nicht verknüpft", "Authorization failed": "Authentifizierung fehlgeschlagen", diff --git a/internal/gui/assets/plugins/routing/i18n.js b/internal/gui/assets/plugins/routing/i18n.js index 6adef68fd..17f41105d 100644 --- a/internal/gui/assets/plugins/routing/i18n.js +++ b/internal/gui/assets/plugins/routing/i18n.js @@ -354,7 +354,6 @@ magpie.strings({ "the last {n} of {day}": "{day}最后的 {n} 个请求", "How the last request was routed": "最近一个请求是怎么路由的", "How the request at {time} was routed": "{time} 的请求是怎么路由的", - "Waiting for a request": "等待请求", "No request yet": "还没有请求", "Send one from any agent routed through magpie and it plays here as it happens: who routing put first and why, each try, and what each answered.": "经 magpie 的 Agent 发出请求后,这里实时播放:路由把谁排第一及原因、每次尝试和各自的回应。", "Every request an agent sends to magpie shows up here, routed for real.": "Agent 发给 magpie 的每个请求都会在此显示,均为真实路由。", @@ -873,7 +872,6 @@ magpie.strings({ "the last {n} of {day}": "{day}最後的 {n} 個請求", "How the last request was routed": "最近一個請求是怎麼路由的", "How the request at {time} was routed": "{time} 的請求是怎麼路由的", - "Waiting for a request": "等待請求", "No request yet": "還沒有請求", "Send one from any agent routed through magpie and it plays here as it happens: who routing put first and why, each try, and what each answered.": "經 magpie 的 Agent 發出請求後,這裡即時播放:路由把誰排第一及原因、每次嘗試和各自的回應。", "Every request an agent sends to magpie shows up here, routed for real.": "Agent 發給 magpie 的每個請求都會在此顯示,均為真實路由。", @@ -1390,7 +1388,6 @@ magpie.strings({ "the last {n} of {day}": "{day}の最後の {n} 件", "How the last request was routed": "直近のリクエストのルーティング", "How the request at {time} was routed": "{time} のリクエストのルーティング", - "Waiting for a request": "リクエストを待っています", "No request yet": "まだリクエストがありません", "Send one from any agent routed through magpie and it plays here as it happens: who routing put first and why, each try, and what each answered.": "magpie 経由でルーティングされる任意のエージェントからリクエストを送ると、ここでリアルタイムに再生されます。ルーティングが誰を最初にしたかとその理由、各試行、それぞれの応答。", "Every request an agent sends to magpie shows up here, routed for real.": "エージェントが magpie に送るすべてのリクエストが、実際にルーティングされてここに表示されます。", @@ -1909,7 +1906,6 @@ magpie.strings({ "the last {n} of {day}": "die letzten {n} vom {day}", "How the last request was routed": "Wie die letzte Anfrage weitergeleitet wurde", "How the request at {time} was routed": "Wie die Anfrage um {time} weitergeleitet wurde", - "Waiting for a request": "Warte auf eine Anfrage", "No request yet": "Noch keine Anfrage", "Send one from any agent routed through magpie and it plays here as it happens: who routing put first and why, each try, and what each answered.": "Senden Sie eine von einem beliebigen über magpie weitergeleiteten Agenten, und sie wird hier live abgespielt: wen die Weiterleitung an die Spitze gesetzt hat und warum, jeder Versuch und was jeweils geantwortet wurde.", "Every request an agent sends to magpie shows up here, routed for real.": "Jede Anfrage, die ein Agent an magpie sendet, erscheint hier, tatsächlich weitergeleitet.",