Skip to content

Commit d8995e9

Browse files
committed
feat: support i18n
1 parent 96f467f commit d8995e9

File tree

18 files changed

+1154
-40
lines changed

18 files changed

+1154
-40
lines changed
Lines changed: 273 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,273 @@
1+
export default {
2+
node: 'Node',
3+
baseComponent: 'Base Component',
4+
nodeSetting: 'Node Setting',
5+
workflow: 'Workflow',
6+
searchBar: {
7+
placeholder: 'Search by name'
8+
},
9+
info: {
10+
previewVersion: 'Preview Version:',
11+
saveTime: 'Save Time:'
12+
},
13+
setting: {
14+
restoreVersion: 'Restore Version',
15+
restoreCurrentVersion: 'Restore This Version',
16+
addComponent: 'Add Component',
17+
public: 'Publish',
18+
releaseHistory: 'Release History',
19+
autoSave: 'Auto Save',
20+
latestRelease: 'Latest Release',
21+
copyParam: 'Copy Parameter'
22+
},
23+
tip: {
24+
publicSuccess: 'Published Successfully',
25+
noData: 'No related results found',
26+
nameMessage: 'Name cannot be empty!',
27+
onlyRight: 'Only allow connections from the right anchor point',
28+
notRecyclable: 'Cannot create a loop connection',
29+
onlyLeft: 'Only allow connections to the left anchor point',
30+
applicationNodeError: 'This application is unavailable',
31+
functionNodeError: 'This function is unavailable',
32+
repeatedNodeError: 'Node name already exists!',
33+
cannotCopy: 'Cannot be copied',
34+
copyError: 'Node has been copied',
35+
paramErrorMessage: 'Parameter already exists: '
36+
},
37+
delete: {
38+
confirmTitle: 'Confirm to delete this node?',
39+
deleteMessage: 'Node cannot be deleted'
40+
},
41+
control: {
42+
zoomOut: 'Zoom Out',
43+
zoomIn: 'Zoom In',
44+
fitView: 'Fit View',
45+
retract: 'Collapse All Nodes',
46+
extend: 'Expand All Nodes',
47+
beautify: 'One-click Beautification'
48+
},
49+
variable: {
50+
global: 'Global Variable',
51+
Referencing: 'Reference Variable',
52+
ReferencingRequired: 'Reference Variable Required',
53+
ReferencingError: 'Reference Variable Error',
54+
NoReferencing: 'Non-existent Reference Variable',
55+
fieldMessage: 'Please select a variable'
56+
},
57+
condition: {
58+
title: 'Execution Condition',
59+
front: 'Precondition',
60+
AND: 'All',
61+
OR: 'Any',
62+
text: 'After the connected node is executed, execute the current node'
63+
},
64+
validate: {
65+
startNodeRequired: 'Start Node Required',
66+
startNodeOnly: 'There can only be one Start Node',
67+
baseNodeRequired: 'Base Info Node Required',
68+
baseNodeOnly: 'There can only be one Base Info Node',
69+
notInWorkFlowNode: 'Node not in workflow',
70+
noNextNode: 'Non-existent next node',
71+
nodeUnavailable: 'Node unavailable',
72+
needConnect1: 'The branch of the node needs to be connected',
73+
cannotEndNode: 'Node cannot be used as an end node'
74+
},
75+
nodes: {
76+
startNode: {
77+
label: 'Start',
78+
question: 'User Question',
79+
currentTime: 'Current Time'
80+
},
81+
baseNode: {
82+
label: 'Base Info',
83+
fileUpload: {
84+
label: 'File Upload',
85+
tooltip: 'When enabled, the Q&A page will display a file upload button.'
86+
},
87+
FileUploadSetting: {
88+
title: 'File Upload Settings',
89+
maxFiles: 'Maximum number of files per upload',
90+
fileLimit: 'Maximum size per file (MB)',
91+
fileUploadType: {
92+
label: 'File types allowed for upload',
93+
documentText: 'Requires "Document Content Extraction" node to parse document content',
94+
imageText: 'Requires "Image Understanding" node to parse image content',
95+
audioText: 'Requires "Speech-to-Text" node to parse audio content'
96+
}
97+
}
98+
},
99+
aiChatNode: {
100+
label: 'AI Chat',
101+
text: 'Chat with AI large model',
102+
answer: 'AI Answer Content',
103+
returnContent: {
104+
label: 'Return Content',
105+
tooltip: `If turned off, the content of this node will not be output to the user.
106+
If you want the user to see the output of this node, please turn on the switch.`
107+
},
108+
defaultPrompt: `Known Information:
109+
{{knowledgeBaseSearch.data}}
110+
Question:
111+
{{start.question}}`
112+
},
113+
searchDatasetNode: {
114+
label: 'Knowledge Base Search',
115+
text: 'Associate knowledge base and find relevant segments',
116+
paragraph_list: 'List of retrieved paragraphs',
117+
is_hit_handling_method_list: 'List of segments that meet direct response criteria',
118+
result: 'Search Result',
119+
directly_return: 'Content of segments that meet direct response criteria',
120+
selectDatasetText: 'Associated knowledge base displayed here',
121+
searchParam: 'Search Parameters',
122+
searchQuestion: {
123+
label: 'Search Question',
124+
placeholder: 'Please select a search question',
125+
requiredMessage: 'Please select a search question'
126+
}
127+
},
128+
questionNode: {
129+
label: 'Question Optimization',
130+
text: 'Optimize and improve the current question based on historical chat records to better match knowledge base segments',
131+
result: 'Optimized Question Result',
132+
defaultPrompt: `Optimize and improve the user's question based on context: {{start.question}}
133+
Please output an optimized question.`,
134+
systemDefault: 'You are a question optimization expert'
135+
},
136+
conditionNode: {
137+
label: 'Conditional Branch',
138+
text: 'Execute different nodes based on different conditions',
139+
branch_name: 'Branch Name',
140+
conditions: {
141+
label: 'Conditions',
142+
info: 'Meets the following',
143+
requiredMessage: 'Please select conditions'
144+
},
145+
valueMessage: 'Please enter a value',
146+
addCondition: 'Add Condition',
147+
addBranch: 'Add Branch'
148+
},
149+
replyNode: {
150+
label: 'Specified Reply',
151+
text: 'Specify reply content, referenced variables will be converted to strings for output',
152+
content: 'Content',
153+
replyContent: {
154+
label: 'Reply Content',
155+
custom: 'Custom',
156+
reference: 'Reference Variable'
157+
}
158+
},
159+
rerankerNode: {
160+
label: 'Multi-path Recall',
161+
text: 'Use re-ranking model to perform secondary recall on retrieval results from multiple knowledge bases',
162+
result_list: 'Re-ranked Results List',
163+
result: 'Re-ranking Result',
164+
rerankerContent: {
165+
label: 'Re-ranking Content',
166+
requiredMessage: 'Please select re-ranking content'
167+
},
168+
higher: 'Higher',
169+
ScoreTooltip: 'The higher the Score, the stronger the relevance.',
170+
max_paragraph_char_number: 'Maximum number of characters to quote',
171+
reranker_model: {
172+
label: 'Re-ranking Model',
173+
placeholder: 'Please select a re-ranking model'
174+
}
175+
},
176+
formNode: {
177+
label: 'Form Collection',
178+
text: 'Used to collect user information during Q&A process, subsequent processes can be executed based on collected form data',
179+
form_content_format: `Hello, please fill out the form below:
180+
{{form}}
181+
Click the [Submit] button after filling it out.`,
182+
form_data: 'All Form Content',
183+
formContent: {
184+
label: 'Form Output Content',
185+
requiredMessage: 'Please set the output content of this node, { form } is a placeholder for the form.',
186+
tooltip: 'Set the content output by executing this node, { form } is a placeholder for the form.'
187+
},
188+
formAllContent: 'All Form Content',
189+
formSetting: 'Form Configuration'
190+
},
191+
documentExtractNode: {
192+
label: 'Document Content Extraction',
193+
text: 'Extract content from documents',
194+
content: 'Document Content'
195+
},
196+
imageUnderstandNode: {
197+
label: 'Image Understanding',
198+
text: 'Identify objects, scenes, etc., in images to answer user questions',
199+
answer: 'AI Answer Content',
200+
model: {
201+
label: 'Image Understanding Model',
202+
requiredMessage: 'Please select an image understanding model'
203+
},
204+
image: {
205+
label: 'Select Image',
206+
requiredMessage: 'Please select an image'
207+
}
208+
},
209+
imageGenerateNode: {
210+
label: 'Image Generation',
211+
text: 'Generate images based on provided text content',
212+
answer: 'AI Answer Content',
213+
model: {
214+
label: 'Image Generation Model',
215+
requiredMessage: 'Please select an image generation model'
216+
},
217+
prompt: {
218+
label: 'Positive Prompt',
219+
tooltip: 'Positive prompt words, used to describe elements and visual features expected in the generated image'
220+
},
221+
negative_prompt: {
222+
label: 'Negative Prompt',
223+
tooltip: 'Negative prompt words, used to describe content that should not appear in the image, which can limit the image.',
224+
placeholder: 'Please describe content you do not want to generate, such as color, bloody content'
225+
}
226+
},
227+
speechToTextNode: {
228+
label: 'Speech-to-Text',
229+
text: 'Convert audio to text through speech recognition model',
230+
stt_model: {
231+
label: 'Speech Recognition Model'
232+
},
233+
audio: {
234+
label: 'Select Audio File',
235+
placeholder: 'Please select an audio file'
236+
}
237+
},
238+
textToSpeechNode: {
239+
label: 'Text-to-Speech',
240+
text: 'Convert text to audio through speech synthesis model',
241+
tts_model: {
242+
label: 'Speech Synthesis Model'
243+
},
244+
content: {
245+
label: 'Select Text Content'
246+
}
247+
},
248+
functionNode: {
249+
label: 'Custom Function',
250+
text: 'Execute custom scripts to achieve data processing'
251+
},
252+
applicationNode: {
253+
label: 'Application Node'
254+
}
255+
},
256+
compare: {
257+
is_null: 'Is Null',
258+
is_not_null: 'Is Not Null',
259+
contain: 'Contains',
260+
not_contain: 'Does Not Contain',
261+
eq: 'Equals',
262+
ge: 'Greater Than or Equal To',
263+
gt: 'Greater Than',
264+
le: 'Less Than or Equal To',
265+
lt: 'Less Than',
266+
len_eq: 'Length Equals',
267+
len_ge: 'Length Greater Than or Equal To',
268+
len_gt: 'Length Greater Than',
269+
len_le: 'Length Less Than or Equal To',
270+
len_lt: 'Length Less Than'
271+
},
272+
FileUploadSetting: {}
273+
}

ui/src/locales/lang/en_US/views/application.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export default {
2828
applicationForm: {
2929
title: {
3030
info: 'Application Information',
31-
apptest: 'Debug Preview',
31+
appTest: 'Debug Preview',
3232
copy: 'copy'
3333
},
3434
form: {

0 commit comments

Comments
 (0)