Skip to content

Commit

Permalink
feat:流水线变量语法支持两种风格 TencentBlueKing#10576
Browse files Browse the repository at this point in the history
# Reviewed, transaction id: 20411
  • Loading branch information
useryuyu committed Oct 12, 2024
1 parent 3903b4e commit d6ec18d
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</div>
</template>
</bk-table-column>
<bk-table-column :label="t('传统风格')" prop="classic" :width="290">
<bk-table-column :label="t('CLASSIC')" prop="classic" :width="290">
<template #default="{ row }">
<div
class="label-column"
Expand All @@ -41,7 +41,7 @@
</div>
</template>
</bk-table-column>
<bk-table-column :label="t('制约风格')" prop="constrainedMode">
<bk-table-column :label="t('CONSTRAINED')" prop="constrainedMode">
<template #default="{ row }">
<div
class="label-column"
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/devops-manage/src/components/project-form.vue
Original file line number Diff line number Diff line change
Expand Up @@ -480,10 +480,10 @@ onBeforeUnmount(() => {
@change="handleChangeForm"
>
<bk-radio label="CLASSIC">
<span>{{ t('传统风格') }}</span>
<span>{{ t('CLASSIC') }}</span>
</bk-radio>
<bk-radio label="CONSTRAINED">
<span>{{ t('制约风格') }}</span>
<span>{{ t('CONSTRAINED') }}</span>
</bk-radio>
</bk-radio-group>
</bk-form-item>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,10 +302,6 @@ const projectTypeNameMap = {
4: t('平台产品'),
5: t('支撑产品'),
}
const pipelineDialectMap = {
'CLASSIC': t('传统风格'),
'CONSTRAINED': t('制约风格'),
}
watch(() => projectData.value.approvalStatus, (status) => {
if (status === 4) fetchDiffProjectData();
}, {
Expand Down Expand Up @@ -422,12 +418,12 @@ onMounted(async () => {
<dialect-popover-table />
</template>
<div>
<span>{{ pipelineDialectMap[projectData.pipelineDialect] }}</span>
<span>{{ t(projectData.pipelineDialect) }}</span>
<div class="diff-content" v-if="projectData.afterPipelineDialect">
<p class="update-title">
{{ t('本次更新:') }}
</p>
<span>{{ pipelineDialectMap[projectData.afterPipelineDialect] }}</span>
<span>{{ t(projectData.afterPipelineDialect) }}</span>
</div>
</div>
</bk-form-item>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@
return {
activeName: ['baseInfo', 'executeConfig'],
namingStyle: {
CLASSIC: this.$t('traditionalStyle'),
CONSTRAINED: this.$t('constraintStyle')
CLASSIC: this.$t('CLASSIC'),
CONSTRAINED: this.$t('CONSTRAINED')
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</template>
</bk-table-column>
<bk-table-column
:label="$t('traditionalStyle')"
:label="$t('CLASSIC')"
prop="classic"
:width="290"
>
Expand All @@ -42,7 +42,7 @@
</template>
</bk-table-column>
<bk-table-column
:label="$t('constraintStyle')"
:label="$t('CONSTRAINED')"
prop="constrainedMode"
>
<template slot-scope="props">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@
:value="'CLASSIC'"
:disabled="isDialectDisabled"
>
<span>{{ $t('traditionalStyle') }}</span>
<span>{{ $t('CLASSIC') }}</span>
</bk-radio>
<bk-radio
class="radio-label"
:value="'CONSTRAINED'"
:disabled="isDialectDisabled"
>
<span>{{ $t('constraintStyle') }}</span>
<span>{{ $t('CONSTRAINED') }}</span>
</bk-radio>
</bk-radio-group>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/locale/manage/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,8 @@
"过去 X 天": "Last {0} Days",
"变量语法风格": "Naming Convention",
"继承项目设置": "Inherited Project Settings",
"传统风格": "Traditional Style",
"制约风格": "Constraint Style",
"CLASSIC": "Traditional Style",
"CONSTRAINED": "Constraint Style",
"语法差异": "Grammatical Differences",
"差异项": "Difference Item",

Expand Down
4 changes: 2 additions & 2 deletions src/frontend/locale/manage/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,8 @@
"过去 X 天": "过去 {0} 天",
"变量语法风格": "变量语法风格",
"继承项目设置": "继承项目设置",
"传统风格": "传统风格",
"制约风格": "制约风格",
"CLASSIC": "传统风格",
"CONSTRAINED": "制约风格",
"语法差异": "语法差异",
"差异项": "差异项",

Expand Down
4 changes: 2 additions & 2 deletions src/frontend/locale/pipeline/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -1581,8 +1581,8 @@
"templateRollbackBackTips": "The current pipeline is in constraint mode (template instance). You need to jump to the template to roll back the version.",
"namingConvention": "Naming Convention",
"inheritedProject": "Inherited Project Settings",
"traditionalStyle": "Traditional Style",
"constraintStyle": "Constraint Style",
"CLASSIC": "Traditional Style",
"CONSTRAINED": "Constraint Style",
"grammaticalDifferences": "Grammatical Differences",
"differenceItem": "Difference Item",

Expand Down
4 changes: 2 additions & 2 deletions src/frontend/locale/pipeline/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -1583,8 +1583,8 @@
"templateRollbackBackTips": "当前流水线为约束模式(模板实例),需要跳转到模板进行版本回滚。",
"namingConvention": "变量语法风格",
"inheritedProject": "继承项目设置",
"traditionalStyle": "传统风格",
"constraintStyle": "制约风格",
"CLASSIC": "传统风格",
"CONSTRAINED": "制约风格",
"grammaticalDifferences": "语法差异",
"differenceItem": "差异项",

Expand Down

0 comments on commit d6ec18d

Please sign in to comment.