Found while converging the server-action dispatch for #2904 (not fixed there — copy/i18n decision, and the strings are user-facing).
AGENTS.md Commandment #-1 requires all user-facing text to be English. The opensInNewTab choreography ships hard-coded bilingual copy:
- the pre-opened SSO spinner tab:
<title>正在打开… Opening…</title> and body text 正在为你打开环境…;
- the popup-blocked toast:
浏览器拦截了弹窗 / Popup blocked, description 点击在新标签页打开环境, action label 打开环境.
Historically this lived in two hand-rolled copies (useConsoleActionRuntime.serverActionHandler and RecordDetailView); since #2904 it is consolidated in ONE place — packages/app-shell/src/utils/consoleServerAction.ts — so the fix is now a single edit: route the strings through @object-ui/i18n (useObjectTranslation) or at minimum make them English-only literals per the commandment.
Note the wrapper is a plain function (not a hook), so i18n plumbing needs the t function injected via its options, or the copy hoisted to the call sites that have hook access.
Refs #2904.
Found while converging the server-action dispatch for #2904 (not fixed there — copy/i18n decision, and the strings are user-facing).
AGENTS.md Commandment #-1 requires all user-facing text to be English. The
opensInNewTabchoreography ships hard-coded bilingual copy:<title>正在打开… Opening…</title>and body text正在为你打开环境…;浏览器拦截了弹窗 / Popup blocked, description点击在新标签页打开环境, action label打开环境.Historically this lived in two hand-rolled copies (
useConsoleActionRuntime.serverActionHandlerandRecordDetailView); since #2904 it is consolidated in ONE place —packages/app-shell/src/utils/consoleServerAction.ts— so the fix is now a single edit: route the strings through@object-ui/i18n(useObjectTranslation) or at minimum make them English-only literals per the commandment.Note the wrapper is a plain function (not a hook), so i18n plumbing needs the
tfunction injected via its options, or the copy hoisted to the call sites that have hook access.Refs #2904.