chore: message type i18n

This commit is contained in:
Joel 2024-03-26 18:07:35 +08:00
parent b5578c754f
commit a56115a664
4 changed files with 14 additions and 4 deletions

View File

@ -119,7 +119,7 @@ const ConfigPrompt: FC<Props> = ({
/>
<TooltipPlus
popupContent={
<div>{t(`${i18nPrefix}.roleDescription`)}</div>
<div className='max-w-[180px]'>{t(`${i18nPrefix}.roleDescription.${item.role}`)}</div>
}
>
<HelpCircle className='w-3.5 h-3.5 text-gray-400' />

View File

@ -201,7 +201,9 @@ const Panel: FC<NodePanelProps<LLMNodeType>> = ({
title={<div className='flex items-center space-x-1'>
<div className='text-xs font-semibold text-gray-700 uppercase'>user</div>
<TooltipPlus
popupContent={t('workflow.nodes.llm.roleDescription')}
popupContent={
<div className='max-w-[180px]'>{t('workflow.nodes.llm.roleDescription.user')}</div>
}
>
<HelpCircle className='w-3.5 h-3.5 text-gray-400' />
</TooltipPlus>

View File

@ -167,7 +167,11 @@ const translation = {
context: 'context',
contextTooltip: 'You can import Knowledge as context',
prompt: 'prompt',
roleDescription: 'Message role',
roleDescription: {
system: 'Give high level instructions for the conversation',
user: 'Provide instructions, queries, or any text-based input to the model',
assistant: 'The models responses based on the user messages',
},
addMessage: 'Add Message',
vision: 'vision',
files: 'Files',

View File

@ -168,7 +168,11 @@ const translation = {
contextTooltip: '您可以导入知识库作为上下文',
prompt: '提示词',
addMessage: '添加消息',
roleDescription: '消息角色',
roleDescription: {
system: '为对话提供高层指导',
user: '向模型提供指令、查询或任何基于文本的输入',
assistant: '基于用户消息的模型回复',
},
vision: '视觉',
files: '文件',
resolution: {