From 296a6c10a3d80570ab5cc91c05a440bb206e8856 Mon Sep 17 00:00:00 2001 From: web Date: Mon, 11 Aug 2025 04:06:39 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(system):=20Add=20time=20unit?= =?UTF-8?q?=20translations=20for=20user=20registration=20settings=20in=20m?= =?UTF-8?q?ultiple=20languages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/user-security/register-form.tsx | 216 ++++++++++-------- apps/admin/app/dashboard/ticket/page.tsx | 2 +- apps/admin/locales/cs-CZ/system.json | 11 +- apps/admin/locales/de-DE/system.json | 11 +- apps/admin/locales/en-US/system.json | 15 +- apps/admin/locales/es-ES/system.json | 11 +- apps/admin/locales/es-MX/system.json | 11 +- apps/admin/locales/fa-IR/system.json | 11 +- apps/admin/locales/fi-FI/system.json | 11 +- apps/admin/locales/fr-FR/system.json | 11 +- apps/admin/locales/hi-IN/system.json | 11 +- apps/admin/locales/hu-HU/system.json | 11 +- apps/admin/locales/ja-JP/system.json | 11 +- apps/admin/locales/ko-KR/system.json | 11 +- apps/admin/locales/no-NO/system.json | 11 +- apps/admin/locales/pl-PL/system.json | 11 +- apps/admin/locales/pt-BR/system.json | 11 +- apps/admin/locales/ro-RO/system.json | 11 +- apps/admin/locales/ru-RU/system.json | 11 +- apps/admin/locales/th-TH/system.json | 11 +- apps/admin/locales/tr-TR/system.json | 11 +- apps/admin/locales/uk-UA/system.json | 11 +- apps/admin/locales/vi-VN/system.json | 11 +- apps/admin/locales/zh-CN/system.json | 13 +- apps/admin/locales/zh-HK/system.json | 11 +- 25 files changed, 287 insertions(+), 190 deletions(-) diff --git a/apps/admin/app/dashboard/system/user-security/register-form.tsx b/apps/admin/app/dashboard/system/user-security/register-form.tsx index 18049da..3201c89 100644 --- a/apps/admin/app/dashboard/system/user-security/register-form.tsx +++ b/apps/admin/app/dashboard/system/user-security/register-form.tsx @@ -167,12 +167,58 @@ export default function RegisterConfig() { /> {t('ipRegistrationLimitDescription')} - )} /> + {form.watch('enable_ip_register_limit') && ( +
+ ( + + {t('registrationLimitCount')} + + field.onChange(Number(value))} + /> + + {t('registrationLimitCountDescription')} + + + )} + /> + + ( + + {t('registrationLimitExpire')} + + field.onChange(Number(value))} + /> + + {t('registrationLimitExpireDescription')} + + + )} + /> +
+ )} + - ( - - {t('registrationLimitCount')} - - field.onChange(Number(value))} - /> - - {t('registrationLimitCountDescription')} - - - )} - /> - - ( - - {t('registrationLimitExpire')} - - field.onChange(Number(value))} - /> - - {t('registrationLimitExpireDescription')} - - - )} - /> - - ( - - {t('trialTime')} - - field.onChange(Number(value))} - /> - - {t('trialTimeDescription')} - - - )} - /> - - ( - - {t('trialSubscribe')} - - { - if (value) { - field.onChange(value); - } - }} - options={ - subscribe?.map((item) => ({ - label: item.name, - value: item.id, - })) || [] - } - /> - - {t('trialSubscribeDescription')} - - - )} - /> + {form.watch('enable_trial') && ( + <> + ( + + {t('trialConfig')} + +
+ field.onChange(Number(value))} + className='flex-1' + prefix={ + ( + { + if (value) { + field.onChange(value); + } + }} + options={ + subscribe?.map((item) => ({ + label: item.name, + value: item.id, + })) || [] + } + className='bg-secondary w-32 rounded-r-none' + /> + )} + /> + } + suffix={ + ( + { + unitField.onChange(value); + }} + options={[ + { label: t('none'), value: 'None' }, + { label: t('year'), value: 'Year' }, + { label: t('month'), value: 'Month' }, + { label: t('day'), value: 'Day' }, + { label: t('hour'), value: 'Hour' }, + { label: t('minute'), value: 'Minute' }, + ]} + className='bg-secondary w-32 rounded-l-none' + /> + )} + /> + } + /> +
+
+ {t('trialConfigDescription')} + +
+ )} + /> + + )} diff --git a/apps/admin/app/dashboard/ticket/page.tsx b/apps/admin/app/dashboard/ticket/page.tsx index 6347f66..8f3572b 100644 --- a/apps/admin/app/dashboard/ticket/page.tsx +++ b/apps/admin/app/dashboard/ticket/page.tsx @@ -172,7 +172,7 @@ export default function Page() { {ticket?.description} -
+
{ticket?.follow?.map((item) => (