fix number of tool actions

This commit is contained in:
JzoNg
2024-12-20 11:27:52 +08:00
parent 1fa5b1755f
commit 6d2b2d7810
7 changed files with 8 additions and 8 deletions

View File

@@ -59,7 +59,7 @@ const ActionList = ({
<div className='px-4 pt-2 pb-4'>
<div className='mb-1 py-1'>
<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 && (
<Button
variant='secondary'

View File

@@ -297,7 +297,7 @@ const ProviderDetail = ({
{/* Builtin type */}
{!isDetailLoading && (collection.type === CollectionType.builtIn) && isAuthed && (
<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 && (
<Button
variant='secondary'
@@ -317,7 +317,7 @@ const ProviderDetail = ({
{!isDetailLoading && (collection.type === CollectionType.builtIn) && needAuth && !isAuthed && (
<>
<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='text-util-colors-orange-orange-600'>{t('tools.auth.setup').toLocaleUpperCase()}</span>
</div>

View File

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

View File

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

View File

@@ -21,7 +21,7 @@ const translation = {
setupModalTitle: 'Set Up Authorization',
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',
addToolModal: {
type: 'type',

View File

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

View File

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