Skip to content

Commit 0a01fe9

Browse files
feat: internationalize workflow node defaults and output labels
1 parent a8e015a commit 0a01fe9

6 files changed

Lines changed: 476 additions & 278 deletions

File tree

‎ui/src/locales/LOCALE_README.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ MCP、关联资源和模板中心入口复用 `resource`,资源授权入口复
235235
`index.json` 维护菜单分组、共用的输入与变量配置,以及模型与默认模型来源、提示词、历史记录和输出思考文案。菜单中的 AI 能力、业务逻辑、数据处理和其他分组归 `workflow.menu`,数据源与知识库分组分别复用 `resource.dataSource.label`、`knowledge.title`;用户输入设置、参数校验、接口传参、全局变量及会话变量分别使用 `userInput`、`parameters`、`apiParameters`、`globalVariables`、`conversationVariables`。
236236
`execution.json` 维护工作流数据源查询的专属提示及执行结果文案,分别使用 `dataSource`、`executionResult`;数据源名称和选择文案复用 `resource.dataSource`。
237237
`nodes.json` 保持单文件,按节点职责分组维护菜单名称、说明、内置字段及节点专属配置,例如 `workflow.aiChat.label`、`workflow.aiChat.description` 和 `workflow.start.question`,不额外增加 `nodes` 层级。同一节点跨智能体、知识库和工具模式复用同一组文案,模式只决定可用节点范围。
238+
节点共用的“结果”标签归 `workflow.node.result`;专属输出字段随节点分组维护,图片和视频类型复用 `upload.types`。循环开始的名称、下标与循环元素统一归 `workflow.loopStart`,循环内嵌定义与独立定义共用;循环体名称归 `workflow.loopBody`。
238239
按已处理的业务范围增加文件;知识库、工具专属节点与画布控制、执行详情分别按职责归组,不为每个组件新建文件。
239240
节点配置文案归 `workflow`,资源实体名称、创建和管理操作仍复用 `application`、`knowledge`、`tool`;同名中文不作为归类依据。
240241
节点设置标题与返回内容开关归 `workflow.nodeSettings`、`workflow.returnContent`;历史记录来源选项复用 `workflow.node.title`(`nodes.json`)和 `workflow.title`(`index.json`),保留 `NODE`、`WORKFLOW` 协议值。知识库四种资源范围的工作流入口菜单共用 `workflow.title`。节点系统/用户提示词的占位使用 `workflow.systemPrompt.placeholder`、`workflow.userPrompt.placeholder`,通过 `{reference}` 原样传入 `START_NODE_REFERENCES.question`。AI 对话的视觉开关归 `workflow.aiChat.vision`,图片/视频标签复用 `upload.types`,技能标题与输出执行过程复用 `application.skills`;语言切换只更新展示,不重置已保存提示词和节点配置。
@@ -245,7 +246,7 @@ MCP、关联资源和模板中心入口复用 `resource`,资源授权入口复
245246

246247
智能体基本信息的名称、描述、开场白、长期记忆和语音设置复用 `application`;用户输入、接口参数和会话变量的字段标签、占位及必填提示复用 `dynamicForm.fields`,添加/编辑参数复用 `common.parameters`。
247248
参数重复提示仅翻译文字,参数名和分隔符在调用处组合。周期选项直接读取 `SCHEDULE_OPTION` 的响应式标签,保留保存协议;切换语言不重新校验表单。
248-
节点缺省开场白与用户输入标题在使用处直接调用 `t`;已有图数据、模板内配置、节点名称及变量引用路径保留原文。长期记忆说明中的默认引用示例读取 `START_NODE_REFERENCES.memory`,再通过参数传入文案。
249+
节点缺省开场白与用户输入标题分别复用 `application.prologue.defaultValue`、`workflow.userInput.title`,默认定义通过响应式配置读取,组件初始化时直接调用 `t`;基本信息名称复用 `common.labels.basicInfo`。表单默认输出内容归 `workflow.form.defaultContent`,通过命名参数原样传入 `{{form}}`。创建节点时复制为普通数据;已有图数据、模板内配置、节点名称及变量引用路径保留原文。长期记忆说明中的默认引用示例读取 `START_NODE_REFERENCES.memory`,再通过参数传入文案。
249250
文件上传配置的类型名称在响应式展示配置中直接调用 `t`;开始节点在刷新文件字段时复用 `upload.types`,长期记忆字段复用 `application.longTermMemory.label`,只写入当前语言的普通字符串。文件后缀、大小单位、数量与原有拼接标点保持原样。
250251
判断器及 Break/Continue 的比较符复用 `dynamicForm.operators`;`compareList` 的 `label` 通过响应式配置直接调用 `t`,按当前语言提供名称,比较符值与顺序保持原样。AI 条件 schema 的比较符说明延迟读取这些名称,不在模块初始化时固化译文。文件引用示例的标题复用 `common.labels.example`,JSON 数据由 `FILE_REFERENCE_EXAMPLE` 提供,不进入语言包。
251252

