mirror of
https://github.com/langgenius/dify.git
synced 2025-08-11 10:47:24 +00:00
chore: temp i18n
This commit is contained in:
parent
a0804786fd
commit
2f241d932c
@ -2,10 +2,13 @@
|
||||
import type { FC } from 'react'
|
||||
import React from 'react'
|
||||
import NoPluginSelected from './no-plugin-selected'
|
||||
import type { AUTO_UPDATE_MODE } from './types'
|
||||
import { AUTO_UPDATE_MODE } from './types'
|
||||
import PluginsSelected from './plugins-selected'
|
||||
import Button from '@/app/components/base/button'
|
||||
import { RiAddLine } from '@remixicon/react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
|
||||
const i18nPrefix = 'plugin.autoUpdate'
|
||||
|
||||
type Props = {
|
||||
updateMode: AUTO_UPDATE_MODE
|
||||
@ -18,12 +21,14 @@ const PluginsPicker: FC<Props> = ({
|
||||
value,
|
||||
onChange,
|
||||
}) => {
|
||||
const { t } = useTranslation()
|
||||
const hasSelected = value.length > 0
|
||||
const isExcludeMode = updateMode === AUTO_UPDATE_MODE.exclude
|
||||
return (
|
||||
<div className='mt-2 rounded-[10px] bg-background-section-burn p-2.5'>
|
||||
{hasSelected ? (
|
||||
<div className='flex justify-between text-text-tertiary'>
|
||||
<div className='system-xs-medium'>The following 21 plugins will not auto-update</div>
|
||||
<div className='system-xs-medium'>{t(`${i18nPrefix}.${isExcludeMode ? 'excludeUpdate' : 'partialUPdate'}`, { num: value.length })}</div>
|
||||
<div className='system-xs-medium cursor-pointer'>Clear all</div>
|
||||
</div>
|
||||
) : (
|
||||
|
@ -143,6 +143,12 @@ const translation = {
|
||||
exclude: 'Selected plugins will not auto-update',
|
||||
partial: 'Only selected plugins will auto-update. No plugins are currently selected, so no plugins will auto-update.',
|
||||
},
|
||||
excludeUpdate: 'The following {{num}} plugins will not auto-update',
|
||||
partialUPdate: 'Only the following {{num}} plugins will auto-update',
|
||||
operation: {
|
||||
clearAll: 'Clear all',
|
||||
select: 'Select plugins',
|
||||
},
|
||||
nextUpdateTime: 'Next auto-update: {{time}}',
|
||||
pluginDowngradeWarning: {
|
||||
title: 'Plugin Downgrade',
|
||||
|
Loading…
x
Reference in New Issue
Block a user