chore: 更多翻译

pull/453/head
xiaojunnuo 2025-06-30 16:34:09 +08:00
parent 66d1886663
commit 8341749c04
7 changed files with 50 additions and 21 deletions

View File

@ -682,4 +682,20 @@ export default {
setAsDefault: "Set as Default", setAsDefault: "Set as Default",
disabledLabel: "Disabled", disabledLabel: "Disabled",
confirmToggleStatus: "Are you sure to {action}?", confirmToggleStatus: "Are you sure to {action}?",
template: {
title: "Pipeline Template",
edit: "Pipeline Template Edit",
importCreate: "Pipeline Batch Create",
// intro: "可根据模版批量创建流水线",
intro: "Batch create pipeline based on template",
createTemplate: "Create Template",
useTemplate: "Use This Template",
batchCreate: "Batch Create Pipeline",
singleCreate: "Create Single Pipeline",
importCreate: "Batch Import Create",
templateName: "Template Name",
enterTemplateName: "Please enter template name",
copyPipelineConfig: "Copy this pipeline configuration as template source",
pipeline: "Pipeline",
},
}; };

View File

@ -685,4 +685,20 @@ export default {
setAsDefault: "设为默认", setAsDefault: "设为默认",
disabledLabel: "禁用", disabledLabel: "禁用",
confirmToggleStatus: "确定要{action}吗?", confirmToggleStatus: "确定要{action}吗?",
template: {
title: "流水线模版",
edit: "流水线模版编辑",
importCreate: "流水线模版批量创建",
intro: "可根据模版批量创建流水线",
createTemplate: "创建模版",
useTemplate: "使用此模板",
batchCreate: "批量创建流水线",
singleCreate: "创建单个流水线",
importCreate: "批量导入创建",
templateName: "模板名称",
enterTemplateName: "请输入模板名称",
copyPipelineConfig: "复制该流水线配置作为模板来源",
pipeline: "流水线",
},
}; };

View File

