Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: wording improvement to SQL Review CI (#3054)

Tianzhou (天舟)3c6c525415d0
diff --git a/frontend/src/components/RepositoryForm.vue b/frontend/src/components/RepositoryForm.vue
index 57e16fe194..6e81474c6c 100644
--- a/frontend/src/components/RepositoryForm.vue
+++ b/frontend/src/components/RepositoryForm.vue
@@ -239,16 +239,19 @@
pr: vcsType.startsWith("GITLAB")
? $t("repository.merge-request")
: $t("repository.pull-request"),
+ pathTemplate:
+ schemaChangeType == "DDL"
+ ? $t("repository.file-path-template")
+ : $t("repository.schema-path-template"),
})
}}
</div>
<div class="flex space-x-4 mt-2">
<BBCheckbox
- :title="$t('repository.sql-review-ci-enable')"
+ :title="enableSQLReviewTitle"
:value="repositoryConfig.enableSQLReviewCI"
@toggle="(on: boolean) => {
- repositoryConfig.enableSQLReviewCI = on;
- }"
+ repositoryConfig.enableSQLReviewCI = on; }"
/>
</div>
</div>
@@ -257,6 +260,7 @@
<script lang="ts">
import { reactive, PropType, defineComponent, computed } from "vue";
+import { useI18n } from "vue-i18n";
import {
ExternalRepositoryInfo,
Project,
@@ -314,6 +318,8 @@ export default defineComponent({
},
emits: ["change-repository", "change-schema-change-type"],
setup(props) {
+ const { t } = useI18n();
+
const state = reactive<LocalState>({});
const isTenantProject = computed(() => {
@@ -322,6 +328,11 @@ export default defineComponent({
const isProjectSchemaChangeTypeDDL = computed(() => {
return (props.schemaChangeType || "DDL") === "DDL";
});
+ const enableSQLReviewTitle = computed(() => {
+ return props.vcsType.startsWith("GITLAB")
+ ? t("repository.sql-review-ci-enable-gitlab")
+ : t("repository.sql-review-ci-enable-github");
+ });
const sampleFilePath = (
baseDirectory: string,
@@ -410,6 +421,7 @@ export default defineComponent({
schemaOptionalTagPlaceholder,
state,
isProjectSchemaChangeTypeDDL,
+ enableSQLReviewTitle,
sampleFilePath,
sampleSchemaPath,
};
diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.json
index c5cdc71414..4038939dd1 100644
--- a/frontend/src/locales/en-US.json
+++ b/frontend/src/locales/en-US.json
@@ -929,8 +929,9 @@
"sheet-path-template": "Sheet path template",
"sheet-path-template-description": "Bytebase only observes files with pathnames matching the template pattern relative to the base directory. The matched files will be synchronized to the SQL Editor for usage there.",
"sql-review-ci": "SQL Review CI",
- "sql-review-ci-enable": "Enable SQL Review CI",
- "sql-review-ci-description": "Bytebase will create a {pr} for your repository to set up the SQL review CI. Once CI setup, we will take SQL reviews in every {pr} for changed SQL files.",
+ "sql-review-ci-enable-gitlab": "Enable SQL Review CI via GitLab CI",
+ "sql-review-ci-enable-github": "Enable SQL Review CI via GitHub Action",
+ "sql-review-ci-description": "Bytebase will create a {pr} to set up the SQL review CI in your repository. After the setup, in every {pr}, the SQL review policy will check against changed files matching the \"{pathTemplate}\".",
"sql-review-ci-setup": "Setup SQL Review CI",
"sql-review-ci-setup-pr": "Review the {pr}",
"merge-request": "merge request",
@@ -1399,8 +1400,8 @@
"desc": "Customize the SQL review policy for different environments, can only use limited rules in the free plan. @:{'subscription.trial'}."
},
"bb-feature-vcs-sql-review": {
- "title": "SQL review in GitOps workflow",
- "desc": "We can help you setup the SQL review CI in GitOps workflow. The SQL review will be triggered in the pull request for changed SQL files."
+ "title": "SQL Review in GitOps workflow",
+ "desc": "Add the SQL Review CI to your VCS repository pipeline. SQL Review will be triggered in the pull request for changed SQL files."
},
"bb-feature-rbac": {
"title": "Role management",
diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.json
index 5558c5a4bf..289ede558a 100644
--- a/frontend/src/locales/zh-CN.json
+++ b/frontend/src/locales/zh-CN.json
@@ -930,7 +930,9 @@
"sheet-path-template-description": "Bytebase 仅跟踪文件路径匹配模版 (相对于指定根目录)的文件。匹配的文件将被同步到 SQL Editor 以供使用。",
"sql-review-ci": "SQL 审核 CI",
"sql-review-ci-enable": "开启 SQL 审核 CI",
- "sql-review-ci-description": "Bytebase 会通过{pr}自动为您的代码仓库创建 SQL 审核 CI。创建完成后,将会在仓库{pr}中对变动的 SQL 文件进行审核。",
+ "sql-review-ci-enable-gitlab": "基于 GitLab CI 开启 SQL 审核",
+ "sql-review-ci-enable-github": "基于 GitHub Action 开启 SQL 审核",
+ "sql-review-ci-description": "Bytebase 会发起{pr}为您的代码仓库配置 SQL 审核 CI。配置完成后,在每一个{pr}中,SQL 审核策略将应用于任何匹配上「{pathTemplate}」的文件修改。",
"sql-review-ci-setup": "配置 SQL 审核 CI",
"sql-review-ci-setup-pr": "查看{pr}",
"merge-request": "合并请求",
@@ -1400,7 +1402,7 @@
},
"bb-feature-vcs-sql-review": {
"title": "GitOps 工作流中的 SQL 审核",
- "desc": "为您的 GitOps 工作流创建 SQL 审核 CI,以便在拉取请求中对变动的 SQL 文件进行审核。"
+ "desc": "在您的 VCS 仓库流水线上添加 SQL 审核 CI,以便在拉取请求中对变动的 SQL 文件进行自动审核。"
},
"bb-feature-rbac": {
"title": "角色管理",