gui: fix plural forms and notice strings caught by CI e2e

Folder-count summary gets _one/_other; keyboard shortcuts register at commit
so early input isn't dropped during boot; restores main's copy for the
files-location help and the onboarding signed-in line.
This commit is contained in:
Rohit C Prasad
2026-08-28 21:13:13 -07:00
parent 086be2a1a6
commit 709a9bab90
4 changed files with 21 additions and 13 deletions
+5 -2
View File
@@ -1,4 +1,4 @@
import { useCallback, useEffect, useRef, useState, type PointerEvent } from "react"; import { useCallback, useEffect, useLayoutEffect, useRef, useState, type PointerEvent } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { import {
announceInboxUnlock, announceInboxUnlock,
@@ -347,7 +347,10 @@ export function App() {
navBeforePreview.current = null; navBeforePreview.current = null;
} }
}, []); }, []);
useEffect(() => { // Layout effect on purpose: a passive effect registers after paint, leaving a boot-splash
// window where the app is visible but ⌘B/⌘, are dead (input arriving right after load was
// dropped). Registering at commit closes that gap.
useLayoutEffect(() => {
const onKey = (e: KeyboardEvent) => { const onKey = (e: KeyboardEvent) => {
if ((e.metaKey || e.ctrlKey) && e.key.toLowerCase() === "b") { if ((e.metaKey || e.ctrlKey) && e.key.toLowerCase() === "b") {
e.preventDefault(); e.preventDefault();
+3 -1
View File
@@ -282,7 +282,9 @@ export function Onboarding({ onDone }: { onDone: (next?: "work" | "gallery" | "a
data-testid="ob-tools-signedin" data-testid="ob-tools-signedin"
> >
<span className="block text-[13px] font-semibold text-ok mb-0.5"> <span className="block text-[13px] font-semibold text-ok mb-0.5">
{t("onboarding.signed_in_as", { account: cloud.account ? ` ${cloud.account}` : "" })} {cloud.account
? t("onboarding.signed_in_as", { account: cloud.account })
: t("onboarding.signed_in")}
</span> </span>
<span className="block text-[13px] text-muted"> <span className="block text-[13px] text-muted">
{t("onboarding.signed_in_desc")} {t("onboarding.signed_in_desc")}
+7 -5
View File
@@ -313,7 +313,7 @@
"personas_intro": "Manage your coworkers and add new ones.", "personas_intro": "Manage your coworkers and add new ones.",
"scratch_placeholder": "~/OpenWorker", "scratch_placeholder": "~/OpenWorker",
"files_browse": "Browse…", "files_browse": "Browse…",
"files_help": "The scratch space where coworkers save produced files. Override per session.", "files_help": "Each conversation gets its own folder under this location. Existing conversations keep their current folder; you can grant access to more folders inside any conversation.",
"files_pick_folder": "Pick a folder", "files_pick_folder": "Pick a folder",
"files_save": "Save", "files_save": "Save",
"files_save_error": "Couldn't save.", "files_save_error": "Couldn't save.",
@@ -683,14 +683,15 @@
"channels_note": "The agent receives messages posted to these channels. Removing one stops this session from listening — the connector stays connected.", "channels_note": "The agent receives messages posted to these channels. Removing one stops this session from listening — the connector stays connected.",
"summary_no_sources": "no sources", "summary_no_sources": "no sources",
"summary_sources_more": "{{first}} +{{more}}", "summary_sources_more": "{{first}} +{{more}}",
"summary_folder_count": "{{count}} folders",
"summary_join": "{{sources}} · {{folder}}", "summary_join": "{{sources}} · {{folder}}",
"addfolder_path_placeholder": "Choose or paste a folder path…", "addfolder_path_placeholder": "Choose or paste a folder path…",
"allow_writes": "Allow writing (read-write)", "allow_writes": "Allow writing (read-write)",
"allow_writes_help": "When granted, the agent can read and write files in this folder.", "allow_writes_help": "When granted, the agent can read and write files in this folder.",
"cancel": "Cancel", "cancel": "Cancel",
"choose_location": "Choose location", "choose_location": "Choose location",
"channel_add_error": "Couldn't add that channel." "channel_add_error": "Couldn't add that channel.",
"summary_folder_count_one": "{{count}} folder",
"summary_folder_count_other": "{{count}} folders"
}, },
"root": { "root": {
"temporary_space": "Temporary folder", "temporary_space": "Temporary folder",
@@ -1244,7 +1245,7 @@
"opening_browser": "Opening browser…", "opening_browser": "Opening browser…",
"replay_hint": "Replay this setup anytime: Settings ▸ Appearance ▸ Run setup again.", "replay_hint": "Replay this setup anytime: Settings ▸ Appearance ▸ Run setup again.",
"sign_in": "Sign in", "sign_in": "Sign in",
"signed_in_as": "🎉 You're signed in{{account}}", "signed_in_as": "🎉 Youre signed in as {{account}}",
"signed_in_desc": "Connect a tool above with one click — or add them anytime later from the Connectors page.", "signed_in_desc": "Connect a tool above with one click — or add them anytime later from the Connectors page.",
"signin_band_desc": "OpenWorker handles the OAuth for 20+ tools — no dev consoles, no pasted keys. Tokens stay on this computer.", "signin_band_desc": "OpenWorker handles the OAuth for 20+ tools — no dev consoles, no pasted keys. Tokens stay on this computer.",
"signin_for_oneclick": "Sign in for one-click connections", "signin_for_oneclick": "Sign in for one-click connections",
@@ -1266,7 +1267,8 @@
"tool_hubspot_benefit": "Keep the CRM current", "tool_hubspot_benefit": "Keep the CRM current",
"tool_hubspot_detail": "HubSpot — update deals, log notes, prep calls.", "tool_hubspot_detail": "HubSpot — update deals, log notes, prep calls.",
"tool_attio_benefit": "Track every relationship", "tool_attio_benefit": "Track every relationship",
"tool_attio_detail": "Attio — search records, read timelines, log notes." "tool_attio_detail": "Attio — search records, read timelines, log notes.",
"signed_in": "🎉 Youre signed in"
}, },
"persona": { "persona": {
"about": "About", "about": "About",
+6 -5
View File
@@ -306,7 +306,7 @@
"personas_intro": "管理你的同事,并添加新同事。", "personas_intro": "管理你的同事,并添加新同事。",
"scratch_placeholder": "~/OpenWorker", "scratch_placeholder": "~/OpenWorker",
"files_browse": "浏览…", "files_browse": "浏览…",
"files_help": "同事保存产出文件的临时目录。可在每会话中覆盖。", "files_help": "每个会话都会在此位置下获得自己的文件夹。已有会话保留当前文件夹;你可以在任意会话中授予更多文件夹的访问权限。",
"files_pick_folder": "选择文件夹", "files_pick_folder": "选择文件夹",
"files_save": "保存", "files_save": "保存",
"files_save_error": "无法保存。", "files_save_error": "无法保存。",
@@ -673,14 +673,14 @@
"channels_note": "agent 会接收发布到这些频道的消息。移除一个会停止本会话的监听 —— 连接器保持连接。", "channels_note": "agent 会接收发布到这些频道的消息。移除一个会停止本会话的监听 —— 连接器保持连接。",
"summary_no_sources": "无来源", "summary_no_sources": "无来源",
"summary_sources_more": "{{first}} +{{more}}", "summary_sources_more": "{{first}} +{{more}}",
"summary_folder_count": "{{count}} 个文件夹",
"summary_join": "{{sources}} · {{folder}}", "summary_join": "{{sources}} · {{folder}}",
"addfolder_path_placeholder": "选择或粘贴文件夹路径…", "addfolder_path_placeholder": "选择或粘贴文件夹路径…",
"allow_writes": "允许写入(读写)", "allow_writes": "允许写入(读写)",
"allow_writes_help": "授予后,agent 可在该文件夹中读写文件。", "allow_writes_help": "授予后,agent 可在该文件夹中读写文件。",
"cancel": "取消", "cancel": "取消",
"choose_location": "选择位置", "choose_location": "选择位置",
"channel_add_error": "无法添加该频道。" "channel_add_error": "无法添加该频道。",
"summary_folder_count_other": "{{count}} 个文件夹"
}, },
"root": { "root": {
"temporary_space": "临时文件夹", "temporary_space": "临时文件夹",
@@ -1229,7 +1229,7 @@
"opening_browser": "正在打开浏览器…", "opening_browser": "正在打开浏览器…",
"replay_hint": "随时重放此设置:设置 ▸ 外观 ▸ 重新运行引导。", "replay_hint": "随时重放此设置:设置 ▸ 外观 ▸ 重新运行引导。",
"sign_in": "登录", "sign_in": "登录",
"signed_in_as": "🎉 你已登录{{account}}", "signed_in_as": "🎉 你已登录{{account}}",
"signed_in_desc": "上方任意工具一键连接 —— 或稍后随时在连接器页面添加。", "signed_in_desc": "上方任意工具一键连接 —— 或稍后随时在连接器页面添加。",
"signin_band_desc": "OpenWorker 代为处理 20+ 工具的 OAuth —— 无需开发者控制台、无需粘贴密钥。令牌保留在本机。", "signin_band_desc": "OpenWorker 代为处理 20+ 工具的 OAuth —— 无需开发者控制台、无需粘贴密钥。令牌保留在本机。",
"signin_for_oneclick": "登录即可一键连接", "signin_for_oneclick": "登录即可一键连接",
@@ -1251,7 +1251,8 @@
"tool_hubspot_benefit": "保持 CRM 数据最新", "tool_hubspot_benefit": "保持 CRM 数据最新",
"tool_hubspot_detail": "HubSpot —— 更新商机、记录笔记、准备通话。", "tool_hubspot_detail": "HubSpot —— 更新商机、记录笔记、准备通话。",
"tool_attio_benefit": "跟进每一段客户关系", "tool_attio_benefit": "跟进每一段客户关系",
"tool_attio_detail": "Attio —— 搜索记录、查看时间线、记录笔记。" "tool_attio_detail": "Attio —— 搜索记录、查看时间线、记录笔记。",
"signed_in": "🎉 你已登录"
}, },
"persona": { "persona": {
"about": "关于", "about": "关于",