@ -44,7 +44,7 @@ export const certdResources = [
}, },
}, },
{ {
title: "流水线模版", title: "certd.template.title",
name: "PipelineTemplate", name: "PipelineTemplate",
path: "/certd/pipeline/template", path: "/certd/pipeline/template",
component: "/certd/pipeline/template/index.vue", component: "/certd/pipeline/template/index.vue",
@ -54,7 +54,7 @@ export const certdResources = [
}, },
}, },
{ {
title: "流水线模版编辑", title: "certd.template.edit",
name: "PipelineTemplateEdit", name: "PipelineTemplateEdit",
path: "/certd/pipeline/template/edit", path: "/certd/pipeline/template/edit",
component: "/certd/pipeline/template/edit.vue", component: "/certd/pipeline/template/edit.vue",
@ -63,7 +63,7 @@ export const certdResources = [
}, },
}, },
{ {
title: "流水线模版批量创建", title: "certd.template.importCreate",
name: "PipelineTemplateImport", name: "PipelineTemplateImport",
path: "/certd/pipeline/template/import", path: "/certd/pipeline/template/import",
component: "/certd/pipeline/template/import/index.vue", component: "/certd/pipeline/template/import/index.vue",

View File

@ -5,8 +5,10 @@ import { useModal } from "/@/use/use-modal";
import createCrudOptionsPipeline from "../crud"; import createCrudOptionsPipeline from "../crud";
import * as pipelineApi from "../api"; import * as pipelineApi from "../api";
import { useTemplate } from "/@/views/certd/pipeline/template/use"; import { useTemplate } from "/@/views/certd/pipeline/template/use";
import { useI18n } from "/@/locales";
export default function ({ crudExpose, context }: CreateCrudOptionsProps): CreateCrudOptionsRet { export default function ({ crudExpose, context }: CreateCrudOptionsProps): CreateCrudOptionsRet {
const api = templateApi; const api = templateApi;
const { t } = useI18n();
const pageRequest = async (query: UserPageQuery): Promise<UserPageRes> => { const pageRequest = async (query: UserPageQuery): Promise<UserPageRes> => {
return await api.GetList(query); return await api.GetList(query);
}; };
@ -65,7 +67,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
show: true, show: true,
buttons: { buttons: {
add: { add: {
text: "创建模版", text: t("certd.template.createTemplate"),
type: "primary", type: "primary",
show: true, show: true,
}, },
@ -119,13 +121,13 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
}, },
}, },
title: { title: {
title: "模版名称", title: t("certd.template.templateName"),
type: "text", type: "text",
search: { search: {
show: true, show: true,
}, },
form: { form: {
rules: [{ required: true, message: "请输入模版名称" }], rules: [{ required: true, message: t("certd.template.enterTemplateName") }],
}, },
column: { column: {
width: 400, width: 400,
@ -141,7 +143,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
}, },
}, },
pipelineId: { pipelineId: {
title: "流水线ID", title: t("certd.template.pipeline"),
type: "table-select", type: "table-select",
search: { show: true }, search: { show: true },
dict: dict({ dict: dict({
@ -160,7 +162,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
}, },
form: { form: {
show: true, show: true,
helper: "复制该流水线配置作为模版来源", helper: t("certd.template.copyPipelineConfig"),
component: { component: {
valuesFormat: { valuesFormat: {
labelFormatter: (item: any) => { labelFormatter: (item: any) => {
@ -191,7 +193,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
}, },
}, },
useCreate: { useCreate: {
title: "使用此模版", title: t("certd.template.useTemplate"),
form: { show: false }, form: { show: false },
column: { column: {
conditionalRender: false, conditionalRender: false,
@ -208,14 +210,14 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
return ( return (
<a class={"flex items-center"} onClick={create}> <a class={"flex items-center"} onClick={create}>
<fs-icon icon={"ion:duplicate-outline"}></fs-icon> <fs-icon icon={"ion:duplicate-outline"}></fs-icon>
<span class={"ml-5"}>线</span> <span class={"ml-5"}>{t("certd.template.singleCreate")}</span>
</a> </a>
); );
}, },
}, },
}, },
useImport: { useImport: {
title: "使用此模版", title: t("certd.template.useTemplate"),
form: { show: false }, form: { show: false },
column: { column: {
conditionalRender: false, conditionalRender: false,
@ -224,7 +226,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
return ( return (
<router-link class={"flex items-center"} to={{ path: "/certd/pipeline/template/import", query: { templateId: row.id } }}> <router-link class={"flex items-center"} to={{ path: "/certd/pipeline/template/import", query: { templateId: row.id } }}>
<fs-icon icon={"ion:duplicate"}></fs-icon> <fs-icon icon={"ion:duplicate"}></fs-icon>
<span class={"ml-5"}>线</span> <span class={"ml-5"}>{t("certd.template.batchCreate")}</span>
</router-link> </router-link>
); );
}, },

View File

@ -2,9 +2,9 @@
<fs-page> <fs-page>
<template #header> <template #header>
<div class="title flex items-center"> <div class="title flex items-center">
流水线模版 {{ t("certd.template.title") }}
<span class="ml-10 sub flex items-center"> <span class="ml-10 sub flex items-center">
<span>可根据模版批量创建流水线 </span> <span>{{ t("certd.template.intro") }} </span>
<vip-button class="ml-10" mode="button" /> <vip-button class="ml-10" mode="button" />
</span> </span>
</div> </div>
@ -17,12 +17,12 @@
import { onActivated, onMounted } from "vue"; import { onActivated, onMounted } from "vue";
import { useFs } from "@fast-crud/fast-crud"; import { useFs } from "@fast-crud/fast-crud";
import createCrudOptions from "./crud"; import createCrudOptions from "./crud";
import { useI18n } from "vue-i18n";
defineOptions({ defineOptions({
name: "PipelineTemplate", name: "PipelineTemplate",
}); });
const { crudBinding, crudRef, crudExpose } = useFs({ createCrudOptions, context: {} }); const { crudBinding, crudRef, crudExpose } = useFs({ createCrudOptions, context: {} });
const { t } = useI18n();
// //
onMounted(() => { onMounted(() => {
crudExpose.doRefresh(); crudExpose.doRefresh();

View File

@ -217,7 +217,6 @@ export default defineComponent({
</script> </script>
<style lang="less"> <style lang="less">
@import "../../../style/theme/index.less";
.login-page.main { .login-page.main {
//margin: 20px !important; //margin: 20px !important;
@ -229,7 +228,6 @@ export default defineComponent({
//} //}
.login-title { .login-title {
color: @primary-color;
font-size: 18px; font-size: 18px;
text-align: center; text-align: center;
margin: 20px; margin: 20px;
@ -274,7 +272,6 @@ export default defineComponent({
transition: color 0.3s; transition: color 0.3s;
&:hover { &:hover {
color: @primary-color;
} }
} }

View File

@ -232,7 +232,6 @@ export default defineComponent({
</script> </script>
<style lang="less"> <style lang="less">
@import "../../../style/theme/index.less";
.user-layout-register { .user-layout-register {
label { label {
font-size: 14px; font-size: 14px;
@ -294,7 +293,6 @@ export default defineComponent({
transition: color 0.3s; transition: color 0.3s;
&:hover { &:hover {
color: @primary-color;
} }
} }