From 156a4f205cee4a1e8344745b0770391d85532743 Mon Sep 17 00:00:00 2001 From: JUDRAGONII Date: Fri, 7 Aug 2026 21:32:13 +0800 Subject: [PATCH] i18n: Add Traditional Chinese (zh-TW) locale support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ### 為什麼改 (Why) - **變更目標**:補齊 Ghostfolio 官方 PR #7106 審核意見要求的全部語系註冊與 Changelog 檔案。 - **動機與痛點**:使 Ghostfolio 完整支援繁體中文 (zh-TW),提供台灣與繁體中文使用者原生語言介面與日期格式。 ### 改了什麼 (What) - **語系註冊**:於 `libs/common/src/lib/config.ts` 的 `SUPPORTED_LANGUAGE_CODES` 中加入 `zh-TW`。 - **日期與轉換**:於 `libs/common/src/lib/helper.ts` 中導入 `date-fns/locale` 的 `zhTW` 並在 `getDateFnsLocale` 設定對應邏輯。 - **UI 選單**:於 `user-account-settings.html` 的語言選單中加入 `Chinese / 繁體中文 (zh-TW)` 選項。 - **變更紀錄**:於 `CHANGELOG.md` 中新增 `Add support for Traditional Chinese (zh-TW) locale` 說明。 ### 實體檔案異動清單 (Files Changed) - [修改] `CHANGELOG.md` - [修改] `apps/client/src/app/components/user-account-settings/user-account-settings.html` - [修改] `libs/common/src/lib/config.ts` - [修改] `libs/common/src/lib/helper.ts` ### 驗證狀態 (Verification) - [x] 本地專案結構驗證通過 - [x] 符合 Ghostfolio 官方貢獻規範 --- CHANGELOG.md | 2 ++ .../user-account-settings/user-account-settings.html | 6 ++++++ libs/common/src/lib/config.ts | 4 +++- libs/common/src/lib/helper.ts | 7 ++++++- 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 45137937d..18be08eb3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,8 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +- Added support for Traditional Chinese (`zh-TW`) locale - Added support for the `DIRECT_URL` environment variable to enable direct database connections + ### Changed - Improved the pagination in the activities table of the account detail dialog diff --git a/apps/client/src/app/components/user-account-settings/user-account-settings.html b/apps/client/src/app/components/user-account-settings/user-account-settings.html index f646ef0fd..b058810a8 100644 --- a/apps/client/src/app/components/user-account-settings/user-account-settings.html +++ b/apps/client/src/app/components/user-account-settings/user-account-settings.html @@ -91,6 +91,12 @@ >Community) + Chinese / 繁體中文 (Community) + Español (Community)