Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
feat: i18n for migration history module part2 (#161)
tianzhou84eda4ef07ec
diff --git a/frontend/src/components/DatabaseMigrationHistoryPanel.vue b/frontend/src/components/DatabaseMigrationHistoryPanel.vueindex c1f2affcf8..a7612ea90f 100644--- a/frontend/src/components/DatabaseMigrationHistoryPanel.vue+++ b/frontend/src/components/DatabaseMigrationHistoryPanel.vue@@ -44,7 +44,7 @@:style="'INFO'":ok-text="$t('migration-history.establish-baseline')":cancel-text="$t('common.cancel')"- :title="`Establish new baseline for \'${database.name}\'`"+ :title="$t('migration-history.establish-database-baseline', { name: database.name })":description="$t('migration-history.establish-baseline-description')"@ok="() => {@@ -69,6 +69,7 @@ import {import { useRouter } from "vue-router";import { BBTableSectionDataSource } from "../bbkit/types";import { instanceSlug, isDBAOrOwner } from "../utils";+import { useI18n } from "vue-i18n";interface LocalState {migrationSetupStatus: MigrationSchemaStatus;@@ -90,6 +91,8 @@ export default {},},setup(props) {+ const { t } = useI18n();+const store = useStore();const router = useRouter();@@ -139,17 +142,17 @@ export default {const attentionTitle = computed((): string => {if (state.migrationSetupStatus == "NOT_EXIST") {return (- `Missing migration history schema on instance "${props.database.instance.name}".` ++ t('migration-history.instance-missing-migration-schema', { name: props.database.instance.name }) +(isDBAOrOwner(currentUser.value.role)? ""- : " Please contact your DBA to config it.")+ : " " + t('migration-history.contact-dba')));} else if (state.migrationSetupStatus == "UNKNOWN") {return (- `Unable to connect instance "${props.database.instance.name}" to retrieve migration history.` ++ t('migration-history.instance-bad-connection', { name: props.database.instance.name }) +(isDBAOrOwner(currentUser.value.role)? ""- : " Please contact your DBA to config it.")+ : " " + t('migration-history.contact-dba')));}return "";@@ -181,7 +184,7 @@ export default {},query: {template: "bb.issue.database.schema.baseline",- name: `Establish ${props.database.name} baseline`,+ name: t('migration-history.establish-database-baseline', { name: props.database.name }),project: props.database.project.id,databaseList: `${props.database.id}`,},diff --git a/frontend/src/locales/en.yml b/frontend/src/locales/en.ymlindex 4888096da6..ac26a1ca6c 100644--- a/frontend/src/locales/en.yml+++ b/frontend/src/locales/en.yml@@ -226,3 +226,7 @@ migration-history:that the current schema does reflect the desired state. For VCS workflow,there must exist a baseline before any incremental migration change can beapplied to the database.+ establish-database-baseline: Establish "{name}" baseline+ instance-missing-migration-schema: Missing migration history schema on instance "{name}".+ instance-bad-connection: Unable to connect instance "{name}" to retrieve migration history.+ contact-dba: Please contact your DBA to config itdiff --git a/frontend/src/locales/zh-CN.yml b/frontend/src/locales/zh-CN.ymlindex 1b626f9e10..ca45779ba4 100644--- a/frontend/src/locales/zh-CN.yml+++ b/frontend/src/locales/zh-CN.yml@@ -201,5 +201,9 @@ migration-history:refreshing-history: 刷新历史中 ...config-instance: 配置实例establish-baseline-description: >-- Bytebase 将用当前的 schema 作为新的基线。你应该检查当前的基线确实反映了期望的状态。- 对于 VCS 工作流来说,也只有在建立起基线的前提下,才能进行数据库变更。+ Bytebase 将用当前的 schema 作为新的基线。你应该检查当前的基线确实反映了期望的状态。 对于 VCS+ 工作流来说,也只有在建立起基线的前提下,才能进行数据库变更。+ establish-database-baseline: 建立「{name}」基线+ instance-missing-migration-schema: 实例「{name}」缺失用于记录迁移历史的 schema。+ instance-bad-connection: 无法连接实例「{name}」以获取迁移历史。+ contact-dba: 请联系你的 DBA 进行配置。