feat: improve i18n

This commit is contained in:
Fu Diwei 2024-12-23 22:46:07 +08:00
parent 7a66bdf139
commit 52d24ff2f2
3 changed files with 14 additions and 10 deletions

View File

@ -13,7 +13,9 @@
"workflow.props.name.default": "Unnamed",
"workflow.props.description": "Description",
"workflow.props.description.placeholder": "Please enter description",
"workflow.props.execution_method": "Execution Method",
"workflow.props.trigger": "Trigger",
"workflow.props.trigger.auto": "Auto",
"workflow.props.trigger.manual": "Manual",
"workflow.props.state": "State",
"workflow.props.state.filter.enabled": "Enabled",
"workflow.props.state.filter.disabled": "Disabled",

View File

@ -13,7 +13,9 @@
"workflow.props.name.default": "未命名工作流",
"workflow.props.description": "描述",
"workflow.props.description.placeholder": "请输入描述",
"workflow.props.execution_method": "执行方式",
"workflow.props.trigger": "触发方式",
"workflow.props.trigger.auto": "自动",
"workflow.props.trigger.manual": "手动",
"workflow.props.state": "启用状态",
"workflow.props.state.filter.enabled": "启用",
"workflow.props.state.filter.disabled": "未启用",

View File

@ -61,19 +61,19 @@ const WorkflowList = () => {
),
},
{
key: "type",
title: t("workflow.props.execution_method"),
key: "trigger",
title: t("workflow.props.trigger"),
ellipsis: true,
render: (_, record) => {
const method = record.type;
if (!method) {
const trigger = record.type;
if (!trigger) {
return "-";
} else if (method === "manual") {
return <Typography.Text>{t("workflow.node.start.form.executionMethod.options.manual")}</Typography.Text>;
} else if (method === "auto") {
} else if (trigger === "manual") {
return <Typography.Text>{t("workflow.props.trigger.manual")}</Typography.Text>;
} else if (trigger === "auto") {
return (
<Space className="max-w-full" direction="vertical" size={4}>
<Typography.Text>{t("workflow.node.start.form.executionMethod.options.auto")}</Typography.Text>
<Typography.Text>{t("workflow.props.trigger.auto")}</Typography.Text>
<Typography.Text type="secondary">{record.crontab ?? ""}</Typography.Text>
</Space>
);