Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: add i18n for database group (#6404)
boojack06321cd89f8d
diff --git a/frontend/src/components/AlterSchemaPrepForm/AlterSchemaPrepForm.vue b/frontend/src/components/AlterSchemaPrepForm/AlterSchemaPrepForm.vueindex c4981a96f5..832eb5c830 100644--- a/frontend/src/components/AlterSchemaPrepForm/AlterSchemaPrepForm.vue+++ b/frontend/src/components/AlterSchemaPrepForm/AlterSchemaPrepForm.vue@@ -36,7 +36,7 @@name="database-tab"@update:checked="state.databaseSelectedTab = 'DATABASE'">- Database+ {{ $t("common.database") }}</NRadio><NRadio:checked="state.databaseSelectedTab === 'DATABASE_GROUP'"@@ -45,7 +45,7 @@@update:checked="handleDatabaseGroupTabSelect"><div class="flex flex-row items-center">- <span class="mr-1">Database group</span>+ <span class="mr-1">{{ $t("database-group.self") }}</span><FeatureBadge feature="bb.feature.sharding" /></div></NRadio>@@ -170,7 +170,7 @@name="database-tab"@update:checked="state.databaseSelectedTab = 'DATABASE'">- Database+ {{ $t("common.database") }}</NRadio><NRadio:checked="state.databaseSelectedTab === 'DATABASE_GROUP'"@@ -179,7 +179,7 @@@update:checked="handleDatabaseGroupTabSelect"><div class="flex flex-row items-center">- <span class="mr-1">Database group</span>+ <span class="mr-1">{{ $t("database-group.self") }}</span><FeatureBadge feature="bb.feature.sharding" /></div></NRadio>diff --git a/frontend/src/components/DatabaseGroup/DatabaseGroupForm.vue b/frontend/src/components/DatabaseGroup/DatabaseGroupForm.vueindex c6094f6dfe..d92f22ebd7 100644--- a/frontend/src/components/DatabaseGroup/DatabaseGroupForm.vue+++ b/frontend/src/components/DatabaseGroup/DatabaseGroupForm.vue@@ -2,7 +2,7 @@<div class="w-full"><div class="w-full grid grid-cols-3 gap-x-6 pb-6 mb-4 border-b"><div>- <p class="text-lg mb-2">Name</p>+ <p class="text-lg mb-2">{{ $t("common.name") }}</p><ResourceIdInputref="resourceIdInput":value="state.resourceId"@@ -12,7 +12,7 @@/></div><div>- <p class="text-lg mb-2">Environment</p>+ <p class="text-lg mb-2">{{ $t("common.environment") }}</p><EnvironmentSelect:disabled="!isCreating":selected-id="state.environmentId"@@ -24,7 +24,7 @@/></div><div v-if="resourceType === 'DATABASE_GROUP'">- <p class="text-lg mb-2">Project</p>+ <p class="text-lg mb-2">{{ $t("common.project") }}</p><inputrequiredtype="text"@@ -35,7 +35,7 @@/></div><div v-if="resourceType === 'SCHEMA_GROUP'">- <p class="text-lg mb-2">Database group</p>+ <p class="text-lg mb-2">{{ $t("database-group.self") }}</p><DatabaseGroupSelect:disabled="!isCreating":project-id="project.name"@@ -51,7 +51,9 @@</div><div class="w-full grid grid-cols-5 gap-x-6"><div class="col-span-3">- <p class="pl-1 text-lg mb-2">Condition</p>+ <p class="pl-1 text-lg mb-2">+ {{ $t("database-group.condition.self") }}+ </p><ExprEditor:expr="state.expr":allow-admin="true"diff --git a/frontend/src/components/DatabaseGroup/DatabaseGroupPanel.vue b/frontend/src/components/DatabaseGroup/DatabaseGroupPanel.vueindex 0a9fbba8b9..b5ee86c99c 100644--- a/frontend/src/components/DatabaseGroup/DatabaseGroupPanel.vue+++ b/frontend/src/components/DatabaseGroup/DatabaseGroupPanel.vue@@ -76,9 +76,13 @@ const isCreating = computed(() => props.databaseGroup === undefined);const title = computed(() => {if (props.resourceType === "DATABASE_GROUP") {- return isCreating.value ? "Create database group" : "Edit database group";+ return isCreating.value+ ? t("database-group.create")+ : t("database-group.edit");} else if (props.resourceType === "SCHEMA_GROUP") {- return isCreating.value ? "Create table group" : "Edit table group";+ return isCreating.value+ ? t("database-group.table-group.create")+ : t("database-group.table-group.edit");} else {throw new Error("Unknown resource type");}diff --git a/frontend/src/components/DatabaseGroup/DatabaseGroupTable.vue b/frontend/src/components/DatabaseGroup/DatabaseGroupTable.vueindex c62746ed4e..d74357a2b1 100644--- a/frontend/src/components/DatabaseGroup/DatabaseGroupTable.vue+++ b/frontend/src/components/DatabaseGroup/DatabaseGroupTable.vue@@ -13,9 +13,9 @@</div><div class="bb-grid-cell">{{ item.environment.title }}</div><div v-if="props.showEdit" class="bb-grid-cell gap-x-2 justify-end">- <NButton size="small" @click.stop="$emit('edit', item)"- >Configure</NButton- >+ <NButton size="small" @click.stop="$emit('edit', item)">{{+ $t("common.configure")+ }}</NButton></div></template></BBGrid>diff --git a/frontend/src/components/DatabaseGroup/MatchedDatabaseView.vue b/frontend/src/components/DatabaseGroup/MatchedDatabaseView.vueindex 848500f0d9..7322dbce1e 100644--- a/frontend/src/components/DatabaseGroup/MatchedDatabaseView.vue+++ b/frontend/src/components/DatabaseGroup/MatchedDatabaseView.vue@@ -1,6 +1,6 @@<template><div class="mb-2 flex flex-row items-center">- <span class="text-lg mr-2">Databases</span>+ <span class="text-lg mr-2">{{ $t("common.databases") }}</span><BBLoader v-show="state.isRequesting" class="opacity-60" /></div><div@@ -11,7 +11,7 @@@click="state.showMatchedDatabaseList = !state.showMatchedDatabaseList"><div>- <span>Matched database</span>+ <span>{{ $t("database-group.matched-database") }}</span><span class="ml-1 text-gray-400">({{ matchedDatabaseList.length }})</span>@@ -48,7 +48,7 @@"><div>- <span>Unmatched database</span>+ <span>{{ $t("database-group.unmatched-database") }}</span><span class="ml-1 text-gray-400">({{ unmatchedDatabaseList.length }})</span>diff --git a/frontend/src/components/DatabaseGroup/MatchedTableView.vue b/frontend/src/components/DatabaseGroup/MatchedTableView.vueindex 1fb03854d3..6fd15f4155 100644--- a/frontend/src/components/DatabaseGroup/MatchedTableView.vue+++ b/frontend/src/components/DatabaseGroup/MatchedTableView.vue@@ -1,6 +1,6 @@<template><div class="mb-2 flex flex-row items-center">- <span class="text-lg mr-2">Tables</span>+ <span class="text-lg mr-2">{{ $t("db.tables") }}</span><BBLoader v-show="state.isRequesting" class="opacity-60" /></div><div@@ -11,7 +11,7 @@@click="state.showMatchedTableList = !state.showMatchedTableList"><div>- <span>Matched table</span>+ <span>{{ $t("database-group.matched-table") }}</span><span class="ml-1 text-gray-400">({{ matchedTableList.length }})</span></div><button class="opacity-60">@@ -39,7 +39,7 @@@click="state.showUnmatchedTableList = !state.showUnmatchedTableList"><div>- <span>Unmatched table</span>+ <span>{{ $t("database-group.unmatched-table") }}</span><span class="ml-1 text-gray-400">({{ unmatchedTableList.length }})</span>diff --git a/frontend/src/components/DatabaseGroup/ProjectDatabaseGroupPanel.vue b/frontend/src/components/DatabaseGroup/ProjectDatabaseGroupPanel.vueindex 2a4d593162..959640130e 100644--- a/frontend/src/components/DatabaseGroup/ProjectDatabaseGroupPanel.vue+++ b/frontend/src/components/DatabaseGroup/ProjectDatabaseGroupPanel.vue@@ -1,10 +1,10 @@<template><div class="w-full"><div class="w-full flex flex-row justify-between items-center">- <span>Database groups</span>+ <span>{{ $t("database-group.self") }}</span><div class="flex flex-row gap-x-2"><NButton @click="handleCreateDatabaseGroup">- <span class="mr-1">New database group</span>+ <span class="mr-1">{{ $t("database-group.create") }}</span><FeatureBadge feature="bb.feature.sharding" /></NButton></div>diff --git a/frontend/src/components/DatabaseGroup/SchemaGroupTable.vue b/frontend/src/components/DatabaseGroup/SchemaGroupTable.vueindex 455eadf565..35691932fe 100644--- a/frontend/src/components/DatabaseGroup/SchemaGroupTable.vue+++ b/frontend/src/components/DatabaseGroup/SchemaGroupTable.vue@@ -12,9 +12,9 @@{{ item.resourceId }}</div><div class="bb-grid-cell gap-x-2 justify-end">- <NButton size="small" @click.stop="$emit('edit', item.schemaGroup)"- >Configure</NButton- >+ <NButton size="small" @click.stop="$emit('edit', item.schemaGroup)">{{+ $t("common.configure")+ }}</NButton></div></template></BBGrid>diff --git a/frontend/src/layouts/ProjectLayout.vue b/frontend/src/layouts/ProjectLayout.vueindex cddd840db1..fd88c48814 100644--- a/frontend/src/layouts/ProjectLayout.vue+++ b/frontend/src/layouts/ProjectLayout.vue@@ -48,7 +48,6 @@ import {idFromSlug,hasWorkspacePermissionV1,hasPermissionInProjectV1,- isDev,} from "../utils";import ArchiveBanner from "../components/ArchiveBanner.vue";import { BBTabFilterItem } from "../bbkit/types";@@ -135,8 +134,7 @@ export default defineComponent({{ name: t("common.overview"), hash: "overview" },{ name: t("common.databases"), hash: "databases" },- // TODO(steven): remove this after we release the feature.- isDev() && isTenantProject.value+ isTenantProject.value? { name: "Database groups", hash: "database-groups" }: null,diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.jsonindex 1c240e987d..192a4045ae 100644--- a/frontend/src/locales/en-US.json+++ b/frontend/src/locales/en-US.json@@ -250,7 +250,8 @@"months": "{months} months","years": "{years} year"},- "expiration": "Expiration"+ "expiration": "Expiration",+ "configure": "Configure"},"error-page": {"go-back-home": "Go back home"@@ -2523,9 +2524,24 @@"select-role": "Select role"},"database-group": {+ "self": "Database group",+ "create": "New database group",+ "edit": "Edit database group",+ "matched-database": "Matched database",+ "unmatched-database": "Unmatched database",+ "matched-table": "Matched table",+ "unmatched-table": "Unmatched table",+ "table-group": {+ "self": "Table group",+ "create": "New table group",+ "edit": "Edit table group"+ },"factor": {"resource_database_name": "Database name","resource_table_name": "Table name"+ },+ "condition": {+ "self": "Condition"}}}diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.jsonindex 0e5a054a58..41e576b389 100644--- a/frontend/src/locales/es-ES.json+++ b/frontend/src/locales/es-ES.json@@ -250,7 +250,8 @@"months": "{months} meses","years": "{years} años"},- "expiration": "Expiración"+ "expiration": "Expiración",+ "configure": "Configure"},"error-page": {"go-back-home": "Volver al inicio"@@ -1990,6 +1991,10 @@"title": "Secretos Encriptados","desc": "Almacene sus secretos de base de datos y utilícelos en sus scripts de SQL de Incidencias."},+ "bb-feature-sharding": {+ "title": "Sharding de bases de datos/tablas",+ "desc": "Utilice grupos de bases de datos para administrar fácilmente la fragmentación de bases de datos/tablas."+ },"bb-feature-disallow-signup": {"title": "Deshabilitar el registro de autoservicio","desc": "Una vez deshabilitados, los usuarios no pueden registrarse por sí mismos y solo pueden ser invitados por el propietario del espacio de trabajo."@@ -2497,9 +2502,24 @@"select-role": "Seleccionar rol"},"database-group": {+ "self": "Grupo de bases de datos",+ "create": "Crear grupo de bases de datos",+ "edit": "Editar grupo de bases de datos",+ "matched-database": "Base de datos coincidente",+ "unmatched-database": "Base de datos no coincidente",+ "matched-table": "Tabla coincidente",+ "unmatched-table": "Tabla no coincidente",+ "table-group": {+ "self": "Grupo de tablas",+ "create": "Crear grupo de tablas",+ "edit": "Editar grupo de tablas"+ },"factor": {- "resource_database_name": "nombre de la base de datos",- "resource_table_name": "nombre de la tabla"+ "resource_database_name": "Nombre de la base de datos",+ "resource_table_name": "Nombre de la tabla"+ },+ "condition": {+ "self": "Condición"}}}diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.jsonindex e6cedbde4b..98bcb2cf30 100644--- a/frontend/src/locales/zh-CN.json+++ b/frontend/src/locales/zh-CN.json@@ -248,7 +248,8 @@"months": "{months} 月","years": "{years} 年"},- "expiration": "过期时间"+ "expiration": "过期时间",+ "configure": "配置"},"error-page": {"go-back-home": "回到主页"@@ -2003,6 +2004,10 @@"title": "保密变量","desc": "存储数据库的保密变量,并在工单的 SQL 中使用它们。"},+ "bb-feature-sharding": {+ "title": "数据库/表分组",+ "desc": "利用数据库组轻松管理数据库/表分片。"+ },"bb-feature-disallow-signup": {"title": "禁用自助注册","desc": "禁用之后,新用户将无法自助注册,只能通过管理员邀请来创建账户。"@@ -2511,9 +2516,24 @@"select-role": "选择角色"},"database-group": {+ "self": "数据库分组",+ "create": "新建数据库分组",+ "edit": "编辑数据库分组",+ "matched-database": "相匹配的数据库",+ "unmatched-database": "不匹配的数据库",+ "matched-table": "相匹配的表",+ "unmatched-table": "不匹配的表",+ "table-group": {+ "self": "表分组",+ "create": "新建表分组",+ "edit": "编辑表分组"+ },"factor": {"resource_database_name": "数据库名","resource_table_name": "表名"+ },+ "condition": {+ "self": "条件"}}}diff --git a/frontend/src/views/DatabaseGroupDetail.vue b/frontend/src/views/DatabaseGroupDetail.vueindex 234f09c9e1..21bac6b0d4 100644--- a/frontend/src/views/DatabaseGroupDetail.vue+++ b/frontend/src/views/DatabaseGroupDetail.vue@@ -6,7 +6,6 @@v-bind="$attrs"><main class="flex-1 relative overflow-y-auto">- <!-- Highlight Panel --><divclass="px-4 space-y-2 lg:space-y-0 lg:flex lg:items-center lg:justify-between">@@ -49,27 +48,16 @@<divclass="flex flex-row justify-end items-center flex-wrap shrink gap-x-2 gap-y-2">- <button- type="button"- class="btn-normal"- @click.prevent="handleEditDatabaseGroup"+ <NButton @click="handleEditDatabaseGroup">{{+ $t("common.configure")+ }}</NButton>+ <NButton+ @click="createMigration('bb.issue.database.schema.update')"+ >{{ $t("database.alter-schema") }}</NButton>- Configure- </button>- <button- type="button"- class="btn-normal"- @click.prevent="createMigration('bb.issue.database.schema.update')"- >- Alter Schema- </button>- <button- type="button"- class="btn-normal"- @click.prevent="createMigration('bb.issue.database.data.update')"- >- Change Data- </button>+ <NButton @click="createMigration('bb.issue.database.data.update')">{{+ $t("database.change-data")+ }}</NButton></div></div>@@ -77,7 +65,9 @@<div class="w-full px-3 max-w-5xl grid grid-cols-5 gap-x-6"><div class="col-span-3">- <p class="pl-1 text-lg mb-2">Condition</p>+ <p class="pl-1 text-lg mb-2">+ {{ $t("database-group.condition.self") }}+ </p><ExprEditor:expr="state.expr!":allow-admin="false"@@ -97,10 +87,10 @@<hr class="mt-8 my-4" /><div class="w-full max-w-5xl px-4"><div class="w-full flex flex-row justify-between items-center">- <p class="my-4">Table group</p>+ <p class="my-4">{{ $t("database-group.table-group.self") }}</p><div><NButton @click.prevent="handleCreateSchemaGroup">- New table group+ {{ $t("database-group.table-group.create") }}</NButton></div></div>diff --git a/frontend/src/views/ProjectDetail.vue b/frontend/src/views/ProjectDetail.vueindex 52eb0019c0..9dad82ef8a 100644--- a/frontend/src/views/ProjectDetail.vue+++ b/frontend/src/views/ProjectDetail.vue@@ -12,7 +12,7 @@/><ProjectDatabasesPanel v-else :database-list="databaseV1List" /></template>- <template v-if="isDev && hash === 'database-groups'">+ <template v-if="hash === 'database-groups'"><ProjectDatabaseGroupPanel :project="projectV1" /></template><template v-if="hash === 'change-history'">