Skip to content

Commit 8801658

Browse files
committed
fix translations
1 parent 4aaf7f8 commit 8801658

2 files changed

Lines changed: 23 additions & 22 deletions

File tree

src/App.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ type DemoNodeData = {
5959
suppressMessage?: boolean;
6060
embeddedCard?: {
6161
visible: boolean;
62+
title: string;
6263
chips: string[];
6364
};
6465
plan?: { title: string; items: Array<{ id: string; label: string; phase: 'pending' | 'processing' | 'done'; bubbleText: string }> };
@@ -3702,7 +3703,7 @@ function MissionNode({ data }: NodeProps<Node<DemoNodeData>>) {
37023703
"mission-node-embedded-card",
37033704
(data.appearance === 'robot' || data.appearance === 'robot-arm') && "mission-node-embedded-card-tall",
37043705
)}>
3705-
<div className="mission-node-embedded-card-title">Agent Card</div>
3706+
<div className="mission-node-embedded-card-title">{data.embeddedCard.title}</div>
37063707
<div className="mission-node-agent-card-tags mission-node-embedded-card-tags">
37073708
{data.embeddedCard.chips.map((chip) => (
37083709
<span key={chip} className="mission-node-detail-chip mission-node-agent-card-chip">
@@ -4019,16 +4020,16 @@ function buildGraph(
40194020
{ id: 'ran', type: 'mission', hidden: !visibleSet.has('ran'), position: { x: LAYOUT.nodes.ran.x, y: LAYOUT.nodes.ran.y }, style: { width: LAYOUT.nodes.ran.width }, data: { nodeId: 'ran', label: t(locale, 'graph.node.ran.label'), kind: 'access', role: t(locale, 'graph.node.ran.role'), active: activeNodeSet.has('ran'), flashActive: flashFor('ran'), transitioning: transitioningNodeSet.has('ran'), handles: ['in-right', 'out-top-left', 'out-top-right', 'out-right-bottom'], appearance: 'pill', processing: playback.phase === 'running' && activeNodeSet.has('ran'), message: bubbleFor('ran'), messageIcon: bubbleIconFor('ran'), messageState: bubbleStateFor('ran'), messageLeaving: bubbleLeavingFor('ran') } },
40204021

40214022
// Family domain
4022-
{ id: 'phone', type: 'mission', hidden: !visibleSet.has('phone'), position: { x: LAYOUT.nodes.phone.x, y: LAYOUT.nodes.phone.y }, style: { width: LAYOUT.nodes.phone.width, height: LAYOUT.nodes.phone.height }, data: { label: t(locale, 'graph.node.phone.label'), kind: 'endpoint', active: activeNodeSet.has('phone'), flashActive: flashFor('phone'), transitioning: transitioningNodeSet.has('phone'), handles: ['in-left', 'out-left'], appearance: 'phone', embeddedCard: { visible: true, chips: ['🪪 did:3gpp:4b92ac1e@cmcc.com', `📱 ${t(locale, 'graph.node.phone.chipLabel')}`, '⚙️ Huawei'] }, processing: playback.phase === 'running' && activeNodeSet.has('phone'), message: bubbleFor('phone'), messageIcon: bubbleIconFor('phone'), messageState: bubbleStateFor('phone'), messageLeaving: bubbleLeavingFor('phone') } },
4023-
{ id: 'robot-dog', type: 'mission', hidden: !visibleSet.has('robot-dog'), position: { x: LAYOUT.nodes.robotDog.x, y: LAYOUT.nodes.robotDog.y }, style: { width: robotDogWidth, height: LAYOUT.nodes.robotDog.height }, data: { label: t(locale, 'graph.node.robotDog.label'), kind: 'robot', active: activeNodeSet.has('robot-dog'), flashActive: flashFor('robot-dog'), transitioning: transitioningNodeSet.has('robot-dog'), handles: ['in-left', 'out-left'], appearance: 'robot', embeddedCard: { visible: robotDogExpanded, chips: ['🪪 did:3gpp:6f0d5b7a@cmcc.com', `📷 ${t(locale, 'graph.node.robotDog.camera')}`, '📦 10KG', '⚙️ Unitree'] }, processing: playback.phase === 'running' && activeNodeSet.has('robot-dog'), message: bubbleFor('robot-dog'), messageIcon: bubbleIconFor('robot-dog'), messageState: bubbleStateFor('robot-dog'), messageLeaving: bubbleLeavingFor('robot-dog') } },
4023+
{ id: 'phone', type: 'mission', hidden: !visibleSet.has('phone'), position: { x: LAYOUT.nodes.phone.x, y: LAYOUT.nodes.phone.y }, style: { width: LAYOUT.nodes.phone.width, height: LAYOUT.nodes.phone.height }, data: { label: t(locale, 'graph.node.phone.label'), kind: 'endpoint', active: activeNodeSet.has('phone'), flashActive: flashFor('phone'), transitioning: transitioningNodeSet.has('phone'), handles: ['in-left', 'out-left'], appearance: 'phone', embeddedCard: { visible: true, title: t(locale, 'graph.node.agentCard.label'), chips: ['🪪 did:3gpp:4b92ac1e@cmcc.com', `📱 ${t(locale, 'graph.node.phone.chipLabel')}`, '⚙️ Huawei'] }, processing: playback.phase === 'running' && activeNodeSet.has('phone'), message: bubbleFor('phone'), messageIcon: bubbleIconFor('phone'), messageState: bubbleStateFor('phone'), messageLeaving: bubbleLeavingFor('phone') } },
4024+
{ id: 'robot-dog', type: 'mission', hidden: !visibleSet.has('robot-dog'), position: { x: LAYOUT.nodes.robotDog.x, y: LAYOUT.nodes.robotDog.y }, style: { width: robotDogWidth, height: LAYOUT.nodes.robotDog.height }, data: { label: t(locale, 'graph.node.robotDog.label'), kind: 'robot', active: activeNodeSet.has('robot-dog'), flashActive: flashFor('robot-dog'), transitioning: transitioningNodeSet.has('robot-dog'), handles: ['in-left', 'out-left'], appearance: 'robot', embeddedCard: { visible: robotDogExpanded, title: t(locale, 'graph.node.agentCard.label'), chips: ['🪪 did:3gpp:6f0d5b7a@cmcc.com', `📷 ${t(locale, 'graph.node.robotDog.camera')}`, '📦 10KG', '⚙️ Unitree'] }, processing: playback.phase === 'running' && activeNodeSet.has('robot-dog'), message: bubbleFor('robot-dog'), messageIcon: bubbleIconFor('robot-dog'), messageState: bubbleStateFor('robot-dog'), messageLeaving: bubbleLeavingFor('robot-dog') } },
40244025
{ id: 'phone-agent-card', type: 'mission', hidden: true, position: { x: LAYOUT.nodes.phoneAgentCard.x, y: LAYOUT.nodes.phoneAgentCard.y }, style: { width: LAYOUT.nodes.phoneAgentCard.width }, data: { label: t(locale, 'graph.node.phoneAgentCard.label'), kind: 'card', details: graphCardDetails({ label: t(locale, 'graph.card.did'), value: '🪪 did:3gpp:4b92ac1e@cmcc.com' }, { label: t(locale, 'graph.card.type'), values: [`📱 ${t(locale, 'graph.node.phone.chipLabel')}`, '⚙️ Huawei'] }), active: activeNodeSet.has('phone-agent-card'), flashActive: flashFor('phone-agent-card'), transitioning: transitioningNodeSet.has('phone-agent-card'), handles: ['in-left'], appearance: 'agent-card', processing: playback.phase === 'running' && activeNodeSet.has('phone-agent-card'), message: bubbleFor('phone-agent-card'), messageIcon: bubbleIconFor('phone-agent-card'), messageState: bubbleStateFor('phone-agent-card'), messageLeaving: bubbleLeavingFor('phone-agent-card') } },
40254026
{ id: 'agent-card', type: 'mission', hidden: true, position: { x: LAYOUT.nodes.agentCard.x, y: LAYOUT.nodes.agentCard.y }, style: { width: LAYOUT.nodes.agentCard.width }, data: { label: t(locale, 'graph.node.agentCard.label'), kind: 'card', details: graphCardDetails({ label: t(locale, 'graph.card.did'), value: '🪪 did:3gpp:6f0d5b7a@cmcc.com' }, { label: t(locale, 'graph.card.capabilities'), values: [`📷 ${t(locale, 'graph.node.robotDog.camera')}`, `📦 ${t(locale, 'graph.card.payload10kg')}`] }, { label: t(locale, 'graph.card.vendor'), values: ['⚙️ Unitree'] }), active: activeNodeSet.has('agent-card'), flashActive: flashFor('agent-card'), transitioning: transitioningNodeSet.has('agent-card'), handles: ['in-left'], appearance: 'agent-card', processing: playback.phase === 'running' && activeNodeSet.has('agent-card'), message: bubbleFor('agent-card'), messageIcon: bubbleIconFor('agent-card'), messageState: bubbleStateFor('agent-card'), messageLeaving: bubbleLeavingFor('agent-card') } },
40264027

40274028
// External Boxes Components
40284029
{ id: 'ott-ordering', type: 'mission', hidden: !visibleSet.has('ott-ordering'), position: { x: LAYOUT.nodes.ottOrdering.x, y: LAYOUT.nodes.ottOrdering.y }, style: { width: LAYOUT.nodes.ottOrdering.width }, data: { nodeId: 'ott-ordering', label: t(locale, 'graph.node.orderingAgent.label'), kind: 'agent', role: t(locale, 'graph.node.orderingAgent.role'), active: activeNodeSet.has('ott-ordering'), flashActive: flashFor('ott-ordering'), transitioning: transitioningNodeSet.has('ott-ordering'), context: activeNodeSet.has('ott-ordering'), handles: ['in-bottom'], processing: playback.phase === 'running' && activeNodeSet.has('ott-ordering'), message: bubbleFor('ott-ordering'), messageIcon: bubbleIconFor('ott-ordering'), messageState: bubbleStateFor('ott-ordering'), messageLeaving: bubbleLeavingFor('ott-ordering'), plan: planFor('ott-ordering') ? { title: planFor('ott-ordering')!.title, items: planFor('ott-ordering')!.items } : undefined, planLeaving: planLeavingFor('ott-ordering') } },
40294030
{ id: 'ott-gw', type: 'mission', hidden: !visibleSet.has('ott-gw'), position: { x: LAYOUT.nodes.ottGw.x, y: LAYOUT.nodes.ottGw.y }, style: { width: LAYOUT.nodes.ottGw.width }, data: { nodeId: 'ott-gw', label: t(locale, 'graph.node.ottGateway.label'), kind: 'gw', role: t(locale, 'graph.node.ottGateway.role'), active: activeNodeSet.has('ott-gw'), flashActive: flashFor('ott-gw'), transitioning: transitioningNodeSet.has('ott-gw'), context: activeNodeSet.has('ott-gw'), handles: ['in-left', 'out-right', 'out-bottom'], appearance: 'gateway', processing: playback.phase === 'running' && activeNodeSet.has('ott-gw'), message: bubbleFor('ott-gw'), messageIcon: bubbleIconFor('ott-gw'), messageState: bubbleStateFor('ott-gw'), messageLeaving: bubbleLeavingFor('ott-gw') } },
40304031
{ id: 'mno-gw', type: 'mission', hidden: !visibleSet.has('mno-gw'), position: { x: LAYOUT.nodes.mnoGw.x, y: LAYOUT.nodes.mnoGw.y }, style: { width: LAYOUT.nodes.mnoGw.width }, data: { nodeId: 'mno-gw', label: t(locale, 'graph.node.mnoGateway.label'), kind: 'gw', role: t(locale, 'graph.node.mnoGateway.role'), active: activeNodeSet.has('mno-gw'), flashActive: flashFor('mno-gw'), transitioning: transitioningNodeSet.has('mno-gw'), context: activeNodeSet.has('mno-gw'), handles: ['in-top', 'in-left', 'out-right', 'out-bottom'], appearance: 'gateway', processing: playback.phase === 'running' && activeNodeSet.has('mno-gw'), message: bubbleFor('mno-gw'), messageIcon: bubbleIconFor('mno-gw'), messageState: bubbleStateFor('mno-gw'), messageLeaving: bubbleLeavingFor('mno-gw') } },
4031-
{ id: 'mno-endpoint', type: 'mission', hidden: !visibleSet.has('mno-endpoint'), position: { x: LAYOUT.nodes.mnoEndpoint.x, y: LAYOUT.nodes.mnoEndpoint.y }, style: { width: LAYOUT.nodes.mnoEndpoint.width, height: LAYOUT.nodes.mnoEndpoint.height }, data: { label: t(locale, 'graph.node.robotArm.label'), kind: 'arm', active: activeNodeSet.has('mno-endpoint'), flashActive: flashFor('mno-endpoint'), transitioning: transitioningNodeSet.has('mno-endpoint'), handles: ['in-top', 'in-left'], appearance: 'robot-arm', embeddedCard: { visible: true, chips: ['🪪 did:3gpp:a18f4d2c@mnob.com', `🦾 ${t(locale, 'graph.node.robotArm.chipLabel')}`, `📦 ${t(locale, 'graph.card.payload5kg')}`, '⚙️ RobotFactory'] }, processing: playback.phase === 'running' && activeNodeSet.has('mno-endpoint'), message: bubbleFor('mno-endpoint'), messageIcon: bubbleIconFor('mno-endpoint'), messageState: bubbleStateFor('mno-endpoint'), messageLeaving: bubbleLeavingFor('mno-endpoint'), plan: planFor('mno-endpoint') ? { title: planFor('mno-endpoint')!.title, items: planFor('mno-endpoint')!.items } : undefined, planLeaving: planLeavingFor('mno-endpoint') } },
4032+
{ id: 'mno-endpoint', type: 'mission', hidden: !visibleSet.has('mno-endpoint'), position: { x: LAYOUT.nodes.mnoEndpoint.x, y: LAYOUT.nodes.mnoEndpoint.y }, style: { width: LAYOUT.nodes.mnoEndpoint.width, height: LAYOUT.nodes.mnoEndpoint.height }, data: { label: t(locale, 'graph.node.robotArm.label'), kind: 'arm', active: activeNodeSet.has('mno-endpoint'), flashActive: flashFor('mno-endpoint'), transitioning: transitioningNodeSet.has('mno-endpoint'), handles: ['in-top', 'in-left'], appearance: 'robot-arm', embeddedCard: { visible: true, title: t(locale, 'graph.node.agentCard.label'), chips: ['🪪 did:3gpp:a18f4d2c@mnob.com', `🦾 ${t(locale, 'graph.node.robotArm.chipLabel')}`, `📦 ${t(locale, 'graph.card.payload5kg')}`, '⚙️ RobotFactory'] }, processing: playback.phase === 'running' && activeNodeSet.has('mno-endpoint'), message: bubbleFor('mno-endpoint'), messageIcon: bubbleIconFor('mno-endpoint'), messageState: bubbleStateFor('mno-endpoint'), messageLeaving: bubbleLeavingFor('mno-endpoint'), plan: planFor('mno-endpoint') ? { title: planFor('mno-endpoint')!.title, items: planFor('mno-endpoint')!.items } : undefined, planLeaving: planLeavingFor('mno-endpoint') } },
40324033
{ id: 'arm-agent-card', type: 'mission', hidden: true, position: { x: LAYOUT.nodes.armAgentCard.x, y: LAYOUT.nodes.armAgentCard.y }, style: { width: LAYOUT.nodes.armAgentCard.width }, data: { label: t(locale, 'graph.node.armAgentCard.label'), kind: 'card', details: graphCardDetails({ label: t(locale, 'graph.card.did'), value: '🪪 did:3gpp:a18f4d2c@mnob.com' }, { label: t(locale, 'graph.card.type'), values: [`🦾 ${t(locale, 'graph.node.robotArm.chipLabel')}`, '⚙️ RobotFactory'] }), active: activeNodeSet.has('arm-agent-card'), flashActive: flashFor('arm-agent-card'), transitioning: transitioningNodeSet.has('arm-agent-card'), handles: ['in-top'], appearance: 'agent-card', processing: playback.phase === 'running' && activeNodeSet.has('arm-agent-card'), message: bubbleFor('arm-agent-card'), messageIcon: bubbleIconFor('arm-agent-card'), messageState: bubbleStateFor('arm-agent-card'), messageLeaving: bubbleLeavingFor('arm-agent-card') } },
40334034
];
40344035

0 commit comments

Comments
 (0)