chore: update switch plugin i18n

This commit is contained in:
AkaraChen 2025-01-07 10:49:26 +08:00
parent 0beebab605
commit bdb9d676b1
5 changed files with 8 additions and 3 deletions

View File

@ -160,6 +160,7 @@ export const AgentStrategySelector = memo((props: AgentStrategySelectorProps) =>
uniqueIdentifier={'langgenius/openai:12'}
onSelect={console.error}
version={''}
tooltip={t('workflow.nodes.agent.switchToNewVersion')}
/>}
</div>}
</div>

View File

@ -34,7 +34,7 @@ export const SwitchPluginVersion: FC<SwitchPluginVersionProps> = (props) => {
onSelect(targetVersion!)
}, [hideUpdateModal, onSelect, targetVersion])
return <Tooltip popupContent={!isShow && tooltip} triggerMethod='hover'>
<div>
<div className='w-fit'>
{isShowUpdateModal && pluginDetail && <UpdateFromMarketplace
payload={{
originalPackageInfo: {
@ -61,7 +61,7 @@ export const SwitchPluginVersion: FC<SwitchPluginVersionProps> = (props) => {
trigger={
<Badge
className={cn(
'mx-1 hover:bg-state-base-hover',
'mx-1 hover:bg-state-base-hover flex',
isShow && 'bg-state-base-hover',
)}
uppercase={true}

View File

@ -2,15 +2,17 @@
import { useState } from 'react'
import { SwitchPluginVersion } from '../components/workflow/nodes/_base/components/switch-plugin-version'
import { useTranslation } from 'react-i18next'
export default function Page() {
const [version, setVersion] = useState('0.0.1')
const { t } = useTranslation()
return <div className="p-20">
<SwitchPluginVersion
uniqueIdentifier={'langgenius/openai:12'}
onSelect={setVersion}
version={version}
tooltip='Switch to new version'
tooltip={t('workflow.nodes.agent.switchToNewVersion')}
/>
</div>
}

View File

@ -755,6 +755,7 @@ const translation = {
checkList: {
strategyNotSelected: 'Strategy not selected',
},
switchToNewVersion: 'Switch to new version',
},
tracing: {
stopBy: 'Stop by {{user}}',

View File

@ -754,6 +754,7 @@ const translation = {
checkList: {
strategyNotSelected: '未选择策略',
},
switchToNewVersion: '切换到新版',
},
},
tracing: {