Skip to content

A desktop coding agent with free access to frontier models.

TypeScript

fix: translate the quote and sub-agent model strings

ogsamrate732d01a11bd
diff --git a/apps/app/src/components/chat/message-list.tsx b/apps/app/src/components/chat/message-list.tsx
index 873d2eb6..8a7fd960 100644
--- a/apps/app/src/components/chat/message-list.tsx
+++ b/apps/app/src/components/chat/message-list.tsx
@@ -805,11 +805,11 @@ const UserMessage = React.memo(
<MessageTimestamp message={message} className="mr-1.5" />
<CopyMessageButton messages={[message]} />
{messageText ? (
- <MessageAction tooltip="Quote">
+ <MessageAction tooltip={t("message.quote")}>
<Button
variant="ghost"
size="icon"
- aria-label="Quote"
+ aria-label={t("message.quote")}
data-testid="quote-message"
onClick={() => quoteIntoComposer(sessionId, messageText)}
>
@@ -864,7 +864,7 @@ const UserMessage = React.memo(
{messageText ? (
<ContextMenuItem onClick={() => quoteIntoComposer(sessionId, window.getSelection()?.toString().trim() || messageText)}>
<TextQuote className="size-4" />
- Quote
+ {t("message.quote")}
</ContextMenuItem>
) : null}
{messageText ? (
@@ -1503,11 +1503,11 @@ function MessageGroup({
<div className="mx-auto flex w-full max-w-3xl flex-wrap items-center gap-2 px-2 opacity-0 transition-opacity duration-150 group-hover/message-group:opacity-100 max-lg:opacity-100 pointer-coarse:opacity-100 md:px-8">
<MessageActions className="flex gap-0">
<CopyMessageButton messages={renderableItems.map((item) => item.message)} />
- <MessageAction tooltip="Quote">
+ <MessageAction tooltip={t("message.quote")}>
<Button
variant="ghost"
size="icon"
- aria-label="Quote"
+ aria-label={t("message.quote")}
data-testid="quote-reply"
onClick={() => quoteIntoComposer(sessionId, getMessagesText([lastTextMessage]))}
>
diff --git a/apps/app/src/components/chat/selection-quote.tsx b/apps/app/src/components/chat/selection-quote.tsx
index f22bc59c..7c38c506 100644
--- a/apps/app/src/components/chat/selection-quote.tsx
+++ b/apps/app/src/components/chat/selection-quote.tsx
@@ -3,6 +3,7 @@ import { createPortal } from "react-dom"
import { TextQuote } from "lucide-react"
import { Button } from "@/components/ui/button"
+import { t } from "@/i18n"
import { quoteIntoComposer } from "./quote"
@@ -60,7 +61,7 @@ export function SelectionQuote({ sessionId, containerRef }: { sessionId: string;
}}
>
<TextQuote className="size-3.5" />
- Quote
+ {t("message.quote")}
</Button>,
document.body,
)
diff --git a/apps/app/src/i18n/locales/en.ts b/apps/app/src/i18n/locales/en.ts
index 9b67e522..588f94b6 100644
--- a/apps/app/src/i18n/locales/en.ts
+++ b/apps/app/src/i18n/locales/en.ts
@@ -2310,6 +2310,13 @@ export default {
"message.copied": "Copied!",
"message.edit": "Edit message",
"message.branch": "Branch in new chat",
+ "subagent.pinned_help": "One model per chat: sub-agents always run on their chat's model, at every nesting layer. Only their effort can be set.",
+ "subagent.pinned_label": "Sub-agents use this chat's model ({model})",
+ "subagent.pinned_label_plain": "Sub-agents use this chat's model",
+ "subagent.pinned_summary": "Chat's model · {effort}",
+ "subagent.effort_sign_in_hint": "Sign in to omnirush.ai to set the sub-agent effort.",
+ "subagent.each_chat_model": "Each chat's own model",
+ "message.quote": "Quote",
"message.reveal_in_folder": "Reveal in Finder",
"message.download": "Download",
"message.reconnecting": "Connection lost — reconnecting…",
diff --git a/apps/app/src/i18n/locales/zh.ts b/apps/app/src/i18n/locales/zh.ts
index 7e92a63b..e3010078 100644
--- a/apps/app/src/i18n/locales/zh.ts
+++ b/apps/app/src/i18n/locales/zh.ts
@@ -2316,6 +2316,13 @@ export default {
"message.copied": "已复制!",
"message.edit": "编辑消息",
"message.branch": "在新会话中分支",
+ "subagent.pinned_help": "每个会话一个模型:子智能体始终使用其所在会话的模型(任意嵌套层级),只能设置推理强度。",
+ "subagent.pinned_label": "子智能体使用此会话的模型({model})",
+ "subagent.pinned_label_plain": "子智能体使用此会话的模型",
+ "subagent.pinned_summary": "会话模型 · {effort}",
+ "subagent.effort_sign_in_hint": "登录 omnirush.ai 后即可设置子智能体的推理强度。",
+ "subagent.each_chat_model": "各会话自己的模型",
+ "message.quote": "引用",
"message.reveal_in_folder": "在文件夹中显示",
"message.download": "下载",
"message.reconnecting": "连接已断开,正在重新连接…",
diff --git a/apps/app/src/react-app/domains/session/surface/composer/subagent-model-menu.tsx b/apps/app/src/react-app/domains/session/surface/composer/subagent-model-menu.tsx
index c3666193..13b8347a 100644
--- a/apps/app/src/react-app/domains/session/surface/composer/subagent-model-menu.tsx
+++ b/apps/app/src/react-app/domains/session/surface/composer/subagent-model-menu.tsx
@@ -16,7 +16,7 @@ import {
} from "@/components/ui/dropdown-menu";
import { useDesktopRestriction } from "@/react-app/domains/cloud/desktop-config-provider";
import {
- SUBAGENT_MODEL_PINNED_HELP,
+ subagentModelPinnedHelp,
subagentEffortLabel,
subagentEffortOptions,
subagentPinnedLabel,
@@ -102,7 +102,7 @@ function SubagentModelPicker(props: { client: SubagentModelClient; chatModel: st
</DropdownMenuRadioGroup>
</DropdownMenuGroup>
<DropdownMenuSeparator />
- <p className="px-3 py-2 text-xs text-muted-foreground">{SUBAGENT_MODEL_PINNED_HELP}</p>
+ <p className="px-3 py-2 text-xs text-muted-foreground">{subagentModelPinnedHelp()}</p>
{props.policyLocked ? <p role="status" className="px-3 pb-2 text-xs text-muted-foreground">{t("subagent.policy_lock")}</p> : null}
{error ? <p role="alert" className="px-3 pb-2 text-xs text-destructive">{error}</p> : null}
</DropdownMenuContent>
diff --git a/apps/app/src/react-app/domains/settings/subagent-model-settings.tsx b/apps/app/src/react-app/domains/settings/subagent-model-settings.tsx
index f85eac62..310d8e3f 100644
--- a/apps/app/src/react-app/domains/settings/subagent-model-settings.tsx
+++ b/apps/app/src/react-app/domains/settings/subagent-model-settings.tsx
@@ -19,7 +19,7 @@ import {
LayoutSectionItemTitle,
} from "./settings-layout";
import {
- SUBAGENT_MODEL_PINNED_HELP,
+ subagentModelPinnedHelp,
subagentEffortLabel,
subagentEffortOptions,
subagentPinnedSummary,
@@ -53,7 +53,7 @@ export function SubagentModelSettings(props: { client: SubagentModelClient | nul
const status = policyLocked
? t("subagent.policy_lock")
: state && !state.signedIn
- ? "Sign in to omnirush.ai to set the sub-agent effort."
+ ? t("subagent.effort_sign_in_hint")
: error;
return (
@@ -62,12 +62,12 @@ export function SubagentModelSettings(props: { client: SubagentModelClient | nul
<LayoutSectionItemHeader>
<LayoutSectionItemTitle>{t("subagent.model_label")}</LayoutSectionItemTitle>
<LayoutSectionItemDescription>
- {SUBAGENT_MODEL_PINNED_HELP}
+ {subagentModelPinnedHelp()}
{status ? <span className="mt-1 block" data-testid="subagent-model-status">{status}</span> : null}
</LayoutSectionItemDescription>
<LayoutSectionItemHeaderActions>
{/* Not a choice: a chat keeps one model, its sub-agents' too (model-modes.ts). */}
- <span className="w-56 max-w-full text-sm text-muted-foreground" aria-disabled="true" data-testid="settings-subagent-model-pinned">Each chat's own model</span>
+ <span className="w-56 max-w-full text-sm text-muted-foreground" aria-disabled="true" data-testid="settings-subagent-model-pinned">{t("subagent.each_chat_model")}</span>
</LayoutSectionItemHeaderActions>
</LayoutSectionItemHeader>
</LayoutSectionItem>
diff --git a/apps/app/src/react-app/domains/settings/subagent-model.ts b/apps/app/src/react-app/domains/settings/subagent-model.ts
index 83fa4bda..21692500 100644
--- a/apps/app/src/react-app/domains/settings/subagent-model.ts
+++ b/apps/app/src/react-app/domains/settings/subagent-model.ts
@@ -78,17 +78,18 @@ export function subagentModelUnavailable(state: OmniRushSubagentModelState | und
}
/** One model per chat (model-modes.ts): sub-agents always run on their chat's model; only their effort is a setting. */
-export const SUBAGENT_MODEL_PINNED_HELP =
- "One model per chat: sub-agents always run on their chat's model, at every nesting layer. Only their effort can be set.";
+export function subagentModelPinnedHelp(): string {
+ return t("subagent.pinned_help");
+}
/** "Sub-agents use this chat's model (GPT 6 Astra)". */
export function subagentPinnedLabel(state: OmniRushSubagentModelState | undefined, chatModel: string | null): string {
- return chatModel ? `Sub-agents use this chat's model (${subagentModelName(state, chatModel)})` : "Sub-agents use this chat's model";
+ return chatModel ? t("subagent.pinned_label", { model: subagentModelName(state, chatModel) }) : t("subagent.pinned_label_plain");
}
/** What applies to sub-agents now that their model is the chat's: "Same as main agent" or "Chat's model · Low". */
export function subagentPinnedSummary(effort: string | null): string {
- return effort ? `Chat's model · ${formatGenericBehaviorLabel(effort)}` : SAME_AS_MAIN_LABEL;
+ return effort ? t("subagent.pinned_summary", { effort: formatGenericBehaviorLabel(effort) }) : t("subagent.same_as_main");
}
/** The server's setting and catalog, loaded once per server, and the action that saves a change. */