Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
canifa_note
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vũ Hoàng Anh
canifa_note
Commits
930b54fa
Unverified
Commit
930b54fa
authored
Jan 29, 2023
by
WY-WY-W
Committed by
GitHub
Jan 29, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: update Traditional Chinese translation (#994)
parent
5b0a54bf
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
265 additions
and
3 deletions
+265
-3
user_setting.go
api/user_setting.go
+1
-1
LocaleSelect.tsx
web/src/components/LocaleSelect.tsx
+2
-1
i18n.ts
web/src/i18n.ts
+4
-0
zh-Hant.json
web/src/locales/zh-Hant.json
+257
-0
i18n.d.ts
web/src/types/i18n.d.ts
+1
-1
No files found.
api/user_setting.go
View file @
930b54fa
...
@@ -36,7 +36,7 @@ func (key UserSettingKey) String() string {
...
@@ -36,7 +36,7 @@ func (key UserSettingKey) String() string {
}
}
var
(
var
(
UserSettingLocaleValue
=
[]
string
{
"en"
,
"zh"
,
"vi"
,
"fr"
,
"nl"
,
"sv"
,
"de"
,
"es"
,
"uk"
,
"ru"
,
"it"
}
UserSettingLocaleValue
=
[]
string
{
"en"
,
"zh"
,
"vi"
,
"fr"
,
"nl"
,
"sv"
,
"de"
,
"es"
,
"uk"
,
"ru"
,
"it"
,
"hant"
}
UserSettingAppearanceValue
=
[]
string
{
"system"
,
"light"
,
"dark"
}
UserSettingAppearanceValue
=
[]
string
{
"system"
,
"light"
,
"dark"
}
UserSettingMemoVisibilityValue
=
[]
Visibility
{
Private
,
Protected
,
Public
}
UserSettingMemoVisibilityValue
=
[]
Visibility
{
Private
,
Protected
,
Public
}
UserSettingMemoDisplayTsOptionKeyValue
=
[]
string
{
"created_ts"
,
"updated_ts"
}
UserSettingMemoDisplayTsOptionKeyValue
=
[]
string
{
"created_ts"
,
"updated_ts"
}
...
...
web/src/components/LocaleSelect.tsx
View file @
930b54fa
...
@@ -23,7 +23,7 @@ const LocaleSelect: FC<Props> = (props: Props) => {
...
@@ -23,7 +23,7 @@ const LocaleSelect: FC<Props> = (props: Props) => {
onChange=
{
(
_
,
value
)
=>
handleSelectChange
(
value
as
Locale
)
}
onChange=
{
(
_
,
value
)
=>
handleSelectChange
(
value
as
Locale
)
}
>
>
<
Option
value=
"en"
>
English
</
Option
>
<
Option
value=
"en"
>
English
</
Option
>
<
Option
value=
"zh"
>
中文
</
Option
>
<
Option
value=
"zh"
>
简体
中文
</
Option
>
<
Option
value=
"vi"
>
Tiếng Việt
</
Option
>
<
Option
value=
"vi"
>
Tiếng Việt
</
Option
>
<
Option
value=
"fr"
>
French
</
Option
>
<
Option
value=
"fr"
>
French
</
Option
>
<
Option
value=
"nl"
>
Nederlands
</
Option
>
<
Option
value=
"nl"
>
Nederlands
</
Option
>
...
@@ -33,6 +33,7 @@ const LocaleSelect: FC<Props> = (props: Props) => {
...
@@ -33,6 +33,7 @@ const LocaleSelect: FC<Props> = (props: Props) => {
<
Option
value=
"uk"
>
Українська
</
Option
>
<
Option
value=
"uk"
>
Українська
</
Option
>
<
Option
value=
"ru"
>
Русский
</
Option
>
<
Option
value=
"ru"
>
Русский
</
Option
>
<
Option
value=
"it"
>
Italiano
</
Option
>
<
Option
value=
"it"
>
Italiano
</
Option
>
<
Option
value=
"hant"
>
繁體中文
</
Option
>
</
Select
>
</
Select
>
);
);
};
};
...
...
web/src/i18n.ts
View file @
930b54fa
...
@@ -11,6 +11,7 @@ import esLocale from "./locales/es.json";
...
@@ -11,6 +11,7 @@ import esLocale from "./locales/es.json";
import
ukLocale
from
"./locales/uk.json"
;
import
ukLocale
from
"./locales/uk.json"
;
import
ruLocale
from
"./locales/ru.json"
;
import
ruLocale
from
"./locales/ru.json"
;
import
itLocale
from
"./locales/it.json"
;
import
itLocale
from
"./locales/it.json"
;
import
hantLocale
from
"./locales/zh-Hant.json"
;
i18n
.
use
(
initReactI18next
).
init
({
i18n
.
use
(
initReactI18next
).
init
({
resources
:
{
resources
:
{
...
@@ -47,6 +48,9 @@ i18n.use(initReactI18next).init({
...
@@ -47,6 +48,9 @@ i18n.use(initReactI18next).init({
it
:
{
it
:
{
translation
:
itLocale
,
translation
:
itLocale
,
},
},
hant
:
{
translation
:
hantLocale
,
},
},
},
lng
:
"nl"
,
lng
:
"nl"
,
fallbackLng
:
"en"
,
fallbackLng
:
"en"
,
...
...
web/src/locales/zh-Hant.json
0 → 100644
View file @
930b54fa
{
"common"
:
{
"about"
:
"關於"
,
"email"
:
"郵箱"
,
"password"
:
"密碼"
,
"repeat-password-short"
:
"重複密碼"
,
"repeat-password"
:
"重複密碼"
,
"new-password"
:
"新密碼"
,
"repeat-new-password"
:
"重複新密碼"
,
"username"
:
"用戶名"
,
"nickname"
:
"暱稱"
,
"save"
:
"保存"
,
"close"
:
"關閉"
,
"cancel"
:
"退出"
,
"create"
:
"創建"
,
"change"
:
"修改"
,
"confirm"
:
"確定"
,
"reset"
:
"重置"
,
"language"
:
"語言"
,
"version"
:
"版本"
,
"pin"
:
"置頂"
,
"unpin"
:
"取消置頂"
,
"edit"
:
"編輯"
,
"restore"
:
"恢復"
,
"delete"
:
"刪除"
,
"null"
:
"空"
,
"share"
:
"分享"
,
"archive"
:
"歸檔"
,
"basic"
:
"基礎"
,
"admin"
:
"管理員"
,
"explore"
:
"探索"
,
"sign-in"
:
"登錄"
,
"sign-up"
:
"注冊"
,
"sign-out"
:
"退出登錄"
,
"back-to-home"
:
"回到主頁"
,
"type"
:
"類型"
,
"shortcuts"
:
"捷徑"
,
"title"
:
"標題"
,
"filter"
:
"過濾器"
,
"tags"
:
"全部標簽"
,
"yourself"
:
"你自己"
,
"archived-at"
:
"歸檔於"
,
"changed"
:
"已更改"
,
"update-on"
:
"更新於"
,
"fold"
:
"折疊"
,
"expand"
:
"展開"
,
"image"
:
"圖片"
,
"link"
:
"鏈接"
,
"vacuum"
:
"清理"
,
"select"
:
"選擇"
},
"slogan"
:
"An open-source, self-hosted memo hub with knowledge management and socialization."
,
"auth"
:
{
"signup-as-host"
:
"注冊為 Host"
,
"host-tip"
:
"你正在注冊為 Host 用戶賬號。"
,
"not-host-tip"
:
"如果你沒有賬號,請聯係站點 Host"
},
"sidebar"
:
{
"daily-review"
:
"每日回顧"
,
"resources"
:
"資源庫"
,
"setting"
:
"設置"
,
"archived"
:
"已歸檔"
},
"daily-review"
:
{
"oops-nothing"
:
"啊哦,空空蕩蕩。"
},
"resources"
:
{
"description"
:
"查看在 Memo 中的靜態資源。例如:圖片"
,
"no-resources"
:
"沒有資源"
,
"fetching-data"
:
"請求數據中..."
,
"upload"
:
"上傳"
,
"preview"
:
"預覽"
,
"copy-link"
:
"拷貝鏈接"
,
"delete-resource"
:
"刪除資源"
,
"warning-text"
:
"確定刪除這個資源麼?此操作不可逆❗"
,
"linked-amount"
:
"鏈接的 Memo 數量"
,
"rename"
:
"重命名"
,
"clear"
:
"清除"
,
"warning-text-unused"
:
"確定刪除這些無用資源嗎?此操作不可逆❗"
,
"no-unused-resources"
:
"無可刪除的資源"
,
"name"
:
"資源名稱"
},
"archived"
:
{
"archived-memos"
:
"已歸檔的 Memo"
,
"no-archived-memos"
:
"沒有歸檔的 Memo"
,
"fetching-data"
:
"請求數據中..."
},
"editor"
:
{
"editing"
:
"編輯中..."
,
"cancel-edit"
:
"退出編輯"
,
"save"
:
"記下"
,
"placeholder"
:
"現在的想法是..."
,
"only-image-supported"
:
"僅支持圖片文件。"
,
"cant-empty"
:
"內容不能為空"
,
"local"
:
"本地上傳"
,
"resources"
:
"資源庫"
},
"memo"
:
{
"view-detail"
:
"查看詳情"
,
"copy"
:
"覆制"
,
"visibility"
:
{
"private"
:
"僅自己可見"
,
"protected"
:
"登錄用戶可見"
,
"public"
:
"所有人可見"
}
},
"memo-list"
:
{
"fetching-data"
:
"請求數據中..."
,
"fetch-more"
:
"點擊加載更多"
},
"shortcut-list"
:
{
"shortcut-title"
:
"捷徑標題"
,
"create-shortcut"
:
"創建捷徑"
,
"edit-shortcut"
:
"編輯捷徑"
,
"eligible-memo"
:
"符合條件的 Memo"
,
"fill-previous"
:
"請填寫之前的過濾值"
,
"title-required"
:
"標題是必填項。"
,
"value-required"
:
"過濾值是必填項"
},
"filter"
:
{
"new-filter"
:
"新建過濾器"
,
"type"
:
{
"tag"
:
"標簽"
,
"type"
:
"類型"
,
"text"
:
"文本"
,
"display-time"
:
"顯示時間"
,
"visibility"
:
"可見性"
},
"operator"
:
{
"contains"
:
"包含"
,
"not-contains"
:
"不包含"
,
"is"
:
"是"
,
"is-not"
:
"不是"
,
"before"
:
"早於"
,
"after"
:
"晚於"
},
"value"
:
{
"not-tagged"
:
"無標簽"
,
"linked"
:
"包含鏈接"
},
"text-placeholder"
:
"以 ^ 開頭使用正則表達式"
},
"tag-list"
:
{
"tip-text"
:
"輸入`#tag `來創建標簽"
},
"search"
:
{
"quickly-filter"
:
"快速過濾"
},
"setting"
:
{
"my-account"
:
"我的賬號"
,
"preference"
:
"偏好設置"
,
"member"
:
"成員"
,
"member-list"
:
"成員列表"
,
"system"
:
"系統"
,
"account-section"
:
{
"title"
:
"賬號信息"
,
"update-information"
:
"更新個人信息"
,
"change-password"
:
"修改密碼"
},
"preference-section"
:
{
"theme"
:
"主題"
,
"default-memo-visibility"
:
"默認 Memo 可見性"
,
"enable-folding-memo"
:
"開啟折疊 Memo"
,
"enable-powerful-editor"
:
"開啟編輯器自動補全"
,
"editor-font-style"
:
"編輯器字體樣式"
,
"mobile-editor-style"
:
"移動端編輯器樣式"
,
"default-memo-sort-option"
:
"Memo 顯示時間"
,
"created_ts"
:
"創建時間"
,
"updated_ts"
:
"更新時間"
},
"member-section"
:
{
"create-a-member"
:
"創建成員"
},
"system-section"
:
{
"server-name"
:
"服務名稱"
,
"customize-server"
:
{
"title"
:
"自定義服務"
,
"default"
:
"默認為 memos"
,
"icon-url"
:
"圖標 URL"
},
"database-file-size"
:
"數據庫文件大小"
,
"allow-user-signup"
:
"允許用戶注冊"
,
"additional-style"
:
"自定義樣式"
,
"additional-script"
:
"自定義腳本"
,
"additional-style-placeholder"
:
"自定義 CSS 代碼"
,
"additional-script-placeholder"
:
"自定義 JavaScript 代碼"
},
"apperance-option"
:
{
"system"
:
"跟隨系統"
,
"light"
:
"總是淺色"
,
"dark"
:
"總是深色"
}
},
"amount-text"
:
{
"memo_one"
:
"MEMO"
,
"memo_other"
:
"MEMOS"
,
"tag_one"
:
"TAG"
,
"tag_other"
:
"TAGS"
,
"day_one"
:
"DAY"
,
"day_other"
:
"DAYS"
},
"message"
:
{
"no-memos"
:
"沒有 Memos 了 🌃"
,
"memos-ready"
:
"所有 Memos 已就緒 🎉"
,
"restored-successfully"
:
"恢覆成功"
,
"memo-updated-datetime"
:
"Memo 創建日期時間已更改。"
,
"invalid-created-datetime"
:
"創建的日期時間無效。"
,
"change-memo-created-time"
:
"更改 Memo 創建時間"
,
"memo-not-found"
:
"找不到 Memo。"
,
"fill-all"
:
"請填寫所有字段。"
,
"password-not-match"
:
"密碼不一致。"
,
"new-password-not-match"
:
"新密碼不匹配。"
,
"image-load-failed"
:
"圖片加載失敗"
,
"fill-form"
:
"請填寫此表單"
,
"login-failed"
:
"登錄失敗"
,
"signup-failed"
:
"注冊失敗"
,
"user-not-found"
:
"未找到用戶"
,
"password-changed"
:
"密碼已修改"
,
"private-only"
:
"此 Memo 僅自己可見"
,
"copied"
:
"已覆制"
,
"succeed-copy-content"
:
"覆制內容到剪貼板成功。"
,
"succeed-copy-code"
:
"覆制代碼到剪貼板成功。"
,
"succeed-copy-link"
:
"覆制鏈接到剪貼板成功。"
,
"change-resource-filename"
:
"更改資源文件名"
,
"resource-filename-updated"
:
"資源文件名更改成功。"
,
"invalid-resource-filename"
:
"無效的資源文件名"
,
"click-to-save-the-image"
:
"點擊保存圖片"
,
"generating-the-screenshot"
:
"正在生成圖片..."
,
"count-selected-resources"
:
"所選資源總數"
,
"too-short"
:
"過短"
,
"too-long"
:
"過長"
,
"not-allow-space"
:
"不允許包含空格"
,
"not-allow-chinese"
:
"不允許包含中文"
,
"succeed-to-vacuum-database"
:
"清空數據庫成功"
,
"succeed-update-additional-style"
:
"更新附加樣式成功"
,
"succeed-copy-resource-link"
:
"覆制資源鏈接到剪貼板成功"
,
"succeed-update-customized-profile"
:
"更新自定義配置文件成功"
,
"succeed-update-additional-script"
:
"更新附加腳本成功"
,
"update-succeed"
:
"更新成功"
},
"days"
:
{
"monday"
:
"星期一"
,
"mon"
:
"一"
,
"tuesday"
:
"星期二"
,
"tue"
:
"二"
,
"wednesday"
:
"星期三"
,
"wed"
:
"三"
,
"thursday"
:
"星期四"
,
"thu"
:
"四"
,
"friday"
:
"星期五"
,
"fri"
:
"五"
,
"saturday"
:
"星期六"
,
"sat"
:
"六"
,
"sunday"
:
"星期天"
,
"sun"
:
"日"
}
}
web/src/types/i18n.d.ts
View file @
930b54fa
type
Locale
=
"en"
|
"zh"
|
"vi"
|
"fr"
|
"nl"
|
"sv"
|
"de"
|
"es"
|
"uk"
|
"ru"
|
"it"
;
type
Locale
=
"en"
|
"zh"
|
"vi"
|
"fr"
|
"nl"
|
"sv"
|
"de"
|
"es"
|
"uk"
|
"ru"
|
"it"
|
"hant"
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment