diff --git a/.changeset/34903-flow-designer-label-translations.md b/.changeset/34903-flow-designer-label-translations.md new file mode 100644 index 00000000000..5cf99c2a020 --- /dev/null +++ b/.changeset/34903-flow-designer-label-translations.md @@ -0,0 +1,15 @@ +--- +'@object-ui/app-shell': patch +'@object-ui/i18n': patch +--- + +fix(app-shell): the Studio flow designer shows a package's translated flow label and approval-step labels + +Clause-②: yes +Metadata-protocol: none + +A package can translate a flow's label (`flows..label`) and an approval step's label (`flows..approvals..label`). The flow runner already used both. The Studio flow designer ignored them, so a zh-CN admin saw the authored English flow name and step names. The designer now reads the same bundle the runner reads, through the spec's `translateFlow`, in the viewer's language. The automation header names the flow by its translation. Approval nodes show their translated step label on the canvas (nested ones included) and in the inspector header. The inspector also shows the authored label on a second line ("Authored label: …"), because Studio is where that label is edited. With no translation, every label shows as authored, as before. The draft is never rewritten with a translation. + +The spec has no key for a decision or other node's label, or for an edge label, so those still show the authored text. + +`@object-ui/i18n` gains one lazy `studio`-namespace key, `engine.inspector.flowNode.sourceLabel` (en and zh). The eager `locales/en.ts` pack is unchanged. diff --git a/ui/packages/app-shell/src/views/metadata-admin/previews/FlowCanvas.test.tsx b/ui/packages/app-shell/src/views/metadata-admin/previews/FlowCanvas.test.tsx index 364e815a31f..9bfdf5792a1 100644 --- a/ui/packages/app-shell/src/views/metadata-admin/previews/FlowCanvas.test.tsx +++ b/ui/packages/app-shell/src/views/metadata-admin/previews/FlowCanvas.test.tsx @@ -8,6 +8,18 @@ import { extractRegions, NODE_H } from './flow-canvas-layout'; import { predictExpandedNodeHeight } from './flow-region-metrics'; import type { FlowProblem } from './flow-problems'; import { browserClick, browserDrag } from './__tests__/browserClick'; +// FlowPreview reaches a dynamic `import('@objectstack/lint')`; pay its load at collection, not in a test's clock. +import '@objectstack/lint'; +import { createI18n, I18nProvider, transformSpecTranslations } from '@object-ui/i18n'; +import type { TranslationData } from '@objectstack/spec/system'; +import { FlowPreview, FlowSelectionTitle, flowSelectionHeading } from './FlowPreview'; +import { + FlowLabelTranslationsProvider, + flowLabelTranslations, + useFlowLabelTranslations, + type FlowLabelTranslations, +} from './flow-label-translations'; +import { activeFlowsBundle } from '../../../utils/flowsBundle'; afterEach(cleanup); @@ -596,3 +608,128 @@ describe('FlowCanvas — a node press on a read-only design canvas selects, and expect(onPatch).not.toHaveBeenCalled(); }); }); + + +/** + * The flow designer reads a package's `flows` translations: the flow's label + * (`flows..label`) and an approval node's step label + * (`flows..approvals..label`), in the viewer's language, from + * the bundle `FlowRunner` reads. A decision node and an edge have no key, so + * they stay authored; with no translation everything is authored, as before. + */ +describe('Flow designer — package label translations (flows..label, approvals..label)', () => { + const ZH_CN: TranslationData = { + flows: { + opportunity_approval: { + label: '大额商机审批', + approvals: { manager_review: { label: '经理审核' }, director_signoff: { label: '总监签批' } }, + }, + }, + }; + const NODES = [ + { id: 'start', type: 'start', label: 'Start' }, + { id: 'manager_review', type: 'approval', label: 'Manager review' }, + { id: 'big', type: 'decision', label: 'Over 1M?' }, + { + id: 'each', + type: 'loop', + label: 'For each signer', + config: { body: { nodes: [{ id: 'director_signoff', type: 'approval', label: 'Director sign-off' }], edges: [] } }, + }, + ]; + const EDGES = [ + { source: 'start', target: 'manager_review' }, + { source: 'manager_review', target: 'big', label: 'approve' }, + { source: 'big', target: 'each', label: 'Yes, over 1M' }, + ]; + const DRAFT = { name: 'opportunity_approval', label: 'Large Deal Approval', nodes: NODES, edges: EDGES }; + + function zhInstance() { + const instance = createI18n({ defaultLanguage: 'zh-CN', detectBrowserLanguage: false }); + instance.addResourceBundle('zh-CN', 'translation', transformSpecTranslations(ZH_CN as Record), true, true); + return instance; + } + const zh = (): FlowLabelTranslations => { + const t = flowLabelTranslations(activeFlowsBundle(zhInstance(), 'zh-CN', 'opportunity_approval'), 'opportunity_approval', 'zh-CN'); + expect(t).toBeDefined(); + return t!; + }; + + it('resolves the flow label and approval-step labels out of the loaded resource tree, and nothing else', () => { + const t = zh(); + expect(t.flowLabel).toBe('大额商机审批'); + expect(t.stepLabel({ id: 'manager_review', type: 'approval' })).toBe('经理审核'); + expect(t.stepLabel({ id: 'director_signoff', type: 'approval' })).toBe('总监签批'); + // No key for any other node type, even under an approval's id. + expect(t.stepLabel({ id: 'manager_review', type: 'decision' })).toBeUndefined(); + expect(t.stepLabel({ id: 'unknown_step', type: 'approval' })).toBeUndefined(); + // No bundle for the flow: nothing to translate with. + expect(flowLabelTranslations(activeFlowsBundle(zhInstance(), 'zh-CN', 'other_flow'), 'other_flow', 'zh-CN')).toBeUndefined(); + }); + + it('useFlowLabelTranslations reads the console provider’s active language', () => { + let seen: FlowLabelTranslations | undefined; + function Probe() { + seen = useFlowLabelTranslations('opportunity_approval'); + return null; + } + render( + + + , + ); + expect(seen?.flowLabel).toBe('大额商机审批'); + expect(seen?.stepLabel({ id: 'manager_review', type: 'approval' })).toBe('经理审核'); + }); + + it('draws the translated approval-step labels on the canvas, nested ones included; decision and branch-edge labels stay authored', () => { + const { container } = render( + + {}} /> + , + ); + const card = (id: string) => container.querySelector(`[data-node-id="${id}"]`) as HTMLElement; + expect(card('manager_review').textContent).toContain('经理审核'); + expect(card('manager_review').textContent).not.toContain('Manager review'); + expect(card('big').textContent).toContain('Over 1M?'); + // A decision branch's authored edge label has no package key, so it stays as written. (An approval's + // `approve` / `reject` outcome pills are the designer's own vocabulary, not the package bundle's.) + expect(screen.getByText('Yes, over 1M')).toBeInTheDocument(); + fireEvent.click(screen.getByRole('button', { name: 'Expand nested regions' })); + expect(card('each').textContent).toContain('总监签批'); + expect(card('each').textContent).not.toContain('Director sign-off'); + }); + + it('with no translation the canvas draws the authored labels, as before', () => { + const { container } = render( + {}} />, + ); + expect((container.querySelector('[data-node-id="manager_review"]') as HTMLElement).textContent).toContain('Manager review'); + }); + + it('FlowPreview hands the bundle in from the console provider', () => { + vi.stubGlobal('fetch', vi.fn(async () => new Response('not found', { status: 404 }))); + const { container } = render( + + {}} /> + , + ); + expect((container.querySelector('[data-node-id="manager_review"]') as HTMLElement).textContent).toContain('经理审核'); + }); + + it('the inspector header titles an approval step by its translation and shows the authored label beside it', () => { + const t = zh(); + const top = flowSelectionHeading(DRAFT, { kind: 'node', id: 'manager_review' }, undefined, t); + expect(top).toMatchObject({ title: '经理审核', source: 'Manager review' }); + render(); + expect(screen.getByText('经理审核')).toBeInTheDocument(); + expect(screen.getByTestId('flow-selection-source').textContent).toContain('Manager review'); + // A decision node has no key: authored title, no source line. + const decision = flowSelectionHeading(DRAFT, { kind: 'node', id: 'big' }, undefined, t); + expect(decision.title).toBe('Over 1M?'); + expect(decision).not.toHaveProperty('source'); + // No translations: exactly as before. + expect(flowSelectionHeading(DRAFT, { kind: 'node', id: 'manager_review' })).not.toHaveProperty('source'); + expect(flowSelectionHeading(DRAFT, { kind: 'node', id: 'manager_review' }).title).toBe('Manager review'); + }); +}); diff --git a/ui/packages/app-shell/src/views/metadata-admin/previews/FlowCanvas.tsx b/ui/packages/app-shell/src/views/metadata-admin/previews/FlowCanvas.tsx index 519ce2a6a4e..00e1e5f5135 100644 --- a/ui/packages/app-shell/src/views/metadata-admin/previews/FlowCanvas.tsx +++ b/ui/packages/app-shell/src/views/metadata-admin/previews/FlowCanvas.tsx @@ -38,6 +38,7 @@ import { AlertCircle, AlertTriangle, Maximize2, Plus, ZoomIn, ZoomOut } from 'lu import { cn } from '@object-ui/components'; import { uniqueId, appendArray, spliceArray } from '../inspectors/_shared.js'; import { t as tr, tFormat } from '../i18n.js'; +import { useFlowLabelTranslationsContext } from './flow-label-translations.js'; import { computeLayoutWithGeometry, NODE_W, @@ -218,6 +219,8 @@ export function FlowCanvas({ // has an index signature). Same reference when nothing needed migrating, so // the memos keyed on `nodes` are unaffected. const nodes = React.useMemo(() => withCanonicalGeometry(storedNodes), [storedNodes]); + // An approval step's label in the viewer's language, where the package translates it. + const labelTranslations = useFlowLabelTranslationsContext(); const viewportRef = React.useRef(null); // objectui#11795 — the viewport width the diagram was last framed at (the @@ -1294,7 +1297,7 @@ export function FlowCanvas({ id={node.id} locale={locale} type={node.type} - label={node.label || node.id} + label={labelTranslations?.stepLabel(node) ?? (node.label || node.id)} summary={nodeSummary(node, locale, objectLabels)} position={pos} selected={selectedId === node.id} diff --git a/ui/packages/app-shell/src/views/metadata-admin/previews/FlowPreview.tsx b/ui/packages/app-shell/src/views/metadata-admin/previews/FlowPreview.tsx index 09c38b0bd69..faba13775e0 100644 --- a/ui/packages/app-shell/src/views/metadata-admin/previews/FlowPreview.tsx +++ b/ui/packages/app-shell/src/views/metadata-admin/previews/FlowPreview.tsx @@ -39,8 +39,9 @@ import type { MetadataPreviewProps, MetadataSelection } from '../preview-registr import { PreviewShell, PreviewMessage, PreviewErrorBoundary } from './PreviewShell.js'; import { appendArray } from '../inspectors/_shared.js'; import { useObjectCatalog, type ObjectCatalogEntry } from '../inspectors/ObjectPicker.js'; -import { t as tr, translateFlowMeta } from '../i18n.js'; +import { t as tr, tFormat, translateFlowMeta } from '../i18n.js'; import { FlowCanvas } from './FlowCanvas.js'; +import { FlowLabelTranslationsProvider, useFlowLabelTranslations, type FlowLabelTranslations } from './flow-label-translations.js'; import { defaultNodeLabel, flowEdgeDisplayName, flowNodeDisplayName } from './flow-canvas-parts.js'; import { edgeKey, type FlowDesignerEdge, type FlowDesignerNode } from './flow-canvas-layout.js'; import { NESTED_NODE_KIND, parseNestedNodeId, encodeNestedNodeId, locateFlowNode } from '../inspectors/flow-nested-selection.js'; @@ -125,12 +126,18 @@ export function FlowPreviewChromeProvider({ value, children }: { value: FlowPrev * node with its type's display name ("Node · Decision"), or a connection — and * the title is the one the inspector's own header would show (the node's label * or id; the connection's `source → target`, each end by its node's name). + * + * An `approval` node's title is its step label in the viewer's language when + * the package bundle carries one (`translations`, see + * `flow-label-translations.tsx`); `source` is then the authored label, which + * the header shows beside it, since Studio is where that label is authored. */ export function flowSelectionHeading( draft: Record, selection: MetadataSelection, locale?: string, -): { eyebrow: string; title: string } { + translations?: FlowLabelTranslations, +): { eyebrow: string; title: string; source?: string } { if (selection.kind === 'edge') { const edges = Array.isArray(draft.edges) ? (draft.edges as FlowDesignerEdge[]) : []; const edge = edges.find((e, i) => edgeKey(e, i) === selection.id); @@ -150,12 +157,32 @@ export function flowSelectionHeading( return { eyebrow: kind, title: selection.label ?? nested?.nodeId ?? selection.id }; } const type = typeof node.type === 'string' ? node.type : ''; + const authored = (typeof node.label === 'string' && node.label) || node.id; + const translated = translations?.stepLabel(node); return { eyebrow: type ? `${kind} · ${defaultNodeLabel(type, locale)}` : kind, - title: (typeof node.label === 'string' && node.label) || node.id, + title: translated ?? authored, + ...(translated !== undefined && translated !== authored ? { source: authored } : {}), }; } +/** + * A {@link flowSelectionHeading}'s title as a host's inspector header draws + * it: the title, and under it the authored label when a translation stands in + * for it. + */ +export function FlowSelectionTitle({ heading, locale }: { heading: { title: string; source?: string }; locale?: string }) { + if (heading.source === undefined) return <>{heading.title}; + return ( + <> + {heading.title} + + {tFormat('engine.inspector.flowNode.sourceLabel', locale, { label: heading.source })} + + + ); +} + /** * The header's Trigger pill (objectui#11779): the trigger the engine arms this * flow on, read from its Start node by the spec's own resolver @@ -465,6 +492,7 @@ export function FlowPreview({ draft, editing, selection, onSelectionChange, onPa // Run history needs the published flow name (the engine keys runs by it). const flowName = typeof d.name === 'string' && d.name ? d.name : ''; + const labelTranslations = useFlowLabelTranslations(flowName); const empty = canEdit ? (
@@ -490,6 +518,8 @@ export function FlowPreview({ draft, editing, selection, onSelectionChange, onPa const canvasEl = nodes.length === 0 ? (
{empty}
) : ( + // The approval steps' labels in the viewer's language (flow-label-translations.tsx). + + ); // The bar's four panel toggles, as the designer has them: one panel at a time beside the canvas. diff --git a/ui/packages/app-shell/src/views/metadata-admin/previews/flow-label-translations.tsx b/ui/packages/app-shell/src/views/metadata-admin/previews/flow-label-translations.tsx new file mode 100644 index 00000000000..d65b0a22fb0 --- /dev/null +++ b/ui/packages/app-shell/src/views/metadata-admin/previews/flow-label-translations.tsx @@ -0,0 +1,77 @@ +// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license. + +/** + * The flow designer's reading of a package's `flows` translations: the flow's + * own label (`flows..label`) and an `approval` node's step label + * (`flows..approvals..label`), in the viewer's language. + * + * The bundle is the one `FlowRunner` reads, `activeFlowsBundle` over the + * i18next resource tree the console already loaded, and the flow label goes + * through the spec's `translateFlow`, the runner's resolution path. So the + * designer and the runner cannot disagree about a flow's name, and there is no + * second loader. + * + * Only those two keys exist in the spec's `flows` group for a label the + * designer draws. A decision or other node's label and an edge label have no + * key, so they stay the authored text. + * + * Display only: the draft is never rewritten with a translation, so an edit, + * a rename or a save keeps working on the authored label. Studio is the + * authoring surface, so the inspector also shows the authored label beside a + * translation (`flowSelectionHeading`'s `source`). + */ + +import * as React from 'react'; +import { useObjectTranslation } from '@object-ui/react'; +import { translateFlow, type TranslationBundle } from '@objectstack/spec/system'; +import { activeFlowsBundle } from '../../../utils/flowsBundle.js'; + +/** A flow's translated labels in one language. Every member answers `undefined` where the bundle carries nothing. */ +export interface FlowLabelTranslations { + /** `flows..label`. */ + flowLabel?: string; + /** `flows..approvals..label`, for an `approval` node only. */ + stepLabel: (node: { id?: unknown; type?: unknown }) => string | undefined; +} + +/** + * The translated labels for `flowName` out of `bundle` in `language`, or + * `undefined` when there is no bundle (nothing to translate with). + */ +export function flowLabelTranslations( + bundle: TranslationBundle | undefined, + flowName: string, + language: string, +): FlowLabelTranslations | undefined { + if (!bundle || !flowName) return undefined; + const flowLabel = translateFlow<{ name: string; label?: string }>({ name: flowName }, bundle, { locale: language }).label; + const approvals = bundle[language]?.flows?.[flowName]?.approvals; + return { + flowLabel: typeof flowLabel === 'string' && flowLabel ? flowLabel : undefined, + stepLabel: (node) => { + if (node.type !== 'approval' || typeof node.id !== 'string' || !node.id) return undefined; + const label = approvals?.[node.id]?.label; + return typeof label === 'string' && label ? label : undefined; + }, + }; +} + +/** + * {@link flowLabelTranslations} for `flowName` in the console's active + * language. Recomputed on every render: a handful of property reads that + * follow the live resource tree and a language switch. + */ +export function useFlowLabelTranslations(flowName: string): FlowLabelTranslations | undefined { + const { i18n, language } = useObjectTranslation(); + return flowLabelTranslations(activeFlowsBundle(i18n, language, flowName), flowName, language); +} + +const FlowLabelTranslationsContext = React.createContext(undefined); + +/** Hands {@link FlowLabelTranslations} to the canvas below it. */ +export const FlowLabelTranslationsProvider = FlowLabelTranslationsContext.Provider; + +/** The translations the nearest provider hands in, or `undefined` outside one. */ +export function useFlowLabelTranslationsContext(): FlowLabelTranslations | undefined { + return React.useContext(FlowLabelTranslationsContext); +} diff --git a/ui/packages/app-shell/src/views/metadata-admin/previews/flow-region-view.tsx b/ui/packages/app-shell/src/views/metadata-admin/previews/flow-region-view.tsx index 97125b785af..e02f27bffc8 100644 --- a/ui/packages/app-shell/src/views/metadata-admin/previews/flow-region-view.tsx +++ b/ui/packages/app-shell/src/views/metadata-admin/previews/flow-region-view.tsx @@ -37,6 +37,7 @@ import { REGION_BLOCK_PAD, REGION_GAP, REGION_LABEL_H } from './flow-region-metr // stable region `key`. It lives in its own module so the nested-node inspector // breadcrumb reads the same rows (objectui#10696). import { displayRegionLabel } from './flow-region-label.js'; +import { useFlowLabelTranslationsContext } from './flow-label-translations.js'; /** * Node box inside a region — a compact echo of `NodeCard`. Read-only by default @@ -60,6 +61,8 @@ function RegionNode({ }) { const tone = nodeTone(node.type); const interactive = !!onSelect; + // An approval step's label in the viewer's language, where the package translates it. + const labelTranslations = useFlowLabelTranslationsContext(); return (
-
- {node.label || node.id} +
+ {labelTranslations?.stepLabel(node) ?? (node.label || node.id)}
{node.type}
diff --git a/ui/packages/app-shell/src/views/metadata-admin/previews/flowNodeLabels.sites-13200.test.ts b/ui/packages/app-shell/src/views/metadata-admin/previews/flowNodeLabels.sites-13200.test.ts index 4c8b63b046f..e40c3b2a8d5 100644 --- a/ui/packages/app-shell/src/views/metadata-admin/previews/flowNodeLabels.sites-13200.test.ts +++ b/ui/packages/app-shell/src/views/metadata-admin/previews/flowNodeLabels.sites-13200.test.ts @@ -276,10 +276,10 @@ const ID_SITES: Record = { 'inspectors/FlowEdgeInspector.tsx · label-or-id · title={selection.label ?? selection.id}': 'selection-label', "inspectors/FlowNodeInspector.tsx · label-or-id · ": 'selection-label', // ── own-title: own title beside the type eyebrow; resolver would repeat the type (ruled B on objectui#13200) ── - 'previews/FlowCanvas.tsx · label-or-id · label={node.label || node.id}': 'own-title', - "previews/FlowPreview.tsx · label-or-id · title: (typeof node.label === 'string' && node.label) || node.id,": 'own-title', - 'previews/flow-region-view.tsx · label-or-id ·
': 'own-title', - 'previews/flow-region-view.tsx · label-or-id · {node.label || node.id}': 'own-title', + 'previews/FlowCanvas.tsx · label-or-id · label={labelTranslations?.stepLabel(node) ?? (node.label || node.id)}': 'own-title', + "previews/FlowPreview.tsx · label-or-id · const authored = (typeof node.label === 'string' && node.label) || node.id;": 'own-title', + 'previews/flow-region-view.tsx · label-or-id ·
': 'own-title', + 'previews/flow-region-view.tsx · label-or-id · {labelTranslations?.stepLabel(node) ?? (node.label || node.id)}': 'own-title', 'inspectors/FlowNodeInspector.tsx · label-or-id · title={node.label || node.id}': 'own-title', "previews/flow-node-refs.ts · edge-ends · const where = site.holder.kind === 'node' ? site.holder.id : `${site.holder.source} → ${site.holder.target}`;": 'id-path', }; diff --git a/ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.tsx b/ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.tsx index 1ac6e2b98c0..22790606f96 100644 --- a/ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.tsx +++ b/ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.tsx @@ -386,11 +386,13 @@ import { import { FlowMetaPills, FlowPreviewChromeProvider, + FlowSelectionTitle, flowSelectionHeading, type FlowPreviewSection, type FlowProblemTally, } from '../metadata-admin/previews/FlowPreview.js'; import { InspectorShellHostProvider } from '../metadata-admin/inspectors/_shared.js'; +import { useFlowLabelTranslations } from '../metadata-admin/previews/flow-label-translations.js'; import type { FlowRegistration } from '@objectstack/spec/api'; import { navEntryLabelText, @@ -8287,6 +8289,8 @@ export function AutomationsPillar({ dialog: flowConflictDialog, } = useDraftSaveGuard(client, reloadFlowDraft); const [selection, setSelection] = React.useState(null); + // The package's translations of the flow label and its approval-step labels (flow-label-translations.tsx). + const flowLabels = useFlowLabelTranslations(current?.name ?? ''); const [loading, setLoading] = React.useState(false); const [saving, setSaving] = React.useState(false); const [hasDraft, setHasDraft] = React.useState(false); @@ -9483,7 +9487,7 @@ export function AutomationsPillar({ } icon={current ? Workflow : undefined} - title={current ? current.label || current.name : t('engine.studio.auto.heading', locale)} + title={current ? flowLabels?.flowLabel || current.label || current.name : t('engine.studio.auto.heading', locale)} titleProps={ current ? { 'data-testid': 'auto-canvas-caption', title: `${t('designer.field.apiName', locale)}: ${current.name}` } @@ -9779,13 +9783,13 @@ export function AutomationsPillar({ // draws none of its own (`InspectorShellHostProvider`). With nothing // selected the aside keeps its "Configuration" eyebrow. const heading = - selection && inspector && current && flowLoaded ? flowSelectionHeading(draft, selection, locale) : null; + selection && inspector && current && flowLoaded ? flowSelectionHeading(draft, selection, locale, flowLabels) : null; const aside = ( } onClose={selection ? () => setSelection(null) : undefined} closeLabel={t('engine.studio.deselect', locale)} // objectui#12453 — a read-only package saves no draft: no footer. diff --git a/ui/packages/i18n/src/namespaces/studio/en.ts b/ui/packages/i18n/src/namespaces/studio/en.ts index 2afd064015b..96f2fef842a 100644 --- a/ui/packages/i18n/src/namespaces/studio/en.ts +++ b/ui/packages/i18n/src/namespaces/studio/en.ts @@ -680,6 +680,7 @@ const STUDIO_EN: Record = { // Flow node inspector 'engine.inspector.flowNode.kind': 'Node', 'engine.inspector.flowNode.close': 'Close node', + 'engine.inspector.flowNode.sourceLabel': 'Authored label: “{label}”', 'engine.inspector.flowNode.id': 'ID', // objectui#11827 — the ID field's inline refusal of a rename that cannot land; // the field shows the stored id again, so each says nothing was renamed. diff --git a/ui/packages/i18n/src/namespaces/studio/zh.ts b/ui/packages/i18n/src/namespaces/studio/zh.ts index bc84bdf4c31..be1e33003f8 100644 --- a/ui/packages/i18n/src/namespaces/studio/zh.ts +++ b/ui/packages/i18n/src/namespaces/studio/zh.ts @@ -586,6 +586,7 @@ const STUDIO_ZH: Record = { // Flow node inspector 'engine.inspector.flowNode.kind': '节点', 'engine.inspector.flowNode.close': '关闭节点', + 'engine.inspector.flowNode.sourceLabel': '原文标签:“{label}”', 'engine.inspector.flowNode.id': 'ID', 'engine.inspector.flowNode.idRequired': '未重命名:节点必须有 ID。', 'engine.inspector.flowNode.idTaken': '未重命名:此流程中已有另一个节点的 ID 是“{id}”。',