fix number of tool actions

pull/12372/head
JzoNg 1 year ago
parent 1fa5b1755f
commit 6d2b2d7810

@ -59,7 +59,7 @@ const ActionList = ({
<div className='px-4 pt-2 pb-4'> <div className='px-4 pt-2 pb-4'>
<div className='mb-1 py-1'> <div className='mb-1 py-1'>
<div className='mb-1 h-6 flex items-center justify-between text-text-secondary system-sm-semibold-uppercase'> <div className='mb-1 h-6 flex items-center justify-between text-text-secondary system-sm-semibold-uppercase'>
{t('plugin.detailPanel.actionNum', { num: data.length })} {t('plugin.detailPanel.actionNum', { num: data.length, action: data.length > 1 ? 'actions' : 'action' })}
{provider.is_team_authorization && provider.allow_delete && ( {provider.is_team_authorization && provider.allow_delete && (
<Button <Button
variant='secondary' variant='secondary'

@ -297,7 +297,7 @@ const ProviderDetail = ({
{/* Builtin type */} {/* Builtin type */}
{!isDetailLoading && (collection.type === CollectionType.builtIn) && isAuthed && ( {!isDetailLoading && (collection.type === CollectionType.builtIn) && isAuthed && (
<div className='mb-1 h-6 flex items-center justify-between text-text-secondary system-sm-semibold-uppercase'> <div className='mb-1 h-6 flex items-center justify-between text-text-secondary system-sm-semibold-uppercase'>
{t('plugin.detailPanel.actionNum', { num: 3 })} {t('plugin.detailPanel.actionNum', { num: toolList.length, action: toolList.length > 1 ? 'actions' : 'action' })}
{needAuth && ( {needAuth && (
<Button <Button
variant='secondary' variant='secondary'
@ -317,7 +317,7 @@ const ProviderDetail = ({
{!isDetailLoading && (collection.type === CollectionType.builtIn) && needAuth && !isAuthed && ( {!isDetailLoading && (collection.type === CollectionType.builtIn) && needAuth && !isAuthed && (
<> <>
<div className='text-text-secondary system-sm-semibold-uppercase'> <div className='text-text-secondary system-sm-semibold-uppercase'>
<span className=''>{t('tools.includeToolNum', { num: toolList.length }).toLocaleUpperCase()}</span> <span className=''>{t('tools.includeToolNum', { num: toolList.length, action: toolList.length > 1 ? 'actions' : 'action' }).toLocaleUpperCase()}</span>
<span className='px-1'>·</span> <span className='px-1'>·</span>
<span className='text-util-colors-orange-orange-600'>{t('tools.auth.setup').toLocaleUpperCase()}</span> <span className='text-util-colors-orange-orange-600'>{t('tools.auth.setup').toLocaleUpperCase()}</span>
</div> </div>

@ -125,7 +125,7 @@ export const AppContextProvider: FC<AppContextProviderProps> = ({ children }) =>
setCurrentWorkspace(currentWorkspaceResponse) setCurrentWorkspace(currentWorkspaceResponse)
}, [currentWorkspaceResponse]) }, [currentWorkspaceResponse])
const [theme, setTheme] = useState<Theme>(Theme.dark) const [theme, setTheme] = useState<Theme>(Theme.light)
const handleSetTheme = useCallback((theme: Theme) => { const handleSetTheme = useCallback((theme: Theme) => {
setTheme(theme) setTheme(theme)
globalThis.document.documentElement.setAttribute('data-theme', theme) globalThis.document.documentElement.setAttribute('data-theme', theme)

@ -50,7 +50,7 @@ const translation = {
viewDetail: 'View Detail', viewDetail: 'View Detail',
remove: 'Remove', remove: 'Remove',
}, },
actionNum: '{{num}} ACTIONS INCLUDED', actionNum: '{{num}} {{action}} INCLUDED',
endpoints: 'Endpoints', endpoints: 'Endpoints',
endpointsTip: 'This plugin provides specific functionalities via endpoints, and you can configure multiple endpoint sets for current workspace.', endpointsTip: 'This plugin provides specific functionalities via endpoints, and you can configure multiple endpoint sets for current workspace.',
endpointsDocLink: 'View the document', endpointsDocLink: 'View the document',

@ -21,7 +21,7 @@ const translation = {
setupModalTitle: 'Set Up Authorization', setupModalTitle: 'Set Up Authorization',
setupModalTitleDescription: 'After configuring credentials, all members within the workspace can use this tool when orchestrating applications.', setupModalTitleDescription: 'After configuring credentials, all members within the workspace can use this tool when orchestrating applications.',
}, },
includeToolNum: '{{num}} actions included', includeToolNum: '{{num}} {{action}} included',
addTool: 'Add Tool', addTool: 'Add Tool',
addToolModal: { addToolModal: {
type: 'type', type: 'type',

@ -50,7 +50,7 @@ const translation = {
viewDetail: '查看详情', viewDetail: '查看详情',
remove: '移除', remove: '移除',
}, },
actionNum: '{{num}} ACTIONS 已包含', actionNum: '包含 {{num}} 个 {{action}}',
endpoints: 'API 端点', endpoints: 'API 端点',
endpointsTip: '此插件通过 API 端点提供特定功能,您可以为当前工作区配置多个 API 端点集。', endpointsTip: '此插件通过 API 端点提供特定功能,您可以为当前工作区配置多个 API 端点集。',
endpointsDocLink: '查看文档', endpointsDocLink: '查看文档',

@ -21,7 +21,7 @@ const translation = {
setupModalTitle: '设置授权', setupModalTitle: '设置授权',
setupModalTitleDescription: '配置凭据后,工作区中的所有成员都可以在编排应用程序时使用此工具。', setupModalTitleDescription: '配置凭据后,工作区中的所有成员都可以在编排应用程序时使用此工具。',
}, },
includeToolNum: '包含 {{num}} 个 action', includeToolNum: '包含 {{num}} 个 {{action}}',
addTool: '添加工具', addTool: '添加工具',
addToolModal: { addToolModal: {
type: '类型', type: '类型',

Loading…
Cancel
Save