‎ui/src/locales/en-US/workflow/nodes.json‎

Lines changed: 67 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"node": {
3-
"title": "Node"
3+
"title": "Node",
4+
"result": "Result"
45
},
56
"start": {
67
"label": "Start",
@@ -21,11 +22,21 @@
2122
},
2223
"llm": {
2324
"label": "LLM",
24-
"description": "Call n AI model once, optionally providing tool definitions and receiving tool calls"
25+
"description": "Call an AI model once, optionally providing tool definitions and receiving tool calls",
26+
"content": "Response content",
27+
"reasoningContent": "Reasoning process",
28+
"reasoningKey": "Reasoning key",
29+
"refusal": "Refusal content",
30+
"isRefusal": "Refused",
31+
"usage": "Token usage",
32+
"toolCalls": "Tool calls",
33+
"finishReason": "Finish reason"
2534
},
2635
"intent": {
2736
"label": "Intent classification",
28-
"description": "Match user questions to predefined intent categories"
37+
"description": "Match user questions to predefined intent categories",
38+
"category": "Category",
39+
"reason": "Reason"
2940
},
3041
"speechToText": {
3142
"label": "Speech to text",
@@ -37,7 +48,8 @@
3748
},
3849
"imageGenerate": {
3950
"label": "Image generation",
40-
"description": "Generate images from the provided text"
51+
"description": "Generate images from the provided text",
52+
"answer": "AI response"
4153
},
4254
"imageToVideo": {
4355
"label": "Image to video",
@@ -49,27 +61,34 @@
4961
},
5062
"imageUnderstand": {
5163
"label": "Image understanding",
52-
"description": "Identify objects and scenes in images to answer user questions"
64+
"description": "Identify objects and scenes in images to answer user questions",
65+
"answer": "AI response"
5366
},
5467
"videoUnderstand": {
5568
"label": "Video understanding",
56-
"description": "Identify objects and scenes in videos to answer user questions"
69+
"description": "Identify objects and scenes in videos to answer user questions",
70+
"answer": "AI response"
5771
},
5872
"questionOptimization": {
5973
"label": "Question optimization",
60-
"description": "Refine the current question using conversation history to better match knowledge segments"
74+
"description": "Refine the current question using conversation history to better match knowledge segments",
75+
"result": "Optimized question"
6176
},
6277
"reply": {
6378
"label": "Specified reply",
64-
"description": "Return the specified content, converting referenced variables to strings"
79+
"description": "Return the specified content, converting referenced variables to strings",
80+
"content": "Content"
6581
},
6682
"condition": {
6783
"label": "Condition",
68-
"description": "Run different nodes based on conditions"
84+
"description": "Run different nodes based on conditions",
85+
"branchName": "Branch name"
6986
},
7087
"form": {
7188
"label": "Form collection",
72-
"description": "Collect user information during a conversation and use the form data in subsequent steps"
89+
"description": "Collect user information during a conversation and use the form data in subsequent steps",
90+
"formData": "All form data",
91+
"defaultContent": "Hello, please complete the form below:\n{form}\nWhen finished, click [Submit] to submit."
7392
},
7493
"variableAssign": {
7594
"label": "Variable assignment",
@@ -89,19 +108,30 @@
89108
},
90109
"searchKnowledge": {
91110
"label": "Knowledge retrieval",
92-
"description": "Relate knowledge and find segments relevant to the question"
111+
"description": "Relate knowledge and find segments relevant to the question",
112+
"segmentList": "Retrieved segment list",
113+
"directAnswerSegments": "Segments eligible for direct answers",
114+
"result": "Retrieval results",
115+
"directAnswerContent": "Segment content eligible for direct answers"
93116
},
94117
"searchDocument": {
95118
"label": "Document tag retrieval",
96-
"description": "Find documents matching the specified tags within the configured search scope"
119+
"description": "Find documents matching the specified tags within the configured search scope",
120+
"knowledgeList": "Knowledge list",
121+
"documentList": "Document list"
97122
},
98123
"documentExtract": {
99124
"label": "Document content extraction",
100-
"description": "Parse input documents and output structured content"
125+
"description": "Parse input documents and output structured content",
126+
"content": "Document content",
127+
"documentList": "Document list"
101128
},
102129
"reranker": {
103130
"label": "Multi-source retrieval",
104-
"description": "Rerank retrieval results from multiple knowledge sources using a reranking model"
131+
"description": "Rerank retrieval results from multiple knowledge sources using a reranking model",
132+
"resultList": "Reranked result list",
133+
"result": "Reranked results",
134+
"directAnswerSegments": "Segments eligible for direct answers"
105135
},
106136
"mcp": {
107137
"label": "MCP call",
@@ -111,10 +141,27 @@
111141
"label": "Custom tool",
112142
"description": "Process data by running custom scripts"
113143
},
144+
"application": {
145+
"label": "Agent node"
146+
},
147+
"tool": {
148+
"label": "Tool node"
149+
},
150+
"toolWorkflow": {
151+
"label": "Workflow tool"
152+
},
114153
"loop": {
115154
"label": "Loop",
116155
"description": "Repeat a series of tasks using the configured iteration count and logic"
117156
},
157+
"loopStart": {
158+
"label": "Loop start",
159+
"index": "Index",
160+
"item": "Loop item"
161+
},
162+
"loopBody": {
163+
"label": "Loop body"
164+
},
118165
"loopContinue": {
119166
"label": "Continue",
120167
"description": "End the current iteration and continue with the next one"
@@ -125,15 +172,18 @@
125172
},
126173
"documentSplit": {
127174
"label": "Document segmentation",
128-
"description": "Split input document content into a list of segments using the segmentation strategy"
175+
"description": "Split input document content into a list of segments using the segmentation strategy",
176+
"segmentList": "Segment list"
129177
},
130178
"localFile": {
131179
"label": "Local files",
132-
"description": "Upload local documents and output a document list. Use the Document content extraction node to parse their contents"
180+
"description": "Upload local documents and output a document list. Use the Document content extraction node to parse their contents",
181+
"fileList": "File list"
133182
},
134183
"webSource": {
135184
"label": "Web site",
136-
"description": "Crawl web data from a root URL and output documents with content, with one document per URL"
185+
"description": "Crawl web data from a root URL and output documents with content, with one document per URL",
186+
"documentList": "Document list"
137187
},
138188
"knowledgeWrite": {
139189
"label": "Write to knowledge",

‎ui/src/locales/zh-CN/workflow/nodes.json‎

Lines changed: 67 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"node": {
3-
"title": "节点"
3+
"title": "节点",
4+
"result": "结果"
45
},
56
"start": {
67
"label": "开始",
@@ -21,11 +22,21 @@
2122
},
2223
"llm": {
2324
"label": "LLM",
24-
"description": "单次调用大模型,可传入工具定义并输出工具调用"
25+
"description": "单次调用大模型,可传入工具定义并输出工具调用",
26+
"content": "回答内容",
27+
"reasoningContent": "思考过程",
28+
"reasoningKey": "思考标识",
29+
"refusal": "拒答内容",
30+
"isRefusal": "是否拒答",
31+
"usage": "Token 用量",
32+
"toolCalls": "工具调用",
33+
"finishReason": "结束原因"
2534
},
2635
"intent": {
2736
"label": "意图识别",
28-
"description": "将用户问题与用户预设的意图分类进行匹配"
37+
"description": "将用户问题与用户预设的意图分类进行匹配",
38+
"category": "分类",
39+
"reason": "理由"
2940
},
3041
"speechToText": {
3142
"label": "语音转文本",
@@ -37,7 +48,8 @@
3748
},
3849
"imageGenerate": {
3950
"label": "图片生成",
40-
"description": "根据提供的文本内容生成图片"
51+
"description": "根据提供的文本内容生成图片",
52+
"answer": "AI 回答内容"
4153
},
4254
"imageToVideo": {
4355
"label": "图生视频",
@@ -49,27 +61,34 @@
4961
},
5062
"imageUnderstand": {
5163
"label": "图片理解",
52-
"description": "识别出图片中的对象、场景等信息回答用户问题"
64+
"description": "识别出图片中的对象、场景等信息回答用户问题",
65+
"answer": "AI 回答内容"
5366
},
5467
"videoUnderstand": {
5568
"label": "视频理解",
56-
"description": "识别出视频中的对象、场景等信息回答用户问题"
69+
"description": "识别出视频中的对象、场景等信息回答用户问题",
70+
"answer": "AI 回答内容"
5771
},
5872
"questionOptimization": {
5973
"label": "问题优化",
60-
"description": "根据历史聊天记录优化完善当前问题,更利于匹配知识库分段"
74+
"description": "根据历史聊天记录优化完善当前问题,更利于匹配知识库分段",
75+
"result": "问题优化结果"
6176
},
6277
"reply": {
6378
"label": "指定回复",
64-
"description": "指定回复内容,引用变量会转换为字符串进行输出"
79+
"description": "指定回复内容,引用变量会转换为字符串进行输出",
80+
"content": "内容"
6581
},
6682
"condition": {
6783
"label": "判断器",
68-
"description": "根据不同条件执行不同的节点"
84+
"description": "根据不同条件执行不同的节点",
85+
"branchName": "分支名称"
6986
},
7087
"form": {
7188
"label": "表单收集",
72-
"description": "在问答过程中用于收集用户信息,可以根据收集到表单数据执行后续流程"
89+
"description": "在问答过程中用于收集用户信息,可以根据收集到表单数据执行后续流程",
90+
"formData": "表单全部内容",
91+
"defaultContent": "你好,请先填写下面表单内容:\n{form}\n填写后请点击【提交】按钮进行提交。"
7392
},
7493
"variableAssign": {
7594
"label": "变量赋值",
@@ -89,19 +108,30 @@
89108
},
90109
"searchKnowledge": {
91110
"label": "知识库检索",
92-
"description": "关联知识库,查找与问题相关的分段"
111+
"description": "关联知识库,查找与问题相关的分段",
112+
"segmentList": "检索结果的分段列表",
113+
"directAnswerSegments": "满足直接回答的分段列表",
114+
"result": "检索结果",
115+
"directAnswerContent": "满足直接回答的分段内容"
93116
},
94117
"searchDocument": {
95118
"label": "文档标签检索",
96-
"description": "从设定的检索范围中,根据文档标签检索出满足条件的文档"
119+
"description": "从设定的检索范围中,根据文档标签检索出满足条件的文档",
120+
"knowledgeList": "知识库列表",
121+
"documentList": "文档列表"
97122
},
98123
"documentExtract": {
99124
"label": "文档内容提取",
100-
"description": "解析输入文档,输出结构化文档内容"
125+
"description": "解析输入文档,输出结构化文档内容",
126+
"content": "文档内容",
127+
"documentList": "文档列表"
101128
},
102129
"reranker": {
103130
"label": "多路召回",
104-
"description": "使用重排模型对多个知识库的检索结果进行二次召回"
131+
"description": "使用重排模型对多个知识库的检索结果进行二次召回",
132+
"resultList": "重排结果列表",
133+
"result": "重排结果",
134+
"directAnswerSegments": "满足直接回答的分段列表"
105135
},
106136
"mcp": {
107137
"label": "MCP 调用",
@@ -111,10 +141,27 @@
111141
"label": "自定义工具",
112142
"description": "通过执行自定义脚本,实现数据处理"
113143
},
144+
"application": {
145+
"label": "智能体节点"
146+
},
147+
"tool": {
148+
"label": "工具节点"
149+
},
150+
"toolWorkflow": {
151+
"label": "工作流工具"
152+
},
114153
"loop": {
115154
"label": "循环节点",
116155
"description": "通过设置循环次数和逻辑,重复执行一系列任务"
117156
},
157+
"loopStart": {
158+
"label": "循环开始",
159+
"index": "下标",
160+
"item": "循环元素"
161+
},
162+
"loopBody": {
163+
"label": "循环体"
164+
},
118165
"loopContinue": {
119166
"label": "Continue",
120167
"description": "用于终止当前循环,执行下次循环"
@@ -125,15 +172,18 @@
125172
},
126173
"documentSplit": {
127174
"label": "文档分段",
128-
"description": "按分段策略拆分输入文档内容,输出分段文本列表"
175+
"description": "按分段策略拆分输入文档内容,输出分段文本列表",
176+
"segmentList": "分段列表"
129177
},
130178
"localFile": {
131179
"label": "本地文件",
132-
"description": "上传本地文档,输出文档列表(不解析内容,需配合 “文档内容提取” 节点解析)"
180+
"description": "上传本地文档,输出文档列表(不解析内容,需配合 “文档内容提取” 节点解析)",
181+
"fileList": "文件列表"
133182
},
134183
"webSource": {
135184
"label": "Web 站点",
136-
"description": "输入根地址自动抓取 Web 数据(单链接对应单文档),输出含内容的文档列表"
185+
"description": "输入根地址自动抓取 Web 数据(单链接对应单文档),输出含内容的文档列表",
186+
"documentList": "文档列表"
137187
},
138188
"knowledgeWrite": {
139189
"label": "知识库写入",

0 commit comments

Comments
 (0)