Skip to content

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

feat(i18n): TableTable.vue (#230)

p0ny41fcdd86974c
diff --git a/frontend/src/components/TableTable.vue b/frontend/src/components/TableTable.vue
index 21776ed76c..a7f4fd628c 100644
--- a/frontend/src/components/TableTable.vue
+++ b/frontend/src/components/TableTable.vue
@@ -37,27 +37,7 @@ import { BBTableColumn } from "../bbkit/types";
import { Table } from "../types";
import { bytesToString, databaseSlug } from "../utils";
import { useRouter } from "vue-router";
-
-const COLUMN_LIST: BBTableColumn[] = [
- {
- title: "Name",
- },
- {
- title: "Engine",
- },
- {
- title: "Row count est.",
- },
- {
- title: "Data size",
- },
- {
- title: "Index size",
- },
- {
- title: "Created",
- },
-];
+import { useI18n } from "vue-i18n";
export default {
name: "TableTable",
@@ -70,6 +50,28 @@ export default {
},
setup(props) {
const router = useRouter();
+ const { t } = useI18n();
+
+ const COLUMN_LIST: BBTableColumn[] = [
+ {
+ title: t("common.name"),
+ },
+ {
+ title: t("database.engine"),
+ },
+ {
+ title: t("database.row-count-est"),
+ },
+ {
+ title: t("database.data-size"),
+ },
+ {
+ title: t("database.index-size"),
+ },
+ {
+ title: t("common.created-at"),
+ },
+ ];
const clickTable = (section: number, row: number) => {
const table = props.tableList[row];
diff --git a/frontend/src/locales/en.yml b/frontend/src/locales/en.yml
index 3693944f82..dff33ab30e 100644
--- a/frontend/src/locales/en.yml
+++ b/frontend/src/locales/en.yml
@@ -177,7 +177,7 @@ task:
connection: Connection
migration-schema: Migration schema
earliest-allowed-time: Earliest allowed time
- earliest-allowed-time-hint: "'@:{'common.when'}' specifies the expected execution timing for this task"
+ earliest-allowed-time-hint: '''@:{''common.when''}'' specifies the expected execution timing for this task'
comment: Comment
invoker: Invoker
started: Started
@@ -472,8 +472,8 @@ instance:
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.
+ 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
@@ -484,9 +484,12 @@ instance:
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.
-
+ 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.
+
+
Error detail: {0}
successfully-created-instance-createdinstance-name: Successfully created instance '{0}'.
successfully-updated-instance-instance-name: Successfully updated instance '{0}'.
@@ -496,10 +499,14 @@ instance:
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.
-
- Bytebase requires read/write (NOT the super privilege) access to the instance in order to perform database operations on behalf of the user.
+ 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.
+
+
+ Bytebase 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: Grants
environment:
@@ -510,11 +517,15 @@ environment:
still restore later from the Archive page.
create: Create Environment
how-to-setup-environment: How to setup 'Environment' ?
- how-to-setup-environment-description: |-
- Each environment maps to one of your testing, staging, prod environment respectively.
-
- Environment is a global setting, one Bytebase deployment only contains a single set of environments.
-
+ how-to-setup-environment-description: >-
+ Each environment maps to one of your testing, staging, prod environment
+ respectively.
+
+
+ Environment is a global setting, one Bytebase deployment only contains a
+ single set of environments.
+
+
Database instances are created under a particular environment.
quick-start:
bookmark-an-issue: Bookmark an issue
@@ -607,10 +618,13 @@ database:
last-successful-sync: Last successful sync
search-database-name: Search database name
how-to-setup-database: How to setup 'Database' ?
- show-guide-description: |-
- Each Bytebase database maps to the one created by 'CREATE DATABASE xxx'. In Bytebase, a database always belongs to a single project.
-
- Bytebase will periodically sync the database info for every recorded instance. You can also create a new database from the dashboard.
+ show-guide-description: >-
+ Each Bytebase database maps to the one created by 'CREATE DATABASE xxx'. In
+ Bytebase, a database always belongs to a single project.
+
+
+ Bytebase will periodically sync the database info for every recorded
+ instance. You can also create a new database from the dashboard.
restored-from: 'Restored from '
database-name-is-restored-from-another-database-backup: '{0} is restored from another database backup'
database-backup: database backup
@@ -664,6 +678,7 @@ database:
index-size: Index size
columns: Columns
indexes: Indexes
+ row-count-est: Row count est.
t:
database: {}
repository:
diff --git a/frontend/src/locales/zh-CN.yml b/frontend/src/locales/zh-CN.yml
index 9d9c5f0952..57209a31ac 100644
--- a/frontend/src/locales/zh-CN.yml
+++ b/frontend/src/locales/zh-CN.yml
@@ -177,7 +177,7 @@ task:
connection: 连接
migration-schema: 迁移 schema
earliest-allowed-time: 最早执行时间
- earliest-allowed-time-hint: "'@:{'common.when'}' 指定了该任务最早允许执行的时间"
+ earliest-allowed-time-hint: '''@:{''common.when''}'' 指定了该任务最早允许执行的时间'
comment: 评论
invoker: 执行者
started: 开始于
@@ -452,7 +452,7 @@ instance:
new-instance: 新实例
unable-to-connect: |-
Bytebase 无法连接到实例。我们推荐您再检查一遍连接信息。但也可以暂时忽略此警告。您在创建后仍能在实例详细页里修复连接信息。
-
+
错误详情:{0}
successfully-created-instance-createdinstance-name: 成功创建实例'{0}'。
successfully-updated-instance-instance-name: 成功更新实例'{0}'。
@@ -463,7 +463,7 @@ instance:
how-to-setup-instance-description: |-
每个 Bytebase 实例属于一个环境。一个实例通常映射到您的一个由 host:port 地址所代表的数据库实例。这可能是您在诸如 AWS 上的
RDS 实例,也可能您私有化部署的 MySQL 实例。
-
+
Bytebase 要求实例的读写权限(而不是 super 权限)以代表用户执行数据库操作。
search-instance-name: 搜索实例名称
grants: 权限
@@ -475,9 +475,9 @@ environment:
how-to-setup-environment: 如何创建「环境」?
how-to-setup-environment-description: |-
每个环境与您的诸如测试,预发,生产环境一一对应。
-
+
环境是一个全局配置,1 套 Bytebase 的部署也只包含一套环境配置的集合。
-
+
数据库实例是创建在某个特定环境下面的。
quick-start:
bookmark-an-issue: 收藏工单
@@ -617,6 +617,7 @@ database:
index-size: 索引大小
columns: 列
indexes: 索引
+ row-count-est: 估计行数
repository:
branch-observe-file-change: Bytebase 跟踪文件变更的分支。
branch-specify-tip: '诀窍: 可以使用诸如 "feature/*" 这样的通配符'
@@ -641,7 +642,7 @@ repository:
restore-to-ui-workflow: 重置到 UI 工作流
restore-ui-workflow-description: |-
当使用 UI 工作流时,开发者会通过 Bytebase
-
+
控制台直接提交一个 SQL 审核工单,让指定的 DBA 或者开发同事审核。当审核通过后,Bytebase 再执行相应的 SQL 变更。
restore-ui-workflow-success: 成功重置到 UI 工作流
update-version-control-config-success: 成功更新@:common.version-control配置