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): Instance (#203)
p0nye365c317d6bf
diff --git a/frontend/src/components/InstanceForm.vue b/frontend/src/components/InstanceForm.vueindex c0cfa878d9..46d1798a31 100644--- a/frontend/src/components/InstanceForm.vue+++ b/frontend/src/components/InstanceForm.vue@@ -13,15 +13,7 @@:key="index"><div- class="- flex- justify-center- px-2- py-4- border border-control-border- hover:bg-control-bg-hover- cursor-pointer- "+ class="flex justify-center px-2 py-4 border border-control-border hover:bg-control-bg-hover cursor-pointer"@click.capture="changeInstanceEngine(engine)"><div class="flex flex-col items-center">@@ -75,7 +67,8 @@><div class="sm:col-span-2 sm:col-start-1"><label for="name" class="textlabel flex flex-row items-center">- Instance Name <span style="color: red">*</span>+ {{ $t("instance.instance-name") }}+ <span style="color: red">*</span><template v-if="!create"><InstanceEngineIcon class="ml-1" :instance="state.instance" /><span class="ml-1">{{ state.instance.engineVersion }}</span>@@ -95,7 +88,8 @@<div class="sm:col-span-2 sm:col-start-1"><label for="environment" class="textlabel">- Environment <span v-if="create" style="color: red">*</span>+ {{ $t("common.environment") }}+ <span v-if="create" style="color: red">*</span></label><!-- Disallow changing environment after creation. This is to take the conservative approach to limit capability --><!-- eslint-disable vue/attribute-hyphenation -->@@ -124,10 +118,12 @@<div class="sm:col-span-3 sm:col-start-1"><label for="host" class="textlabel block"><template v-if="state.instance.engine == 'SNOWFLAKE'">- Account name <span style="color: red">*</span>+ {{ $t("instance.account-name") }}+ <span style="color: red">*</span></template><template v-else>- Host or Socket <span style="color: red">*</span>+ {{ $t("instance.host-or-socket") }}+ <span style="color: red">*</span></template></label><input@@ -137,8 +133,8 @@name="host":placeholder="state.instance.engine == 'SNOWFLAKE'- ? 'your Snowflake account name'- : 'e.g. host.docker.internal | <<ip>> | <<local socket>>'+ ? $t('instance.your-snowflake-account-name')+ : $t('instance.sentence.host.snowflake')"class="textfield mt-1 w-full":disabled="!allowEdit"@@ -149,13 +145,14 @@v-if="state.instance.engine == 'SNOWFLAKE'"class="mt-2 textinfolabel">- For proxy server, append @PROXY_HOST and specify PROXY_PORT in the- port+ {{ $t("instance.sentence.proxy.snowflake") }}</div></div><div class="sm:col-span-1">- <label for="port" class="textlabel block"> Port </label>+ <label for="port" class="textlabel block">+ {{ $t("instance.port") }}+ </label><inputid="port"type="number"@@ -174,10 +171,10 @@<span class="">{{state.instance.engine == "SNOWFLAKE"- ? "Snowflake Web Console"- : "External Link"- }}</span- >+ ? $t("instance.snowflake-web-console")+ : $t("instance.external-link")+ }}+ </span><buttonclass="ml-1 btn-icon":disabled="instanceLink(state.instance)?.trim().length == 0"@@ -201,8 +198,7 @@</template><template v-else><div class="mt-1 textinfolabel">- The external console URL managing this instance (e.g. AWS RDS- console, your in-house DB instance console)+ {{ $t("instance.sentence.console.snowflake") }}</div><inputid="externallink"@@ -223,20 +219,20 @@<div class="flex justify-between"><div><h3 class="text-lg leading-6 font-medium text-gray-900">- Connection info+ {{ $t("instance.connection-info") }}</h3><pclass="mt-1 text-sm text-gray-500":class="create ? 'max-w-xl' : ''">- This is the connection user used by Bytebase to perform DDL and- DML operations.+ {{ $t("instance.sentence.create-user") }}<spanv-if="!create"class="normal-link"@click="toggleCreateUserExample"- >Show how to create</span>+ {{ $t("instance.show-how-to-create") }}+ </span></p><!-- Specify the fixed width so the create instance dialog width won't shift when switching engine types--><div@@ -249,77 +245,86 @@state.instance.engine == 'TIDB'">- Below is an example to create user 'bytebase@%' with password- <span class="text-red-600">YOUR_DB_PWD</span> and grant the user- with the needed privileges.+ <i18n-t+ tag="p"+ keypath="instance.sentence.create-user-example.mysql.template"+ >+ <template #user>+ {{ $t("instance.sentence.create-user-example.mysql.user") }}+ </template>+ <template #password>+ <span class="text-red-600">+ {{+ $t(+ "instance.sentence.create-user-example.mysql.password"+ )+ }}+ </span>+ </template>+ </i18n-t></template><template v-else-if="state.instance.engine == 'CLICKHOUSE'">- Below is an example to create user 'bytebase' with password- <span class="text-red-600">YOUR_DB_PWD</span> and grant the user- with the needed privileges. First you need to enable- <a- class="normal-link"- href="https://clickhouse.com/docs/en/operations/access-rights/#access-control-usage"- target="__blank"- >- ClickHouse SQL-driven workflow</a+ <i18n-t+ tag="p"+ keypath="instance.sentence.create-user-example.clickhouse.template">- and then run the following query to create the user.+ <template #password>+ <span class="text-red-600"> YOUR_DB_PWD </span>+ </template>+ <template #link>+ <a+ class="normal-link"+ href="https://clickhouse.com/docs/en/operations/access-rights/#access-control-usage"+ target="__blank"+ >+ {{+ $t(+ "instance.sentence.create-user-example.clickhouse.sql-driven-workflow"+ )+ }}+ </a>+ </template>+ </i18n-t></template><template v-else-if="state.instance.engine == 'POSTGRES'"><BBAttentionclass="mb-1":style="'WARN'"- :title="'If the connecting instance is managed by the cloud provider, then SUPERUSER is not available and you should create the user via that provider\'s admin console. The created user will have provider specific semi-SUPERUSER privileges.'"+ :title="+ $t('instance.sentence.create-user-example.postgres.warn')+ "/>- Below is an example to create user 'bytebase' with password- <span class="text-red-600">YOUR_DB_PWD</span> and grant the user- with the needed privileges. If the connecting instance is- self-hosted, then you can grant SUPERUSER.+ <i18n-t+ tag="p"+ keypath="instance.sentence.create-user-example.postgres.template"+ >+ <template #password>+ <span class="text-red-600"> YOUR_DB_PWD </span>+ </template>+ </i18n-t></template><template v-else-if="state.instance.engine == 'SNOWFLAKE'">- Below is an example to create user 'bytebase' with password- <span class="text-red-600">YOUR_DB_PWD</span> for- <span class="text-red-600">YOUR_COMPUTE_WAREHOUSE</span> and- grant the user with the needed privileges.+ <i18n-t+ tag="p"+ keypath="instance.sentence.create-user-example.snowflake.template"+ >+ <template #password>+ <span class="text-red-600"> YOUR_DB_PWD </span>+ </template>+ <template #warehouse>+ <span class="text-red-600"> YOUR_COMPUTE_WAREHOUSE </span>+ </template>+ </i18n-t></template><div class="mt-2 flex flex-row"><span- class="- flex-1- min-w-0- w-full- inline-flex- items-center- px-3- py-2- border border-r border-control-border- bg-gray-50- sm:text-sm- whitespace-pre- "+ class="flex-1 min-w-0 w-full inline-flex items-center px-3 py-2 border border-r border-control-border bg-gray-50 sm:text-sm whitespace-pre">{{ grantStatement(state.instance.engine) }}</span><buttontabindex="-1"- class="- -ml-px- px-2- py-2- border border-gray-300- text-sm- font-medium- text-control-light- disabled:text-gray-300- bg-gray-50- hover:bg-gray-100- disabled:bg-gray-50- focus:ring-control focus:outline-none- focus-visible:ring-2- focus:ring-offset-1- disabled:cursor-not-allowed- "+ class="-ml-px px-2 py-2 border border-gray-300 text-sm font-medium text-control-light disabled:text-gray-300 bg-gray-50 hover:bg-gray-100 disabled:bg-gray-50 focus:ring-control focus:outline-none focus-visible:ring-2 focus:ring-offset-1 disabled:cursor-not-allowed"@click.prevent="copyGrantStatement"><heroicons-outline:clipboard class="w-6 h-6" />@@ -330,7 +335,9 @@</div><div class="pt-4 grid grid-cols-1 gap-y-4 gap-x-4 sm:grid-cols-3"><div class="sm:col-span-1 sm:col-start-1">- <label for="username" class="textlabel block"> Username </label>+ <label for="username" class="textlabel block">+ {{ $t("common.username") }}+ </label><!-- For mysql, username can be empty indicating anonymous user.But it's a very bad practice to use anonymous user for admin operation,thus we make it REQUIRED here. -->@@ -341,7 +348,9 @@class="textfield mt-1 w-full":disabled="!allowEdit":placeholder="- state.instance.engine == 'CLICKHOUSE' ? 'default' : ''+ state.instance.engine == 'CLICKHOUSE'+ ? $t('common.default')+ : ''":value="state.instance.username"@input="state.instance.username = $event.target.value"@@ -350,12 +359,14 @@<div class="sm:col-span-1 sm:col-start-1"><div class="flex flex-row items-center space-x-2">- <label for="password" class="textlabel block">Password</label>+ <label for="password" class="textlabel block">{{+ $t("common.password")+ }}</label><!-- In create mode, user can leave the password field empty and create the instance,so there is no need to show the checkbox. --><BBCheckboxv-if="!create"- :title="'Empty'"+ :title="$t('common.empty')":value="state.useEmptyPassword"@toggle="(on) => {@@ -372,8 +383,8 @@autocomplete="off":placeholder="state.useEmptyPassword- ? 'No password'- : 'YOUR_DB_PWD - write only'+ ? $t('instance.no-password')+ : $t('instance.password-write-only')":disabled="!allowEdit || state.useEmptyPassword":value="@@ -401,7 +412,7 @@:disabled="!state.instance.host"@click.prevent="testConnection">- Test Connection+ {{ $t("instance.test-connection") }}</button></div></div>@@ -412,7 +423,10 @@<!-- Create button group --><div v-if="create" class="flex justify-end items-center"><div>- <BBSpin v-if="state.creatingOrUpdating" :title="'Creating...'" />+ <BBSpin+ v-if="state.creatingOrUpdating"+ :title="$t('common.creating')"+ /></div><div class="ml-2"><button@@ -421,7 +435,7 @@:disabled="state.creatingOrUpdating"@click.prevent="cancel">- Cancel+ {{ $t("common.cancel") }}</button><buttontype="button"@@ -429,14 +443,17 @@:disabled="!allowCreate || state.creatingOrUpdating"@click.prevent="tryCreate">- Create+ {{ $t("common.create") }}</button></div></div><!-- Update button group --><div v-else class="flex justify-end items-center"><div>- <BBSpin v-if="state.creatingOrUpdating" :title="'Updating...'" />+ <BBSpin+ v-if="state.creatingOrUpdating"+ :title="$t('common.updating')"+ /></div><buttonv-if="allowEdit"@@ -445,7 +462,7 @@:disabled="!valueChanged || state.creatingOrUpdating"@click.prevent="doUpdate">- Update+ {{ $t("common.update") }}</button></div></div>@@ -453,8 +470,8 @@<BBAlertv-if="state.showCreateInstanceWarningModal":style="'WARN'"- :ok-text="'Ignore and create'"- :title="'Connection info seems to be incorrect'"+ :ok-text="$t('instance.ignore-and-create')"+ :title="$t('instance.connection-info-seems-to-be-incorrect')":description="state.createInstanceWarning"@ok="() => {@@ -488,6 +505,7 @@ import {EngineType,} from "../types";import isEmpty from "lodash-es/isEmpty";+import { useI18n } from "vue-i18n";interface LocalState {originalInstance?: Instance;@@ -506,7 +524,7 @@ export default {components: { EnvironmentSelect, InstanceEngineIcon },props: {create: {- default: "false", // TODO(ji): The string value raises an eslint ERROR. But I won't change it this time.+ default: false,type: Boolean,},instance: {@@ -519,6 +537,7 @@ export default {setup(props, { emit }) {const store = useStore();const router = useRouter();+ const { t } = useI18n();const currentUser: ComputedRef<Principal> = computed(() =>store.getters["auth/currentUser"]()@@ -531,7 +550,7 @@ export default {? cloneDeep(props.instance): {environmentId: UNKNOWN_ID,- name: "New Instance",+ name: t("instance.new-instance"),engine: "MYSQL",// In dev mode, Bytebase is likely run in naked style and access the local network via 127.0.0.1.// In release mode, Bytebase is likely run inside docker and access the local network via host.docker.internal.@@ -672,7 +691,9 @@ export default {if (isEmpty(resultSet.error)) {doCreate();} else {- state.createInstanceWarning = `Bytebase is unable to connect the instance. We recommend you to review the connection info again. But it's OK to ignore this warning for now. You can still fix the connection info from the instance detail page after creation.\n\nError detail: ${resultSet.error}`;+ state.createInstanceWarning = t("instance.unable-to-connect", [+ resultSet.error,+ ]);state.showCreateInstanceWarningModal = true;}});@@ -699,7 +720,10 @@ export default {store.dispatch("notification/pushNotification", {module: "bytebase",style: "SUCCESS",- title: `Successfully created instance '${createdInstance.name}'.`,+ title: t(+ "instance.successfully-created-instance-createdinstance-name",+ [createdInstance.name]+ ),});// After creating the instance, we will check if migration schema exists on the instance.@@ -753,7 +777,9 @@ export default {store.dispatch("notification/pushNotification", {module: "bytebase",style: "SUCCESS",- title: `Successfully updated instance '${instance.name}'.`,+ title: t("instance.successfully-updated-instance-instance-name", [+ instance.name,+ ]),});// Backend will sync the schema upon connection info change, so here we try to fetch the synced schema.@@ -771,7 +797,7 @@ export default {store.dispatch("notification/pushNotification", {module: "bytebase",style: "INFO",- title: `CREATE USER and GRANT statements copied to clipboard. Paste to your mysql client to apply.`,+ title: t("instance.copy-grant-statement"),});});};@@ -799,13 +825,13 @@ export default {store.dispatch("notification/pushNotification", {module: "bytebase",style: "SUCCESS",- title: `Successfully connected instance.`,+ title: t("instance.successfully-connected-instance"),});} else {store.dispatch("notification/pushNotification", {module: "bytebase",style: "CRITICAL",- title: `Failed to connect instance.`,+ title: t("instance.failed-to-connect-instance"),description: resultSet.error,// Manual hide, because user may need time to inspect the errormanualHide: true,diff --git a/frontend/src/components/InstanceTable.vue b/frontend/src/components/InstanceTable.vueindex 738981e788..d3fffd21e6 100644--- a/frontend/src/components/InstanceTable.vue+++ b/frontend/src/components/InstanceTable.vue@@ -46,6 +46,7 @@ import { BBTableColumn } from "../bbkit/types";import InstanceEngineIcon from "./InstanceEngineIcon.vue";import { urlfy, instanceSlug, environmentName } from "../utils";import { EnvironmentId, Instance } from "../types";+import { useI18n } from "vue-i18n";interface LocalState {columnList: BBTableColumn[];@@ -63,6 +64,7 @@ export default {},setup(props) {const store = useStore();+ const { t } = useI18n();const state = reactive<LocalState>({columnList: [@@ -70,19 +72,19 @@ export default {title: "",},{- title: "Name",+ title: t("common.name"),},{- title: "Environment",+ title: t("common.environment"),},{- title: "Address",+ title: t("common.Address"),},{- title: "External link",+ title: t("instance.external-link"),},{- title: "Created",+ title: t("common.created-at"),},],dataSource: [],diff --git a/frontend/src/components/InstanceUserTable.vue b/frontend/src/components/InstanceUserTable.vueindex b8f6d9b551..a7e17c030f 100644--- a/frontend/src/components/InstanceUserTable.vue+++ b/frontend/src/components/InstanceUserTable.vue@@ -22,15 +22,7 @@import { PropType } from "vue";import { BBTableColumn } from "../bbkit/types";import { InstanceUser } from "../types/InstanceUser";--const COLUMN_LIST: BBTableColumn[] = [- {- title: "User",- },- {- title: "Grants",- },-];+import { useI18n } from "vue-i18n";export default {name: "InstanceUserTable",@@ -42,6 +34,15 @@ export default {},},setup() {+ const { t } = useI18n();+ const COLUMN_LIST: BBTableColumn[] = [+ {+ title: t("common.User"),+ },+ {+ title: t("instance.grants"),+ },+ ];return {COLUMN_LIST,};diff --git a/frontend/src/locales/en.yml b/frontend/src/locales/en.ymlindex 30e91b0add..68f0e98cfd 100644--- a/frontend/src/locales/en.yml+++ b/frontend/src/locales/en.yml@@ -127,6 +127,11 @@ common:automatic: AutomaticDefault: Defaultdefinition: Definition+ empty: Empty+ creating: Creating...+ updating: Updating...+ Address: Address+ User: Userassigned: Assignedsubscribed: Subscribedcreated: Created@@ -398,6 +403,92 @@ instance:restore-this-instance: Restore this instancerestore: Restorerestore-instance-instance-name-to-normal-state: Restore instance '{0}' to normal state?+ account-name: Account name+ account: Account+ name: Name+ host-or-socket: Host or Socket+ your-snowflake-account-name: your Snowflake account name+ port: Port+ instance-name: Instance Name+ snowflake-web-console: Snowflake Web Console+ external-link: External Link+ web-console: Web Console+ connection-info: Connection info+ show-how-to-create: Show how to create+ below-is-an-example-to-create-user-bytebase-with-password: Below is an example to create user 'bytebase{'@'}%' with password+ below-is-an-example-to-create-user-bytebase-with-password-clickhouse: Below is an example to create user 'bytebase' with password+ your_db_pwd: YOUR_DB_PWD+ sentence:+ host:+ snowflake: e.g. host.docker.internal {'|'} <<ip>> {'|'} <<local socket>>+ proxy:+ snowflake: >-+ For proxy server, append {'@'}PROXY_HOST and specify PROXY_PORT in the+ port+ console:+ snowflake: >-+ The external console URL managing this instance (e.g. AWS RDS console,+ your in-house DB instance console)+ create-user: >-+ This is the connection user used by Bytebase to perform DDL and DML+ operations.+ create-user-example:+ snowflake:+ user: bytebase{'@'}%+ password: YOUR_DB_PWD+ template: >-+ Below is an example to create user 'bytebase' with password {password}+ for {warehouse} and grant the user with the needed privileges.+ mysql:+ password: YOUR_DB_PWD+ user: bytebase{'@'}%+ template: >-+ Below is an example to create user {user} with password {password} and+ grant the user with the needed privileges.+ clickhouse:+ template: >-+ Below is an example to create user 'bytebase' with password {password}+ and grant the user with the needed privileges. First you need to+ enable ClickHouse SQL-driven workflow {link} and then run the+ following query to create the user.+ sql-driven-workflow: SQL-driven workflow+ postgres:+ warn: >-+ If the connecting instance is managed by the cloud provider, then+ SUPERUSER is not available and you should create the user via that+ provider\'s admin console. The created user will have provider+ specific semi-SUPERUSER privileges.+ template: >-+ Below is an example to create user 'bytebase' with password {password}+ and grant the user with the needed privileges. If the connecting+ instance is self-hosted, then you can grant SUPERUSER.+ no-password: No password+ password-write-only: YOUR_DB_PWD - write only+ test-connection: Test Connection+ ignore-and-create: Ignore and create+ connection-info-seems-to-be-incorrect: Connection info seems to be incorrect+ new-instance: New Instance+ unable-to-connect: >-+ Bytebase is unable to connect the instance. We recommend you to review the+ connection info again. But it's OK to ignore this warning for now. You can+ still fix the connection info from the instance detail page after+ creation.\n\nError detail: {0}+ successfully-created-instance-createdinstance-name: Successfully created instance '{0}'.+ successfully-updated-instance-instance-name: Successfully updated instance '{0}'.+ copy-grant-statement: >-+ CREATE USER and GRANT statements copied to clipboard. Paste to your mysql+ client to apply.+ successfully-connected-instance: Successfully connected instance.+ failed-to-connect-instance: Failed to connect instance.+ how-to-setup-instance: How to setup \'Instance\' ?+ how-to-setup-instance-description: >-+ Each Bytebase instance belongs to an environment. An instance usually maps+ to one of your database instance represented by an host:port address. This+ could be your on-premises MySQL instance, a RDS instance.\n\nBytebase+ requires read/write (NOT the super privilege) access to the instance in+ order to perform database operations on behalf of the user.+ search-instance-name: Search instance name+ grants: Grantsenvironment:select: Select environmentarchive: Archive this environmentdiff --git a/frontend/src/locales/zh-CN.yml b/frontend/src/locales/zh-CN.ymlindex 8312247611..6ee0c13a1d 100644--- a/frontend/src/locales/zh-CN.yml+++ b/frontend/src/locales/zh-CN.yml@@ -127,6 +127,11 @@ common:automatic: 自动Default: 默认definition: 定义+ empty: 空+ creating: 创建中...+ updating: 更新中...+ Address: 地址+ User: 用户assigned: 已指派subscribed: 已订阅created: 已创建@@ -382,6 +387,66 @@ instance:restore-this-instance: 恢复该实例restore: 恢复restore-instance-instance-name-to-normal-state: 恢复实例'{0}'到正常状态?+ account-name: '@:instance.account@:instance.name'+ account: 账户+ name: 名称+ host-or-socket: Host 或 Socket+ your-snowflake-account-name: 您的 Snowflake @:{'instance.account'}@:{'instance.name'}+ port: 端口+ instance-name: '@:common.instance@:instance.name'+ snowflake-web-console: Snowflake @:{'instance.web-console'}+ external-link: 外部链接+ web-console: Web 控制台+ connection-info: 连接信息+ show-how-to-create: 如何创建+ below-is-an-example-to-create-user-bytebase-with-password: 创建用户 'bytebase{'@'}%' 及其密码的例子如下+ sentence:+ host:+ snowflake: 例如 host.docker.internal {'|'} <<ip>> {'|'} <<local socket>>+ proxy:+ snowflake: 对于代理服务器,加上 {'@'}PROXY_HOST,并在端口里指定 PROXY_PORT+ console:+ snowflake: "\b管理该@:{'common.instance'}的外部控制台 URL(如 AWS RDS 控制台,您的@:{'common.database'}控制台)"+ create-user: 这是 Bytebase 用于连接数据库,执行 DDL 和 DML 操作的用户。+ create-user-example:+ snowflake:+ user: bytebase{'@'}%+ password: YOUR_DB_PWD+ template: 创建用户 bytebase,密码 {password},warehouse 为{warehouse},并授予必要权限的例子如下。+ mysql:+ user: bytebase{'@'}%+ password: YOUR_DB_PWD+ template: 创建用户 {user},密码 {password},并授予必要权限的例子如下。+ clickhouse:+ sql-driven-workflow: SQL 工作流+ template: 创建用户 bytebase,密码 {password},并授予必要权限的例子如下。您需要首先启用 {link},才能执行以下创建用户的命令。+ postgres:+ warn: >-+ 如果您将要连接到的实例是由云服务供应商管理的话,那么 SUPERUSER+ 是不可用的,您需要通过供应商的管理员控制台来创建用户。您所创建的用户会拥有供应商特定的 semi-SUPERUSER 的权限。+ template: >-+ 创建用户 bytebase,密码 {password},并授予必要权限的例子如下。如果您将要连接到的实例是自己托管的,那么您可以 grant+ SUPERUSER。+ your_db_pwd: YOUR_DB_PWD+ no-password: 无密码+ password-write-only: YOUR_DB_PWD - 仅写入+ test-connection: 测试连接+ ignore-and-create: 忽略并创建+ connection-info-seems-to-be-incorrect: 连接信息似乎错误+ new-instance: 新实例+ unable-to-connect: >-+ Bytebase 无法连接到实例。我们推荐您再检查一遍连接信息。但也可以暂时忽略此警告。您在创建后仍能在实例详细页里修复连接信息。\n\n错误详情:+ {0}+ successfully-created-instance-createdinstance-name: 成功创建实例'{0}'。+ successfully-updated-instance-instance-name: 成功更新实例'{0}'。+ copy-grant-statement: CREATE USER and GRANT 语句已复制到剪贴板。 粘贴到您的 mysql 客户端。+ successfully-connected-instance: 成功连接到实例。+ failed-to-connect-instance: 连接到实例失败。+ how-to-setup-instance: 如何设置'实例'?+ how-to-setup-instance-description: >-+ 每个 Bytebase 实例属于一个环境。一个实例通常映射到您的一个由 host:port 地址所代表的数据库实例。这可能是您在诸如 AWS 上的 RDS 实例,也可能您私有化部署的 MySQL 实例。\n\nBytebase 要求实例的读写权限(而不是 super 权限)以代表用户执行数据库操作。+ search-instance-name: 搜索实例名称+ grants: 权限environment:select: 选择环境archive: 归档此环境@@ -561,7 +626,7 @@ repository:如果您希望其他 Git 提供方出现在列表中,请联系 Bytebase 实例的所有者。当前 Bytebase 支持自己托管的 GitLabEE/CE,我们之后也会支持 GitLab.com, GitHub Enterprise 以及 GitHub.com。select-repository-attention-gitlab: >-- Bytebase 仅列出您至少拥有 ’Maintainer' 权限的 GitLab 项目。因为只有至少拥有该权限,才能够配置项目的 webhook+ Bytebase 仅列出您至少拥有 'Maintainer' 权限的 GitLab 项目。因为只有至少拥有该权限,才能够配置项目的 webhook用来监听代码推送事件。select-repository-search: 搜索仓库linked: 关联的仓库@@ -621,8 +686,8 @@ project:project-name: '@:common.project @:common.name'key: '@:common.key'key-hint: ( 请使用大写字母来命名您的项目 )- cancel: "@:common.cancel"- confirm: "@:common.create"+ cancel: '@:common.cancel'+ confirm: '@:common.create'success-prompt: 成功创建 {name}.overview:view-all: 查看所有@@ -666,7 +731,7 @@ project:label: 当一个工单包含的任务状态发生了变更issue-info-change:title: 工单信息变更- label: "当一个工单的信息 (比如: 分配人, 标题, 描述) 发生了变更"+ label: '当一个工单的信息 (比如: 分配人, 标题, 描述) 发生了变更'issue-comment-creation:title: 工单被评论label: 当新的工单评论被创建@@ -696,7 +761,7 @@ version-control:self: 添加 Git 提供方description: >-在项目可以启用 GitOps 工作流前,Bytebase 首先需要以在 VCS 中注册为 OAuth 应用的方式和 VCS- 进行集成。以下是配置该集成的步骤,你也可以按照我们的{guide}。+ 进行集成。以下是配置该集成的步骤,您也可以按照我们的{guide}。gitlab-self-host: 自托管 GitLabgitlab-self-host-admin-requirement: >-您必须是 GitLab 实例的管理员才能进行该配置。否则您需要让您的 GitLab 实例管理员把 Bytebase 先注册为 GitLabdiff --git a/frontend/src/views/InstanceDashboard.vue b/frontend/src/views/InstanceDashboard.vueindex cda863bad7..8cae32484e 100644--- a/frontend/src/views/InstanceDashboard.vue+++ b/frontend/src/views/InstanceDashboard.vue@@ -8,7 +8,7 @@/><BBTableSearchref="searchField"- :placeholder="'Search instance name'"+ :placeholder="$t('instance.search-instance-name')"@change-text="(text) => changeSearchText(text)"/></div>@@ -18,10 +18,10 @@<BBAlertv-if="state.showGuide":style="'INFO'"- :ok-text="'Do not show again'"- :cancel-text="'Dismiss'"- :title="'How to setup \'Instance\' ?'"- :description="'Each Bytebase instance belongs to an environment. An instance usually maps to one of your database instance represented by an host:port address. This could be your on-premises MySQL instance, a RDS instance.\n\nBytebase requires read/write (NOT the super privilege) access to the instance in order to perform database operations on behalf of the user.'"+ :ok-text="$t('common.do-not-show-again')"+ :cancel-text="$t('common.dismiss')"+ :title="$t('instance.how-to-setup-instance')"+ :description="$t('instance.how-to-setup-instance-description')"@ok="() => {doDismissGuide();