From 70497af0aade65c46fa1d92fe85924460b5c6f93 Mon Sep 17 00:00:00 2001 From: "web@ppanel" Date: Wed, 8 Jan 2025 12:55:10 +0700 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(locales):=20Update=20'deductBa?= =?UTF-8?q?lance'=20to=20'giftAmount'=20across=20multiple=20languages=20an?= =?UTF-8?q?d=20fix=20newline=20in=20announcement.json?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 56 +++++++++---------- apps/admin/locales/zh-HK/announcement.json | 2 +- apps/user/app/(main)/(user)/sidebar-right.tsx | 2 +- apps/user/app/(main)/(user)/wallet/page.tsx | 2 +- .../user/components/subscribe/unsubscribe.tsx | 4 +- apps/user/config/constants.ts | 22 ++++++++ apps/user/locales/cs-CZ/layout.json | 2 +- apps/user/locales/cs-CZ/subscribe.json | 6 +- apps/user/locales/cs-CZ/wallet.json | 2 +- apps/user/locales/de-DE/layout.json | 2 +- apps/user/locales/de-DE/subscribe.json | 6 +- apps/user/locales/de-DE/wallet.json | 2 +- apps/user/locales/en-US/layout.json | 2 +- apps/user/locales/en-US/subscribe.json | 6 +- apps/user/locales/en-US/wallet.json | 2 +- apps/user/locales/es-ES/layout.json | 2 +- apps/user/locales/es-ES/subscribe.json | 6 +- apps/user/locales/es-ES/wallet.json | 2 +- apps/user/locales/es-MX/layout.json | 2 +- apps/user/locales/es-MX/subscribe.json | 6 +- apps/user/locales/es-MX/wallet.json | 2 +- apps/user/locales/fa-IR/layout.json | 2 +- apps/user/locales/fa-IR/subscribe.json | 6 +- apps/user/locales/fa-IR/wallet.json | 2 +- apps/user/locales/fi-FI/layout.json | 2 +- apps/user/locales/fi-FI/subscribe.json | 6 +- apps/user/locales/fi-FI/wallet.json | 2 +- apps/user/locales/fr-FR/layout.json | 2 +- apps/user/locales/fr-FR/subscribe.json | 6 +- apps/user/locales/fr-FR/wallet.json | 2 +- apps/user/locales/hi-IN/layout.json | 2 +- apps/user/locales/hi-IN/subscribe.json | 6 +- apps/user/locales/hi-IN/wallet.json | 2 +- apps/user/locales/hu-HU/layout.json | 2 +- apps/user/locales/hu-HU/subscribe.json | 6 +- apps/user/locales/hu-HU/wallet.json | 2 +- apps/user/locales/ja-JP/layout.json | 2 +- apps/user/locales/ja-JP/subscribe.json | 6 +- apps/user/locales/ja-JP/wallet.json | 2 +- apps/user/locales/ko-KR/layout.json | 2 +- apps/user/locales/ko-KR/subscribe.json | 6 +- apps/user/locales/ko-KR/wallet.json | 2 +- apps/user/locales/no-NO/layout.json | 2 +- apps/user/locales/no-NO/subscribe.json | 6 +- apps/user/locales/no-NO/wallet.json | 2 +- apps/user/locales/pl-PL/layout.json | 2 +- apps/user/locales/pl-PL/subscribe.json | 6 +- apps/user/locales/pl-PL/wallet.json | 2 +- apps/user/locales/pt-BR/layout.json | 2 +- apps/user/locales/pt-BR/subscribe.json | 6 +- apps/user/locales/pt-BR/wallet.json | 2 +- apps/user/locales/ro-RO/layout.json | 2 +- apps/user/locales/ro-RO/subscribe.json | 6 +- apps/user/locales/ro-RO/wallet.json | 2 +- apps/user/locales/ru-RU/layout.json | 2 +- apps/user/locales/ru-RU/subscribe.json | 6 +- apps/user/locales/ru-RU/wallet.json | 2 +- apps/user/locales/th-TH/layout.json | 2 +- apps/user/locales/th-TH/subscribe.json | 6 +- apps/user/locales/th-TH/wallet.json | 2 +- apps/user/locales/tr-TR/layout.json | 2 +- apps/user/locales/tr-TR/subscribe.json | 6 +- apps/user/locales/tr-TR/wallet.json | 2 +- apps/user/locales/uk-UA/layout.json | 2 +- apps/user/locales/uk-UA/subscribe.json | 6 +- apps/user/locales/uk-UA/wallet.json | 2 +- apps/user/locales/vi-VN/layout.json | 2 +- apps/user/locales/vi-VN/subscribe.json | 6 +- apps/user/locales/vi-VN/wallet.json | 2 +- apps/user/locales/zh-CN/layout.json | 2 +- apps/user/locales/zh-CN/subscribe.json | 6 +- apps/user/locales/zh-CN/wallet.json | 2 +- apps/user/locales/zh-HK/layout.json | 2 +- apps/user/locales/zh-HK/subscribe.json | 6 +- apps/user/locales/zh-HK/wallet.json | 2 +- apps/user/utils/common.ts | 2 +- 76 files changed, 169 insertions(+), 151 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 734c14c..564f9cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,52 +1,48 @@ + # Changelog # [1.0.0-beta.4](https://github.com/perfect-panel/ppanel-web/compare/v1.0.0-beta.3...v1.0.0-beta.4) (2025-01-07) - ### ♻ Code Refactoring -* **auth**: Refactor user authorization handling and improve error logging ([68bc18f](https://github.com/perfect-panel/ppanel-web/commit/68bc18f)) - +- **auth**: Refactor user authorization handling and improve error logging ([68bc18f](https://github.com/perfect-panel/ppanel-web/commit/68bc18f)) ### ✨ Features -* **affiliate**: Add Affiliate component with commission display and invite link functionality ([4aea4e8](https://github.com/perfect-panel/ppanel-web/commit/4aea4e8)) -* **affiliate**: Update affiliate component to display total commission and improve data fetching ([cc834ca](https://github.com/perfect-panel/ppanel-web/commit/cc834ca)) -* **api**: Add new subscription properties and locale support for deduction ratios and reset cycles ([fec80f5](https://github.com/perfect-panel/ppanel-web/commit/fec80f5)) -* **api**: Add Time Period Configuration ([837157c](https://github.com/perfect-panel/ppanel-web/commit/837157c)) -* **favicon**: Update SVG favicon design for admin and user interfaces ([1d91738](https://github.com/perfect-panel/ppanel-web/commit/1d91738)) -* **node**: Add serverKey ([25ce37e](https://github.com/perfect-panel/ppanel-web/commit/25ce37e)) -* **relay**: Add relay mode configuration and update related schemas ([3cc9477](https://github.com/perfect-panel/ppanel-web/commit/3cc9477)) -* **schema**: Add security field to hysteria2 and tuic schemas ([cd59d44](https://github.com/perfect-panel/ppanel-web/commit/cd59d44)) -* **subscribe**: Add reset_time to API typings and update unsubscribe logic ([eeea165](https://github.com/perfect-panel/ppanel-web/commit/eeea165)) -* **subscribe**: Add subscribe_discount type ([f99c604](https://github.com/perfect-panel/ppanel-web/commit/f99c604)) -* **subscribe**: Add subscription credits ([5bc7905](https://github.com/perfect-panel/ppanel-web/commit/5bc7905)) -* **subscribe**: Add unsubscribe functionality with confirmation messages and localized strings ([b2a2f42](https://github.com/perfect-panel/ppanel-web/commit/b2a2f42)) -* **subscribe**: Improve error handling in subscription forms and update component props ([d28a10b](https://github.com/perfect-panel/ppanel-web/commit/d28a10b)) -* **subscribe**: Improve layout and styling in subscription components ([5766376](https://github.com/perfect-panel/ppanel-web/commit/5766376)) -* **subscription**: Add localized messages for existing subscriptions and deletion restrictions ([e8a72d5](https://github.com/perfect-panel/ppanel-web/commit/e8a72d5)) - +- **affiliate**: Add Affiliate component with commission display and invite link functionality ([4aea4e8](https://github.com/perfect-panel/ppanel-web/commit/4aea4e8)) +- **affiliate**: Update affiliate component to display total commission and improve data fetching ([cc834ca](https://github.com/perfect-panel/ppanel-web/commit/cc834ca)) +- **api**: Add new subscription properties and locale support for deduction ratios and reset cycles ([fec80f5](https://github.com/perfect-panel/ppanel-web/commit/fec80f5)) +- **api**: Add Time Period Configuration ([837157c](https://github.com/perfect-panel/ppanel-web/commit/837157c)) +- **favicon**: Update SVG favicon design for admin and user interfaces ([1d91738](https://github.com/perfect-panel/ppanel-web/commit/1d91738)) +- **node**: Add serverKey ([25ce37e](https://github.com/perfect-panel/ppanel-web/commit/25ce37e)) +- **relay**: Add relay mode configuration and update related schemas ([3cc9477](https://github.com/perfect-panel/ppanel-web/commit/3cc9477)) +- **schema**: Add security field to hysteria2 and tuic schemas ([cd59d44](https://github.com/perfect-panel/ppanel-web/commit/cd59d44)) +- **subscribe**: Add reset_time to API typings and update unsubscribe logic ([eeea165](https://github.com/perfect-panel/ppanel-web/commit/eeea165)) +- **subscribe**: Add subscribe_discount type ([f99c604](https://github.com/perfect-panel/ppanel-web/commit/f99c604)) +- **subscribe**: Add subscription credits ([5bc7905](https://github.com/perfect-panel/ppanel-web/commit/5bc7905)) +- **subscribe**: Add unsubscribe functionality with confirmation messages and localized strings ([b2a2f42](https://github.com/perfect-panel/ppanel-web/commit/b2a2f42)) +- **subscribe**: Improve error handling in subscription forms and update component props ([d28a10b](https://github.com/perfect-panel/ppanel-web/commit/d28a10b)) +- **subscribe**: Improve layout and styling in subscription components ([5766376](https://github.com/perfect-panel/ppanel-web/commit/5766376)) +- **subscription**: Add localized messages for existing subscriptions and deletion restrictions ([e8a72d5](https://github.com/perfect-panel/ppanel-web/commit/e8a72d5)) ### 🎫 Chores -* Update changelog, enhance prepare script, and add openapi command ([a93db4e](https://github.com/perfect-panel/ppanel-web/commit/a93db4e)) - +- Update changelog, enhance prepare script, and add openapi command ([a93db4e](https://github.com/perfect-panel/ppanel-web/commit/a93db4e)) ### 🐛 Bug Fixes -* **dashboard**: Correct progress value calculations and update groupId accessor ([36c7667](https://github.com/perfect-panel/ppanel-web/commit/36c7667)) -* **layout**: Remove unnecessary cookie initialization in Logout function ([3065c3a](https://github.com/perfect-panel/ppanel-web/commit/3065c3a)) -* **locales**: Update Hong Kong ([6d0d069](https://github.com/perfect-panel/ppanel-web/commit/6d0d069)) -* **subscribe**: Update value validation to check for number type in subscribe form ([6de29d5](https://github.com/perfect-panel/ppanel-web/commit/6de29d5)) - +- **dashboard**: Correct progress value calculations and update groupId accessor ([36c7667](https://github.com/perfect-panel/ppanel-web/commit/36c7667)) +- **layout**: Remove unnecessary cookie initialization in Logout function ([3065c3a](https://github.com/perfect-panel/ppanel-web/commit/3065c3a)) +- **locales**: Update Hong Kong ([6d0d069](https://github.com/perfect-panel/ppanel-web/commit/6d0d069)) +- **subscribe**: Update value validation to check for number type in subscribe form ([6de29d5](https://github.com/perfect-panel/ppanel-web/commit/6de29d5)) ### 💄 Styles -* **locales**: Remove unused subscription labels from multiple locale files ([fb0c510](https://github.com/perfect-panel/ppanel-web/commit/fb0c510)) -* **locales**: Update server.json to reorganize relay mode options and improve labels ([701cdee](https://github.com/perfect-panel/ppanel-web/commit/701cdee)) -* **node**: Improve layout and spacing in NodeStatusCell component ([136287d](https://github.com/perfect-panel/ppanel-web/commit/136287d)) -* **time-slot**: Add chart display ([c44ad47](https://github.com/perfect-panel/ppanel-web/commit/c44ad47)) +- **locales**: Remove unused subscription labels from multiple locale files ([fb0c510](https://github.com/perfect-panel/ppanel-web/commit/fb0c510)) +- **locales**: Update server.json to reorganize relay mode options and improve labels ([701cdee](https://github.com/perfect-panel/ppanel-web/commit/701cdee)) +- **node**: Improve layout and spacing in NodeStatusCell component ([136287d](https://github.com/perfect-panel/ppanel-web/commit/136287d)) +- **time-slot**: Add chart display ([c44ad47](https://github.com/perfect-panel/ppanel-web/commit/c44ad47)) diff --git a/apps/admin/locales/zh-HK/announcement.json b/apps/admin/locales/zh-HK/announcement.json index 4c951db..58cd450 100644 --- a/apps/admin/locales/zh-HK/announcement.json +++ b/apps/admin/locales/zh-HK/announcement.json @@ -29,4 +29,4 @@ "title": "標題", "updateSuccess": "更新成功", "updatedAt": "更新時間" -} \ No newline at end of file +} diff --git a/apps/user/app/(main)/(user)/sidebar-right.tsx b/apps/user/app/(main)/(user)/sidebar-right.tsx index 66dd831..9d75647 100644 --- a/apps/user/app/(main)/(user)/sidebar-right.tsx +++ b/apps/user/app/(main)/(user)/sidebar-right.tsx @@ -36,7 +36,7 @@ export function SidebarRight({ ...props }: React.ComponentProps) - {t('deductBalance')} + {t('giftAmount')} diff --git a/apps/user/app/(main)/(user)/wallet/page.tsx b/apps/user/app/(main)/(user)/wallet/page.tsx index d7f404f..eaf6916 100644 --- a/apps/user/app/(main)/(user)/wallet/page.tsx +++ b/apps/user/app/(main)/(user)/wallet/page.tsx @@ -44,7 +44,7 @@ export default function Page() {

- {t('deductBalance')} + {t('giftAmount')}

diff --git a/apps/user/components/subscribe/unsubscribe.tsx b/apps/user/components/subscribe/unsubscribe.tsx index df15749..d3d5175 100644 --- a/apps/user/components/subscribe/unsubscribe.tsx +++ b/apps/user/components/subscribe/unsubscribe.tsx @@ -71,11 +71,11 @@ export default function Unsubscribe({ id, allowDeduction }: Readonly{t('confirmUnsubscribe')} {t('confirmUnsubscribeDescription')} -

{t('availableDeductionAmount')}

+

{t('residualValue')}

-

{t('deductionNote')}

+

{t('unsubscribeDescription')}