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): vcs module (#192)
tianzhou934dbd7c1b65
diff --git a/frontend/src/components/VCSCard.vue b/frontend/src/components/VCSCard.vueindex 95bdf782c8..a94e77f1a0 100644--- a/frontend/src/components/VCSCard.vue+++ b/frontend/src/components/VCSCard.vue@@ -16,25 +16,25 @@class="btn-normal py-2 px-4"@click.prevent="editVCS">- Edit+ {{ $t('common.edit') }}</button></div><div class="border-t border-block-border"><dl class="divide-y divide-block-border"><div class="grid grid-cols-4 gap-4 px-4 py-2 items-center">- <dt class="text-sm font-medium text-control-light">Instance URL</dt>+ <dt class="text-sm font-medium text-control-light">{{ $t('common.instance') }} URL</dt><dd class="mt-1 flex text-sm text-main col-span-2">{{ vcs.instanceUrl }}</dd></div><div class="grid grid-cols-4 gap-4 px-4 py-2 items-center">- <dt class="text-sm font-medium text-control-light">Application ID</dt>+ <dt class="text-sm font-medium text-control-light">{{ $t('common.application') }} ID</dt><dd class="mt-1 flex text-sm text-main col-span-2">{{ vcs.applicationId }}</dd></div><div class="grid grid-cols-4 gap-4 px-4 py-2 items-center">- <dt class="text-sm font-medium text-control-light">Created</dt>+ <dt class="text-sm font-medium text-control-light">{{ $t('common.created-at') }}</dt><dd class="mt-1 flex text-sm text-main col-span-2">{{ humanizeTs(vcs.createdTs) }}</dd>diff --git a/frontend/src/components/VCSProviderBasicInfoPanel.vue b/frontend/src/components/VCSProviderBasicInfoPanel.vueindex d6f7a7959c..72004094d3 100644--- a/frontend/src/components/VCSProviderBasicInfoPanel.vue+++ b/frontend/src/components/VCSProviderBasicInfoPanel.vue@@ -1,6 +1,7 @@<template><div class="textlabel">- Choose Git provider <span class="text-red-600">*</span>+ {{ $t("version-control.setting.add-git-provider.choose") }}+ <span class="text-red-600">*</span></div><div class="pt-4 radio-set-row"><div class="radio space-x-2">@@ -14,14 +15,16 @@/><img class="h-6 w-auto" src="../assets/gitlab-logo.svg" /><label class="whitespace-nowrap"- >Self-host GitLab Enterprise Edition (EE) or Community Edition (CE)+ >{{+ $t("version-control.setting.add-git-provider.gitlab-self-host-ce-ee")+ }}</label></div></div><div class="mt-4 relative"><div class="relative flex justify-start"><span class="pr-2 bg-white text-xs text-control-light">- Coming later+ {{ $t("common.coming-later") }}</span></div></div>@@ -49,8 +52,11 @@{{ instanceUrlLabel }} <span class="text-red-600">*</span></div><p class="mt-1 textinfolabel">- The VCS instance URL. Make sure this instance and Bytebase are network- reachable from each other.+ {{+ $t(+ "version-control.setting.add-git-provider.basic-info.gitlab-instance-url-label"+ )+ }}</p><BBTextFieldclass="mt-2 w-full"@@ -59,12 +65,21 @@@input="changeUrl($event.target.value)"/><p v-if="state.showUrlError" class="mt-2 text-sm text-error">- Instance URL must begin with https:// or http://+ {{+ $t(+ "version-control.setting.add-git-provider.basic-info.instance-url-error"+ )+ }}</p>- <div class="mt-4 textlabel">Display name</div>+ <div class="mt-4 textlabel">+ {{ $t("version-control.setting.add-git-provider.basic-info.display-name") }}+ </div><p class="mt-1 textinfolabel">- An optional display name to help identifying among different configs using- the same Git provider.+ {{+ $t(+ "version-control.setting.add-git-provider.basic-info.display-name-label"+ )+ }}</p><BBTextFieldclass="mt-2 w-full"@@ -79,6 +94,7 @@ import { computed, onUnmounted, PropType, reactive } from "vue";import isEmpty from "lodash-es/isEmpty";import { TEXT_VALIDATION_DELAY, VCSConfig } from "../types";import { isUrl } from "../utils";+import { useI18n } from "vue-i18n";interface LocalState {urlValidationTimer?: ReturnType<typeof setTimeout>;@@ -94,6 +110,7 @@ export default {},},setup(props) {+ const { t } = useI18n();const state = reactive<LocalState>({showUrlError:!isEmpty(props.config.instanceUrl) && !isUrl(props.config.instanceUrl),@@ -107,14 +124,16 @@ export default {const namePlaceholder = computed((): string => {if (props.config.type == "GITLAB_SELF_HOST") {- return "GitLab self-host";+ return t("version-control.setting.add-git-provider.gitlab-self-host");}return "";});const instanceUrlLabel = computed((): string => {if (props.config.type == "GITLAB_SELF_HOST") {- return "GitLab Instance URL";+ return t(+ "version-control.setting.add-git-provider.basic-info.gitlab-instance-url"+ );}return "";});diff --git a/frontend/src/components/VCSProviderConfirmPanel.vue b/frontend/src/components/VCSProviderConfirmPanel.vueindex 7267a4deb6..0e7a80b771 100644--- a/frontend/src/components/VCSProviderConfirmPanel.vue+++ b/frontend/src/components/VCSProviderConfirmPanel.vue@@ -10,15 +10,14 @@><div class="px-4 py-5 sm:px-6"><h3 class="text-lg leading-6 font-medium text-main">- Confirm the info+ {{ $t('version-control.setting.add-git-provider.confirm.confirm-info') }}</h3><p class="mt-1 textinfolabel">- After creation, this Git provider can be chosen under the project- dashboard "Version Control" tab by the project owner.+ {{ $t('version-control.setting.add-git-provider.confirm.confirm-description') }}</p></div><div class="grid grid-cols-4 gap-4 px-4 py-2">- <dt class="text-sm font-medium text-control-light text-right">Type</dt>+ <dt class="text-sm font-medium text-control-light text-right">{{ $t('common.type') }}</dt><dd class="col-start-2 col-span-3 text-sm text-main"><divv-if="config.type == 'GITLAB_SELF_HOST'"@@ -26,20 +25,20 @@><img class="h-6 w-auto" src="../assets/gitlab-logo.svg" /><div class="whitespace-nowrap">- Self-host GitLab Enterprise Edition (EE) or Community Edition (CE)+ {{ $t('version-control.setting.add-git-provider.gitlab-self-host-ce-ee') }}</div></div></dd></div><div class="grid grid-cols-4 gap-4 px-4 py-2">- <dt class="text-sm font-medium text-control-light text-right">Name</dt>+ <dt class="text-sm font-medium text-control-light text-right">{{ $t('common.name') }}</dt><dd class="col-start-2 col-span-3 text-sm text-main">{{ config.name }}</dd></div><div class="grid grid-cols-4 gap-4 px-4 py-2"><dt class="text-sm font-medium text-control-light text-right">- Instance URL+ {{ $t('common.instance') }} URL</dt><dd class="col-start-2 col-span-3 text-sm text-main">{{ config.instanceUrl }}@@ -47,7 +46,7 @@</div><div class="grid grid-cols-4 gap-4 px-4 py-2"><dt class="text-sm font-medium text-control-light text-right">- Application ID+ $t('common.application') ID</dt><dd class="col-start-2 col-span-3 text-sm text-main">{{ config.applicationId }}diff --git a/frontend/src/components/VCSProviderOAuthPanel.vue b/frontend/src/components/VCSProviderOAuthPanel.vueindex 057b82d720..0dd2f706a2 100644--- a/frontend/src/components/VCSProviderOAuthPanel.vue+++ b/frontend/src/components/VCSProviderOAuthPanel.vue@@ -2,29 +2,26 @@<div class="space-y-4"><div class="textlabel"><template v-if="config.type == 'GITLAB_SELF_HOST'">- Register Bytebase as a GitLab instance-wide OAuth application.+ {{ $t('version-control.setting.add-git-provider.oauth-info.register-oauth-application') }}</template></div><ol class="textinfolabel space-y-2"><template v-if="config.type == 'GITLAB_SELF_HOST'"><li>- 1. Login as an Admin user to the GitLab instance. The account must be- an Admin of the entire GitLab instance (it has a wrench icon on the- top bar).+ 1. {{ $t('version-control.setting.add-git-provider.oauth-info.login-as-admin') }}<img class="w-auto" src="../assets/gitlab_admin_area.png" /></li><li>- 2. Go to the Admin page by clicking the wrench icon, then navigate to- "Applications" section and click "New application" button.+ 2. {{ $t('version-control.setting.add-git-provider.oauth-info.visit-admin-page') }}<a:href="createAdminApplicationUrl"target="_blank"class="normal-link"- >Direct link</a+ >{{ $t('version-control.setting.add-git-provider.oauth-info.direct-link') }}</a></li><li>- 3. Create your Bytebase OAuth application with the following info.+ 3. {{ $t('version-control.setting.add-git-provider.oauth-info.create-oauth-app') }}<div class="m-4 flex justify-center"><dlclass="@@ -83,14 +80,13 @@</div></li><li>- 4. Paste the Application ID and Secret from that just created- application into fields below.+ 4. {{ $t('version-control.setting.add-git-provider.oauth-info.paste-oauth-info') }}</li></template></ol><div><div class="textlabel">- Application ID <span class="text-red-600">*</span>+ {{ $t('common.application') }} ID <span class="text-red-600">*</span></div><BBTextFieldclass="mt-2 w-full"@@ -99,7 +95,7 @@@input="changeApplicationId($event.target.value)"/><p v-if="state.showApplicationIdError" class="mt-2 text-sm text-error">- Application ID must be a 64-character alphanumeric string+ {{ $t('version-control.setting.add-git-provider.oauth-info.application-id-error') }}</p><div class="mt-4 textlabel">Secret <span class="text-red-600">*</span>@@ -111,7 +107,7 @@@input="changeSecret($event.target.value)"/><p v-if="state.showSecretError" class="mt-2 text-sm text-error">- Secret must be a 64-character alphanumeric string+ {{ $t('version-control.setting.add-git-provider.oauth-info.secret-error') }}</p></div></div>diff --git a/frontend/src/components/VCSSetupWizard.vue b/frontend/src/components/VCSSetupWizard.vueindex e4fc7c0a87..c4a1e4b6ea 100644--- a/frontend/src/components/VCSSetupWizard.vue+++ b/frontend/src/components/VCSSetupWizard.vue@@ -47,17 +47,12 @@ import {OAuthToken,} from "../types";import { isUrl } from "../utils";+import { useI18n } from "vue-i18n";const BASIC_INFO_STEP = 0;const OAUTH_INFO_STEP = 1;const CONFIRM_STEP = 2;-const stepList: BBStepTabItem[] = [- { title: "Basic info" },- { title: "OAuth application info" },- { title: "Confirm" },-];-interface LocalState {config: VCSConfig;currentStep: number;@@ -72,13 +67,20 @@ export default {VCSProviderConfirmPanel,},setup() {+ const { t } = useI18n();const store = useStore();const router = useRouter();+ const stepList: BBStepTabItem[] = [+ { title: t("version-control.setting.add-git-provider.basic-info.self") },+ { title: t("version-control.setting.add-git-provider.oauth-info.self") },+ { title: t("common.confirm") },+ ];+const state = reactive<LocalState>({config: {type: "GITLAB_SELF_HOST",- name: "GitLab self-host",+ name: t("version-control.setting.add-git-provider.gitlab-self-host"),instanceUrl: "",applicationId: "",secret: "",@@ -129,7 +131,9 @@ export default {const attentionText = computed((): string => {if (state.config.type == "GITLAB_SELF_HOST") {- return "You need to be an Admin of your chosen GitLab instance to configure this. Otherwise, you need to ask your GitLab instance Admin to register Bytebase as a GitLab instance-wide OAuth application, then provide you that Application ID and Secret to fill at the 'OAuth application info' step.";+ return t(+ "version-control.setting.add-git-provider.gitlab-self-host-admin-requirement"+ );}return "";});@@ -160,7 +164,9 @@ export default {store.dispatch("notification/pushNotification", {module: "bytebase",style: "SUCCESS",- title: "Verified OAuth info is correct",+ title: t(+ "version-control.setting.add-git-provider.ouath-info-correct"+ ),});} else {var description = "";@@ -168,8 +174,9 @@ export default {// If application id mismatches, the OAuth workflow will stop early.// So the only possibility to reach here is we have a matching application id, while// we failed to exchange a token, and it's likely we are requesting with a wrong secret.- description =- "Please make sure Secret matches the one from your GitLab instance Application.";+ description = t(+ "version-control.setting.add-git-provider.check-oauth-info-match"+ );}store.dispatch("notification/pushNotification", {module: "bytebase",@@ -199,7 +206,9 @@ export default {store.dispatch("notification/pushNotification", {module: "bytebase",style: "SUCCESS",- title: `Successfully added Git provider '${vcs.name}'`,+ title: t("version-control.setting.add-git-provider.add-success", [+ vcs.name,+ ]),});});};diff --git a/frontend/src/locales/en.yml b/frontend/src/locales/en.ymlindex 97dec111d8..5129b318b8 100644--- a/frontend/src/locales/en.yml+++ b/frontend/src/locales/en.yml@@ -110,13 +110,17 @@ common:config-guide: config guiderequired-placeholder: required placeholderoptional-placeholder: optional placeholder+ sensitive-placeholder: sensitive - write onlyenabled: enableddefault: defaultversion-control: version controlrestore: Restoredetailed-guide: detailed guideworkspace: workspace- learn-more: Learn more.+ application: Application+ confirm: Confirm+ coming-later: Coming later+ learn-more: Learn moreerror-page:go-back-home: Go back homeanomaly-center: Anomaly Center@@ -188,14 +192,13 @@ settings:email: Emailrole: Rolepassword: Password- password-placeholder: sensitive - write onlypassword-confirm: Confirmpassword-confirm-placeholder: Confirm new passwordpassword-mismatch: mismatchplan: (Upgrade to Team plan to enable role management)workspace:url-section: SQL Console URL- url-tip: 'Tip: Use {schema} as the placeholder for the actual database name'+ url-tip: "Tip: Use {schema} as the placeholder for the actual database name"tip: >-If your team use a separate SQL console such as phpMyAdmin, you canprovide its URL pattern here. Once provided, Bytebase will surface the@@ -248,7 +251,7 @@ activity:reopened-issue: reopened issueresolved-issue: resolved issuecanceled-issue: canceled issue- empty: ''+ empty: ""changed: changedupdated: updatedcanceled: canceled@@ -256,7 +259,7 @@ activity:started: startedcompleted: completedfailed: failed- task-name: ' task {name}'+ task-name: " task {name}"committed-to-at: committed {file} to{branch}{'@'}{repo}subject-prefix:task: Task@@ -303,7 +306,7 @@ issue:updated: Updatedassignee: Assigneestage-select:- active: '{name} (active)'+ active: "{name} (active)"alter-schema:vcs-enabled: >-This project has enabled VCS based version control and selecting database@@ -324,14 +327,14 @@ quick-action:create-db: Create databasechoose-db: Choose databasenew-db: New DB- add-instance: '@:common.add @:common.instance'- create-instance: '@:common.create @:common.instance'+ add-instance: "@:common.add @:common.instance"+ create-instance: "@:common.create @:common.instance"manage-user: Manage Userdefault-project: Default Project- add-environment: '@:common.add @:common.environment'- create-environment: '@:common.create @:common.environment'- new-project: '@:common.new @:common.project'- create-project: '@:common.create @:common.project'+ add-environment: "@:common.add @:common.environment"+ create-environment: "@:common.create @:common.environment"+ new-project: "@:common.new @:common.project"+ create-project: "@:common.create @:common.project"edit-data: Edit Datatroubleshoot: Troubleshoottransfer-in-db: Transfer in DB@@ -345,7 +348,7 @@ quick-action:transfer-in-db-alert: Are you sure to transfer "{ dbName }" into our project?create-db:new-database-name: New database name- reserved-db-error: '{databaseName} is a reserved name'+ reserved-db-error: "{databaseName} is a reserved name"db:encoding: Encodingcharacter-set: Character set@@ -366,7 +369,8 @@ instance:create-migration-schema: Create migration schemamissing-migration-schema: Missing migration schemaunable-to-connect-instance-to-check-migration-schema: Unable to connect instance to check migration schema- bytebase-relies-on-migration-schema-to-manage-version-control-based-schema-migration-for-databases-belonged-to-this-instance: >-+ bytebase-relies-on-migration-schema-to-manage-version-control-based-schema-migration-for-databases-belonged-to-this-instance:+ >-Bytebase relies on migration schema to manage version control based schemamigration for databases belonged to this instance.please-contact-your-dba-to-configure-it: Please contact your DBA to configure it.@@ -380,7 +384,8 @@ instance:successfully-synced-schema-for-instance-instance-value-name: Successfully synced schema for instance '{0}'.archive-this-instance: Archive this instancearchive-instance-instance-name: Archive instance '{0}'?- archived-instances-will-not-be-shown-on-the-normal-interface-you-can-still-restore-later-from-the-archive-page: >-+ archived-instances-will-not-be-shown-on-the-normal-interface-you-can-still-restore-later-from-the-archive-page:+ >-Archived instances will not be shown on the normal interface. You can stillrestore later from the Archive page.restore-this-instance: Restore this instance@@ -396,10 +401,10 @@ environment:quick-start:bookmark-an-issue: Bookmark an issueadd-a-comment: Add a comment- visit-project: '@:common.visit @:common.projects'- visit-instance: '@:common.visit @:common.instances'- visit-database: '@:common.visit @:common.databases'- visit-environment: '@:common.visit @:common.environments'+ visit-project: "@:common.visit @:common.projects"+ visit-instance: "@:common.visit @:common.instances"+ visit-database: "@:common.visit @:common.databases"+ visit-environment: "@:common.visit @:common.environments"add-a-member: Add a membernotice:title: Quickstart guide dismissed@@ -488,8 +493,8 @@ database:In Bytebase, a database always belongs to a single project.\n\nBytebase willperiodically sync the database info for every recorded instance. You canalso 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'+ restored-from: "Restored from "+ database-name-is-restored-from-another-database-backup: "{0} is restored from another database backup"database-backup: database backupsql-console: SQL Consoletransfer-project: Transfer Project@@ -499,7 +504,7 @@ database:create-backup: Create backupautomatic-weekly-backup: Automatic weekly backupdisable-automatic-backup: Disable automatic backup- backuppolicy-backup-enforced-and-cant-be-disabled: '{0} backup enforced and can''t be disabled'+ backuppolicy-backup-enforced-and-cant-be-disabled: "{0} backup enforced and can't be disabled"backup-policy:DAILY: DAILYWEEKLY: WEEKLY@@ -520,7 +525,7 @@ database:create-a-manual-backup: Create a manual backupdisabled: Disabledenabled: Enabled- action-automatic-backup-for-database-props-database-name: '{0} automatic backup for database ''{1}''.'+ action-automatic-backup-for-database-props-database-name: "{0} automatic backup for database '{1}'."updated-backup-webhook-url-for-database-props-database-name: Updated backup webhook URL for database '{0}'.last-sync-status: Last sync status {0} at {1}version-control-enabled: Version control enabled@@ -528,7 +533,7 @@ t:database: {}repository:branch-observe-file-change: The branch where Bytebase observes the file change.- branch-specify-tip: 'Tip: You can also use wildcard like ''feature/*'+ branch-specify-tip: "Tip: You can also use wildcard like 'feature/*"base-directory: Base directorybase-directory-description: >-The root directory where Bytebase observes the file change. If empty, then@@ -551,7 +556,7 @@ repository:if-specified: If specifiedschema-path-example: Schema path examplegit-provider: Git provider- version-control-status: '@.capitalize:common.version-control is {status}'+ version-control-status: "@.capitalize:common.version-control is {status}"version-control-description-file-path: >-Database migration scripts are stored in {fullPath}. To make schema changes,a developer would create a migration script matching file path pattern@@ -589,6 +594,7 @@ repository:role, which allows to configure the project webhook to observe the code pushevent.select-repository-search: Search repository+ linked: Linked repositoriesworkflow:current-workflow: Current workflowui-workflow: UI workflow@@ -648,15 +654,15 @@ project:confirm: Do not show againsearch-bar-placeholder: Search project nametable:- key: '@:common.key'- name: '@:common.name'+ key: "@:common.key"+ name: "@:common.name"created-at: Created Atcreate-modal:- project-name: '@:common.project @:common.name'- key: '@:common.key'+ project-name: "@:common.project @:common.name"+ key: "@:common.key"key-hint: (Uppercase letters identifying your project)- cancel: '@:common.cancel'- confirm: '@:common.create'+ cancel: "@:common.cancel"+ confirm: "@:common.create"overview:view-all: View allview-all-closed: View all closed@@ -713,8 +719,8 @@ project:member-placeholder: Select usermanage-member: Manage membersadd-member: Add member- owner: '@.upper:common.role.owner'- developer: '@.upper:common.role.developer'+ owner: "@.upper:common.role.owner"+ developer: "@.upper:common.role.developer"archive:btn-text: Archive this @.lower:{'common.project'}restore:@@ -722,3 +728,72 @@ project:inbox:mark-all-as-read: Mark all as readview-older: View older+version-control:+ setting:+ description: >-+ Bytebase supports GitOps workflow where database migration scripts are+ stored in the version control system (VCS), and newly created migration+ scripts will automatically trigger the corresponding database change.+ Bytebase owners manage all the applicable VCSs here, so that project+ owners can link the projects with their Git repositories from these VCSs.+ add-git-provider:+ self: Add a Git provider+ description: >-+ Before any project can enable GitOps workflow, Bytebase first needs to+ integrate with the corresponding version control system (VCS) by+ registering as an OAuth application in that VCS. Below are the steps to+ configure this, you can also follow our {guide}.+ gitlab-self-host: GitLab self-host+ gitlab-self-host-admin-requirement: >-+ You need to be an Admin of your chosen GitLab instance to configure+ this. Otherwise, you need to ask your GitLab instance Admin to register+ Bytebase as a GitLab instance-wide OAuth application, then provide you+ that Application ID and Secret to fill at the 'OAuth application info'+ step.+ ouath-info-correct: Verified OAuth info is correct+ check-oauth-info-match: >-+ Please make sure Secret matches the one from your GitLab instance+ Application.+ add-success: Successfully added Git provider {vcs}+ choose: Choose Git provider+ gitlab-self-host-ce-ee: Self-host GitLab Enterprise Edition (EE) or Community Edition (CE)+ basic-info:+ self: Basic info+ gitlab-instance-url: GitLab instance URL+ gitlab-instance-url-label: >-+ The VCS instance URL. Make sure this instance and Bytebase are network+ reachable from each other.+ instance-url-error: Instance URL must begin with https:// or http://+ display-name: Display name+ display-name-label: >-+ An optional display name to help identifying among different configs+ using the same Git provider.+ oauth-info:+ self: OAuth application info+ register-oauth-application: Register Bytebase as a GitLab instance-wide OAuth application.+ login-as-admin: >-+ Login as an Admin user to the GitLab instance. The account must be an+ Admin of the entire GitLab instance (it has a wrench icon on the top+ bar).+ visit-admin-page: >-+ Go to the Admin page by clicking the wrench icon, then navigate to+ "Applications" section and click "New application" button.+ direct-link: Direct link+ create-oauth-app: Create your Bytebase OAuth application with the following info.+ paste-oauth-info: >-+ Paste the Application ID and Secret from that just created application+ into fields below.+ application-id-error: Application ID must be a 64-character alphanumeric string+ secret-error: Secret must be a 64-character alphanumeric string+ confirm:+ confirm-info: Confirm the info+ confirm-description: >-+ After creation, this Git provider can be chosen under the project+ dashboard "Version Control" tab by the project owner.+ git-provider:+ application-id-label: >-+ Application ID for the registered GitLab instance-wide OAuth+ application.+ view-in-gitlab: View in GitLab+ secret-label-gitlab: Secret for the registered GitLab instance-wide OAuth application.+ delete: To delete this provider, unlink all repositories first.diff --git a/frontend/src/locales/zh-CN.yml b/frontend/src/locales/zh-CN.ymlindex c78efcd2e1..74a4579488 100644--- a/frontend/src/locales/zh-CN.yml+++ b/frontend/src/locales/zh-CN.yml@@ -110,13 +110,17 @@ common:config-guide: 配置指南required-placeholder: 必需的占位符optional-placeholder: 可选的占位符+ sensitive-placeholder: 敏感数据 - 仅写入enabled: 开启default: 默认version-control: 版本控制restore: 重置detailed-guide: 详细指南workspace: 工作空间- learn-more: 了解更多。+ application: 应用+ confirm: 确认+ coming-later: 敬请期待+ learn-more: 了解更多error-page:go-back-home: 回到主页anomaly-center: 异常中心@@ -137,7 +141,7 @@ task:checking: 检查中…run-task: 运行检查check-result:- title: '{name} 的检查结果'+ title: "{name} 的检查结果"check-type:fake: Fakesyntax: 语法@@ -185,14 +189,13 @@ settings:email: 邮箱role: 角色password: 密码- password-placeholder: 敏感数据 - 仅写入password-confirm: 确认密码password-confirm-placeholder: 再次输入以确认password-mismatch: 密码输入不一致plan: (升级到团队方案来开启角色管理)workspace:url-section: SQL Console URL- url-tip: '提示: 用 {schema} 作为真实数据库名称的占位符'+ url-tip: "提示: 用 {schema} 作为真实数据库名称的占位符"tip: >-如果您的团队使用一个单独的 SQL 控制台,如 phpMyAdmin,那么可以在这里提供他的 URL 模板,Bytebase就可以将控制台链接到相关的数据库和表的界面上。@@ -244,7 +247,7 @@ activity:reopened-issue: 重开工单resolved-issue: 解决工单canceled-issue: 取消工单- empty: ''+ empty: ""changed: 修改updated: 更新canceled: 取消@@ -258,8 +261,8 @@ activity:task: 任务issue:waiting-approval: 等待批准- opened-by-at: '{id} 由 {creator} 开启于 {time}'- commit-by-at: '{id} {title} 由 {author} 提交于 {time}'+ opened-by-at: "{id} 由 {creator} 开启于 {time}"+ commit-by-at: "{id} {title} 由 {author} 提交于 {time}"status-transition:modal:resolve: 解决工单?@@ -275,10 +278,10 @@ issue:subscribe: 订阅unsubscribe: 取消订阅subscriber: 没有订阅者 | 1 个订阅者 | {n} 个订阅者- apply-to-other-stages: '@:{''common.apply''}到其他@:{''common.stage''}'+ apply-to-other-stages: "@:{'common.apply'}到其他@:{'common.stage'}"add-sql-statement: 添加 SQL @:{'common.statement'}…optional-add-sql-statement: (可选)添加 SQL @:{'common.statement'}…- rollback-sql: '@:{''common.rollback''} SQL'+ rollback-sql: "@:{'common.rollback'} SQL"add-rollback-sql-statement: 添加 @:{'common.rollback'} SQL @:{'common.statement'}…edit-description: 编辑描述add-some-description: 添加一些描述…@@ -299,7 +302,7 @@ issue:updated: 更新于assignee: 审核人stage-select:- active: '{name}(活动中)'+ active: "{name}(活动中)"alter-schema:vcs-enabled: 该项目开启了基于 VCS 的版本管理,选择下面的数据库会将您导航到相应的 Git 仓库以创建 schema 变更。vcs-info: 代表项目开启了基于 VCS 的版本管理。选择该类项目下的数据库会将您导航到对应的 Git 仓库以创建 schema 变更。@@ -311,14 +314,14 @@ quick-action:create-db: 创建数据库choose-db: 选择数据库new-db: 创建数据库- add-instance: '@:common.add@:common.instance'- create-instance: '@:common.create@:common.instance'+ add-instance: "@:common.add@:common.instance"+ create-instance: "@:common.create@:common.instance"manage-user: 成员管理default-project: 默认项目- add-environment: '@:common.add@:common.environment'- create-environment: '@:common.create@:common.environment'- new-project: '@:common.new@:common.project'- create-project: '@:common.create@:common.project'+ add-environment: "@:common.add@:common.environment"+ create-environment: "@:common.create@:common.environment"+ new-project: "@:common.new@:common.project"+ create-project: "@:common.create@:common.project"edit-data: 编辑数据troubleshoot: 问题排查transfer-in-db: 转移数据库@@ -330,7 +333,7 @@ quick-action:transfer-in-db-alert: 您确定要转移 "{ dbName }" 到我们的项目中吗?create-db:new-database-name: 新数据库名称- reserved-db-error: '{databaseName} 是一个预留名称'+ reserved-db-error: "{databaseName} 是一个预留名称"db:encoding: 字符编码character-set: 字符集@@ -345,13 +348,14 @@ db:sync-status: 同步状态instance:select: 选择实例- new-database: '@:common.new@:common.database'+ new-database: "@:common.new@:common.database"syncing: 同步中 ...sync-now: 现在同步- create-migration-schema: '@:common.create@:common.migration @:{''common.schema''}'+ create-migration-schema: "@:common.create@:common.migration @:{'common.schema'}"missing-migration-schema: 缺少@:common.migration @:common.schemaunable-to-connect-instance-to-check-migration-schema: 无法连接到@:{'common.instance'}以检查@:{'common.migration'} @:{'common.schema'}- bytebase-relies-on-migration-schema-to-manage-version-control-based-schema-migration-for-databases-belonged-to-this-instance: >-+ bytebase-relies-on-migration-schema-to-manage-version-control-based-schema-migration-for-databases-belonged-to-this-instance:+ >-Bytebase需要@:{'common.migration'} @:{'common.schema'}来管理属于这个@:{'common.instance'}的@:{'common.database'}的基于版本管理的 schema@:common.migration@@ -378,10 +382,10 @@ environment:quick-start:bookmark-an-issue: 收藏工单add-a-comment: 添加评论- visit-project: '@:common.visit@:common.projects'- visit-instance: '@:common.visit@:common.instances'- visit-database: '@:common.visit@:common.databases'- visit-environment: '@:common.visit@:common.environments'+ visit-project: "@:common.visit@:common.projects"+ visit-instance: "@:common.visit@:common.instances"+ visit-database: "@:common.visit@:common.databases"+ visit-environment: "@:common.visit@:common.environments"add-a-member: 添加成员notice:title: 快速入门导览已关闭@@ -460,7 +464,7 @@ database:在 Bytebase 中,一个数据库始终属于单个项目。\n\nBytebase 将定期同步每个实例的数据库信息。您还可以从仪表板创建新数据库。restored-from: 恢复于- database-name-is-restored-from-another-database-backup: '{0}恢复于另一个数据库备份'+ database-name-is-restored-from-another-database-backup: "{0}恢复于另一个数据库备份"sql-console: SQL控制台transfer-project: 转移项目alter-schema-in-vcs: 变更 Schema(VCS)@@ -511,8 +515,8 @@ repository:schema-writeback-protected-branch: 请保证被变更的分支不是处于保护 (protected) 状态,或者仓库允许他的 maintainer 可以推送变更到保护分支。if-specified: 如果指定schema-path-example: Schema 路径样例- git-provider: Git 实例- version-control-status: '@.capitalize:common.version-control 已{status}'+ git-provider: Git 提供方+ version-control-status: "@.capitalize:common.version-control 已{status}"version-control-description-file-path: 数据库迁移脚本存放在 {fullPath}。为了进行一次变更,开发者需要创建一个匹配 {fullPathTemplate} 文件路径格式的迁移脚本。version-control-description-branch: 当脚本审核通过并且合并到 {branch} 分支后,Bytebase 将自动发起一条流水线来执行新的 schema 变更。version-control-description-description-schema-path: 当 schema 变更完成后, Bytebase 会把变更后的最新 schema 回写到指定的 {schemaPathTemplate}。@@ -535,6 +539,7 @@ repository:Bytebase 仅列出您至少拥有 ’Maintainer' 权限的 GitLab 项目。因为只有至少拥有该权限,才能够配置项目的 webhook用来监听代码推送事件。select-repository-search: 搜索仓库+ linked: 关联的仓库workflow:current-workflow: 当前工作流ui-workflow: UI 工作流@@ -555,7 +560,7 @@ anomaly:该列表大约每 10 分钟刷新一次。table-search-placeholder: 搜索{type}或者环境table-placeholder: 很棒,没有检测到{type}异常!- tooltip: '{env} 环境有 {criticalCount} 个严重异常, {highCount} 个高等级异常和 {mediumCount} 个中等级异常'+ tooltip: "{env} 环境有 {criticalCount} 个严重异常, {highCount} 个高等级异常和 {mediumCount} 个中等级异常"types:connection-failure: 连接失败missing-migration-schema: 缺少迁移 Schema@@ -584,15 +589,15 @@ project:confirm: 不再出现search-bar-placeholder: 搜索项目名称table:- key: '@:common.key'- name: '@:common.name'+ key: "@:common.key"+ name: "@:common.name"created-at: 创建于create-modal:- project-name: '@:common.project @:common.name'- key: '@:common.key'+ project-name: "@:common.project @:common.name"+ key: "@:common.key"key-hint: ( 请使用大写字母来命名您的项目 )- cancel: '@:common.cancel'- confirm: '@:common.create'+ cancel: "@:common.cancel"+ confirm: "@:common.create"overview:view-all: 查看所有view-all-closed: 查看所有结束的工单@@ -618,7 +623,7 @@ project:title: 创建 webhookdesc: 为 {destination} 创建一个 webhookhow-to-protect: 您可以通过添加 'Bytebase' 到您的 webhook 关键字白名单中来保护您的 webhook- view-doc: '{destination} 的官方文档'+ view-doc: "{destination} 的官方文档"deletion:btn-text: Delete this webhookactivity-item:@@ -641,8 +646,8 @@ project:member-placeholder: 选择用户manage-member: 管理成员add-member: 添加成员- owner: '@.upper:commo project.setting.add-membern.role.owner'- developer: '@.upper:common.role.developer'+ owner: "@.upper:commo project.setting.add-membern.role.owner"+ developer: "@.upper:common.role.developer"archive:btn-text: 收藏这个@:common.projectrestore:@@ -650,3 +655,48 @@ project:inbox:mark-all-as-read: 全部标记为已读view-older: 查看更早+version-control:+ setting:+ description: >-+ Bytebase 支持 GitOps 工作流。该工作流下,数据库迁移脚本存储在版本控制系统上+ (VCS),新创建的迁移脚本会自动触发对应的数据库变更。Bytebase 的所有者先在此配置 VCS,在这之后,项目的所有者就可以从所配置的 VCS+ 中选取他们的 Git 仓库。+ add-git-provider:+ self: 添加 Git 提供方+ description: >-+ 在项目可以启用 GitOps 工作流前,Bytebase 首先需要以在 VCS 中注册为 OAuth 应用的方式和 VCS+ 进行集成。以下是配置该集成的步骤,你也可以按照我们的{guide}。+ gitlab-self-host: 自托管 GitLab+ gitlab-self-host-admin-requirement: >-+ 您必须是 GitLab 实例的管理员才能进行该配置。否则您需要让您的 GitLab 实例管理员把 Bytebase 先注册为 GitLab+ 整个实例级别的 OAuth 应用,之后再让对方提供给您注册完成后的应用 ID 以及 Secret,以让您在「OAuth 应用信息」步骤进行填写。+ ouath-info-correct: OAuth 信息验证成功+ check-oauth-info-match: 请确认 Secret 和注册在 GitLab 实例上的应用信息匹配。+ add-success: 成功添加了 Git 提供方「{vcs}」+ choose: 选择 Git 提供方+ gitlab-self-host-ce-ee: 自托管 GitLab 企业版 (EE) 或者 社区版 (CE)+ basic-info:+ self: 基本信息+ gitlab-instance-url: GitLab 实例 URL+ gitlab-instance-url-label: VCS 实例 URL。请确认这个实例和 Bytebase 之间网络是互通的。+ instance-url-error: 实例 URL 必须以 https:// or http:// 开头+ display-name: 展示名称+ display-name-label: 一个可选的展示名称用以区分不同的 Git 供应方。+ oauth-info:+ self: OAuth 应用信息+ register-oauth-application: 注册 Bytebase 为一个 GitLab 实例级别 (instance-wide) 的 OAuth 应用。+ login-as-admin: 以管理员身份登陆 GitLab 实例。这个账号必须是整个 GitLab 实例的管理员 (会看到小扳手在顶栏)。+ visit-admin-page: 通过点击小扳手访问管理员界面,然后导航到「应用」分区,再点击「创建应用」。+ direct-link: 直达链接+ create-oauth-app: 使用如下信息来创建您的 Bytebase OAuth 应用。+ paste-oauth-info: 从刚创建好的应用上粘贴他的应用 ID 和 Secret 到下面的字段。+ application-id-error: 应用 ID 必须是 64 个字母长度+ secret-error: Secret 必须是 64 个字母长度+ confirm:+ confirm-info: 确认信息+ confirm-description: 创建完成后,这个 Git 供应方将出现在项目面板「版本控制」Tab 下,可以被项目所有者选中。+ git-provider:+ application-id-label: 注册为 GitLab 实例级 OAuth 应用的应用 ID。+ view-in-gitlab: 查看 GitLab+ secret-label-gitlab: 注册为 GitLab 实例级 OAuth 应用的 Secret。+ delete: 删除这个提供方前,需要先解除所有仓库的关联。diff --git a/frontend/src/views/ProfileDashboard.vue b/frontend/src/views/ProfileDashboard.vueindex 27fb5bd777..ab5001e07d 100644--- a/frontend/src/views/ProfileDashboard.vue+++ b/frontend/src/views/ProfileDashboard.vue@@ -133,7 +133,7 @@type="text"class="textfield mt-1 w-full"autocomplete="off"- :placeholder="$t('settings.profile.password-placeholder')"+ :placeholder="$t('common.sensitive-placeholder')":value="state.editingPrincipal.password"@input="updatePrincipal('password', $event.target.value)"/>diff --git a/frontend/src/views/SettingWorkspaceVCS.vue b/frontend/src/views/SettingWorkspaceVCS.vueindex b36c6e037f..ad9bfd8f60 100644--- a/frontend/src/views/SettingWorkspaceVCS.vue+++ b/frontend/src/views/SettingWorkspaceVCS.vue@@ -1,12 +1,7 @@<template><div class="space-y-4"><div class="textinfolabel">- Bytebase supports version control workflow where database migration- scripts are stored in the version control system (VCS), and changes made- to those scripts will automatically trigger the corresponding database- change. Bytebase owners manage all the applicable VCSs here, so that- project owners can link the projects with their Git repositories from- these VCSs.+ {{ $t('version-control.setting.description') }}</div><div class="flex items-center justify-end"><button@@ -14,7 +9,7 @@class="btn-primary ml-3 inline-flex justify-center py-2 px-4"@click.prevent="addVCSProvider">- Add a Git provider+ {{ $t('version-control.setting.add-git-provider.self') }}</button></div><div class="pt-4 border-t">diff --git a/frontend/src/views/SettingWorkspaceVCSCreate.vue b/frontend/src/views/SettingWorkspaceVCSCreate.vueindex ddf428644d..de09f71cf6 100644--- a/frontend/src/views/SettingWorkspaceVCSCreate.vue+++ b/frontend/src/views/SettingWorkspaceVCSCreate.vue@@ -1,16 +1,17 @@<template><div class="mt-4 space-y-4 divide-y divide-block-border"><div class="textinfolabel">- Before any project can enable version control workflow, Bytebase first- needs to integrate with the corresponding version control system (VCS) by- registering as an OAuth application in that VCS. Below are the steps to- configure this. You can also follow our<a- href="https://docs.bytebase.com/use-bytebase/vcs-integration?ref=console"- target="_blank"- class="normal-link"- >- detailed guide</a- >.+ <i18n-t keypath="version-control.setting.add-git-provider.description">+ <template #guide>+ <a+ href="https://docs.bytebase.com/use-bytebase/vcs-integration?ref=console"+ target="_blank"+ class="normal-link"+ >+ {{ $t('common.detailed-guide') }}</a+ >+ </template>+ </i18n-t></div><div class="pt-4"><VCSSetupWizard />diff --git a/frontend/src/views/SettingWorkspaceVCSDetail.vue b/frontend/src/views/SettingWorkspaceVCSDetail.vueindex 50bf7f7a91..1b2d45819e 100644--- a/frontend/src/views/SettingWorkspaceVCSDetail.vue+++ b/frontend/src/views/SettingWorkspaceVCSDetail.vue@@ -6,19 +6,14 @@class="flex flex-row items-center space-x-2"><div class="textlabel whitespace-nowrap">- Self-host GitLab Enterprise Edition (EE) or Community Edition (CE)+ {{ $t('version-control.setting.add-git-provider.gitlab-self-host-ce-ee') }}</div><img class="h-6 w-auto" src="../assets/gitlab-logo.svg" /></div></div><div>- <label for="instanceurl" class="textlabel"> Instance URL </label>- <p class="mt-1 textinfolabel">- <template v-if="vcs.type == 'GITLAB_SELF_HOST'">- Your GitLab instance location.- </template>- </p>+ <label for="instanceurl" class="textlabel"> {{ $t('common.instance') }} URL </label><inputid="instanceurl"name="instanceurl"@@ -30,10 +25,9 @@</div><div>- <label for="name" class="textlabel"> Display name </label>+ <label for="name" class="textlabel"> {{ $t('version-control.setting.add-git-provider.basic-info.display-name') }} </label><p class="mt-1 textinfolabel">- An optional display name to help identifying among different configs- using the same Git provider.+ {{ $t('version-control.setting.add-git-provider.basic-info.display-name-label') }}</p><inputid="name"@@ -45,13 +39,12 @@</div><div>- <label for="applicationid" class="textlabel"> Application ID </label>+ <label for="applicationid" class="textlabel"> {{ $t('common.application') }} ID </label><p class="mt-1 textinfolabel"><template v-if="vcs.type == 'GITLAB_SELF_HOST'">- Application ID for the registered GitLab instance-wide OAuth- application.+ {{ $t('version-control.setting.git-provider.application-id-label') }}<a :href="adminApplicationUrl" target="_blank" class="normal-link"- >View in GitLab</a+ >{{ $t('version-control.setting.git-provider.view-in-gitlab') }}</a></template></p>@@ -68,7 +61,7 @@<label for="secret" class="textlabel"> Secret </label><p class="mt-1 textinfolabel"><template v-if="vcs.type == 'GITLAB_SELF_HOST'">- Secret for the registered GitLab instance-wide OAuth application.+ {{ $t('version-control.setting.git-provider.secret-label-gitlab') }}</template></p><input@@ -77,7 +70,7 @@name="secret"type="text"class="textfield mt-1 w-full"- placeholder="sensitive - write only"+ :placeholder="$t('common.sensitive-placeholder')"/></div>@@ -94,7 +87,7 @@</template><template v-else><div class="mt-1 textinfolabel">- To delete this provider, unlink all repositories first.+ {{ $t('version-control.setting.git-provider.delete') }}</div></template><div>@@ -103,7 +96,7 @@class="btn-normal py-2 px-4"@click.prevent="cancel">- Cancel+ {{ $t('common.cancel') }}</button><buttontype="button"@@ -111,7 +104,7 @@:disabled="!allowUpdate"@click.prevent="doUpdate">- Update+ {{ $t('common.update') }}</button></div></div>@@ -119,7 +112,7 @@<div class="py-6"><div class="text-lg leading-6 font-medium text-main">- {{ `Linked repositories (${repositoryList.length})` }}+ {{ $t('repository.linked') + ` (${repositoryList.length})` }}</div><div class="mt-4"><RepositoryTable :repository-list="repositoryList" />