Skip to content

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

chore: localize sidebar and profile dropdown (#122)

tianzhou738c57306125
diff --git a/frontend/src/components/BookmarkListSidePanel.vue b/frontend/src/components/BookmarkListSidePanel.vue
index b45931e1d3..ba8dc71b92 100644
--- a/frontend/src/components/BookmarkListSidePanel.vue
+++ b/frontend/src/components/BookmarkListSidePanel.vue
@@ -1,7 +1,7 @@
<template>
<BBOutline
:id="'bookmark'"
- :title="'Bookmarks'"
+ :title="$t('common.bookmarks')"
:item-list="
bookmarkList.map((item) => {
return { name: item.name, link: item.link };
diff --git a/frontend/src/components/DatabaseListSidePanel.vue b/frontend/src/components/DatabaseListSidePanel.vue
index 1cb65fc824..99eac78efb 100644
--- a/frontend/src/components/DatabaseListSidePanel.vue
+++ b/frontend/src/components/DatabaseListSidePanel.vue
@@ -1,7 +1,7 @@
<template>
<BBOutline
:id="'database'"
- :title="'Databases'"
+ :title="$t('common.databases')"
:item-list="databaseListByEnvironment"
:allow-collapse="false"
/>
diff --git a/frontend/src/components/ProfileDropdown.vue b/frontend/src/components/ProfileDropdown.vue
index 85c007622b..9a8ec1cc65 100644
--- a/frontend/src/components/ProfileDropdown.vue
+++ b/frontend/src/components/ProfileDropdown.vue
@@ -56,20 +56,22 @@
</div>
<div class="border-t border-gray-100"></div>
<div class="py-1">
- <router-link to="/setting" class="menu-item" role="menuitem"
- >Settings</router-link
- >
+ <router-link to="/setting" class="menu-item" role="menuitem">{{
+ $t("common.settings")
+ }}</router-link>
<a
v-if="showQuickstart"
class="menu-item"
role="menuitem"
@click.prevent="resetQuickstart"
- >Quickstart</a
+ >{{ $t("common.quickstart") }}</a
>
</div>
<div class="border-t border-gray-100"></div>
<div class="py-1">
- <a class="menu-item" role="menuitem" @click.prevent="logout">Logout</a>
+ <a class="menu-item" role="menuitem" @click.prevent="logout">{{
+ $t("common.logout")
+ }}</a>
</div>
</BBContextMenu>
</div>
diff --git a/frontend/src/components/ProjectListSidePanel.vue b/frontend/src/components/ProjectListSidePanel.vue
index b435a6d590..26dfadecf3 100644
--- a/frontend/src/components/ProjectListSidePanel.vue
+++ b/frontend/src/components/ProjectListSidePanel.vue
@@ -1,7 +1,7 @@
<template>
<BBOutline
:id="'project'"
- :title="'Projects'"
+ :title="$t('common.projects')"
:item-list="outlineItemList"
:allow-collapse="false"
/>
diff --git a/frontend/src/components/Quickstart.vue b/frontend/src/components/Quickstart.vue
index 935b23653d..5a6e7e572b 100644
--- a/frontend/src/components/Quickstart.vue
+++ b/frontend/src/components/Quickstart.vue
@@ -1,7 +1,9 @@
<template>
<div class="space-y-2">
<div class="flex flex-row justify-between">
- <div class="outline-title toplevel flex">Quickstart</div>
+ <div class="outline-title toplevel flex">
+ {{ $t("common.quickstart") }}
+ </div>
<button class="btn-icon" @click.prevent="hideQuickstart">
<svg
class="w-4 h-4"
diff --git a/frontend/src/layouts/BodyLayout.vue b/frontend/src/layouts/BodyLayout.vue
index 8ae07b2f97..d0d6f57a3a 100644
--- a/frontend/src/layouts/BodyLayout.vue
+++ b/frontend/src/layouts/BodyLayout.vue
@@ -76,7 +76,7 @@
d="M5 8h14M5 8a2 2 0 110-4h14a2 2 0 110 4M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8m-9 4h4"
></path>
</svg>
- Archive
+ {{ $t("common.archive") }}
</router-link>
<div
class="flex-shrink-0 flex border-t border-block-border px-4 py-2"
@@ -84,15 +84,7 @@
<a
href="https://docs.bytebase.com"
target="_blank"
- class="
- flex
- justify-between
- items-center
- w-full
- flex-shrink-0
- text-main
- group
- "
+ class="flex justify-between items-center w-full flex-shrink-0 text-main group"
>
<div class="flex items-center">
<svg
@@ -146,7 +138,7 @@
d="M5 8h14M5 8a2 2 0 110-4h14a2 2 0 110 4M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8m-9 4h4"
></path>
</svg>
- Archive
+ {{ $t("common.archive") }}
</router-link>
<div
v-if="showQuickstart"
@@ -188,7 +180,7 @@
d="M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
></path>
</svg>
- <span class="text-sm">{{ $t('common.help') }}</span>
+ <span class="text-sm">{{ $t("common.help") }}</span>
</div>
<div class="text-sm">{{ version }}</div>
</a>
diff --git a/frontend/src/locales/en.yml b/frontend/src/locales/en.yml
index c59ce1c1f5..ce80e8f1ae 100644
--- a/frontend/src/locales/en.yml
+++ b/frontend/src/locales/en.yml
@@ -7,4 +7,9 @@ common:
databases: Databases
instances: Instances
environments: Environments
+ bookmarks: Bookmarks
+ archive: Archive
+ quickstart: Quickstart
+ logout: Logout
not-found: Not Found
+anomaly-center: Anomaly Center
diff --git a/frontend/src/locales/zh-CN.yml b/frontend/src/locales/zh-CN.yml
index 44a52d6f0d..d1bc33a4d6 100644
--- a/frontend/src/locales/zh-CN.yml
+++ b/frontend/src/locales/zh-CN.yml
@@ -7,4 +7,9 @@ common:
databases: 数据库
instances: 实例
environments: 环境
+ bookmarks: 书签
+ archive: 归档
+ quickstart: 快速入门
+ logout: 登出
not-found: 未找到
+anomaly-center: 异常中心
diff --git a/frontend/src/views/DashboardSidebar.vue b/frontend/src/views/DashboardSidebar.vue
index 5c7172cebd..def7595d0a 100644
--- a/frontend/src/views/DashboardSidebar.vue
+++ b/frontend/src/views/DashboardSidebar.vue
@@ -16,7 +16,7 @@
d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"
></path>
</svg>
- Home
+ {{ $t("common.home") }}
</router-link>
<router-link
to="/anomaly-center"
@@ -36,7 +36,7 @@
d="M20.618 5.984A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016zM12 9v2m0 4h.01"
></path>
</svg>
- Anomaly Center
+ {{ $t("anomaly-center") }}
</router-link>
<div>
<BookmarkListSidePanel />