Skip to content

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

feat(i18n): added i18n support to inbox module (#191)

Luke Zhou45939190b99d
diff --git a/frontend/src/locales/en.yml b/frontend/src/locales/en.yml
index b88b0469a2..b1ae8aa3b8 100644
--- a/frontend/src/locales/en.yml
+++ b/frontend/src/locales/en.yml
@@ -1,4 +1,7 @@
common:
+ unread: Unread
+ read: Read
+ inbox: Inbox
activity: Activity
sign-in: Sign in
sign-up: Sign up
@@ -523,3 +526,6 @@ anomaly:
view-diff: View diff
last-seen: Last seen
first-seen: First seen
+inbox:
+ mark-all-as-read: Mark all as read
+ view-older: View older
diff --git a/frontend/src/locales/zh-CN.yml b/frontend/src/locales/zh-CN.yml
index d4847498fb..d9dfd66927 100644
--- a/frontend/src/locales/zh-CN.yml
+++ b/frontend/src/locales/zh-CN.yml
@@ -1,4 +1,7 @@
common:
+ unread: 未读
+ read: 已读
+ inbox: 通知
sign-in: 登陆
sign-up: 注册
email: 邮箱
@@ -467,3 +470,6 @@ anomaly:
view-diff: 查看差异
last-seen: 上次出现
first-seen: 首次出现
+inbox:
+ mark-all-as-read: 全部标记为已读
+ view-older: 查看更早
diff --git a/frontend/src/views/Inbox.vue b/frontend/src/views/Inbox.vue
index f2d665032e..4ef1a20100 100644
--- a/frontend/src/views/Inbox.vue
+++ b/frontend/src/views/Inbox.vue
@@ -3,41 +3,30 @@
<div class="space-y-4">
<div class="mx-6 space-y-2">
<div
- class="
- flex
- items-center
- justify-between
- pb-2
- border-b border-block-border
- "
+ class="flex items-center justify-between pb-2 border-b border-block-border"
>
- <div class="text-lg leading-6 font-medium text-main">Unread</div>
+ <div class="text-lg leading-6 font-medium text-main">
+ {{ $t("common.unread") }}
+ </div>
<button type="button" class="btn-normal" @click.prevent="markAllAsRead">
<heroicons-outline:check
class="-ml-1 mr-2 h-5 w-5 text-control-light"
/>
- <span>Mark all as read</span>
+ <span>{{ $t("inbox.mark-all-as-read") }}</span>
</button>
</div>
<InboxList :inbox-list="state.unreadList" />
</div>
<div class="mt-6 mx-6 space-y-2">
<div
- class="
- text-lg
- leading-6
- font-medium
- text-main
- pb-2
- border-b border-block-border
- "
+ class="text-lg leading-6 font-medium text-main pb-2 border-b border-block-border"
>
- Read
+ {{ $t("common.read") }}
</div>
<InboxList class="opacity-70" :inbox-list="state.readList" />
<div class="mt-2 flex justify-end">
<button type="button" class="normal-link" @click.prevent="viewOlder">
- View older
+ {{ $t("inbox.view-older") }}
</button>
</div>
</div>