Complete client UI i18n migration
Adds client-side i18n support, language settings, translated UI copy, and locale parity coverage.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import type { ComponentType } from "react";
|
||||
import { i18n } from "@/i18n/i18next";
|
||||
import type { PanelDescriptor, PanelIconProps } from "@/panels/panel-registry";
|
||||
|
||||
export function buildDraftPanelDescriptor(input: {
|
||||
@@ -7,11 +8,12 @@ export function buildDraftPanelDescriptor(input: {
|
||||
icon: ComponentType<PanelIconProps>;
|
||||
}): PanelDescriptor {
|
||||
const { icon, isCreating, pendingPrompt } = input;
|
||||
const creatingLabel = pendingPrompt?.trim() || "New Agent";
|
||||
const newAgentLabel = i18n.t("panels.draft.newAgent");
|
||||
const creatingLabel = pendingPrompt?.trim() || newAgentLabel;
|
||||
if (isCreating) {
|
||||
return {
|
||||
label: creatingLabel,
|
||||
subtitle: "Creating agent",
|
||||
subtitle: i18n.t("panels.draft.creatingAgent"),
|
||||
titleState: "ready",
|
||||
icon,
|
||||
statusBucket: "running",
|
||||
@@ -19,8 +21,8 @@ export function buildDraftPanelDescriptor(input: {
|
||||
}
|
||||
|
||||
return {
|
||||
label: "New Agent",
|
||||
subtitle: "New Agent",
|
||||
label: newAgentLabel,
|
||||
subtitle: newAgentLabel,
|
||||
titleState: "ready",
|
||||
icon,
|
||||
statusBucket: null,
|
||||
|
||||
Reference in New Issue
Block a user