feat: 国际化处理

This commit is contained in:
2025-08-10 03:07:37 -07:00
parent 0d3b63c2fc
commit 01ac12c171
33 changed files with 268 additions and 123 deletions
+7 -7
View File
@@ -31,7 +31,7 @@ interface PurchaseProps {
}
interface PurchaseDialogRef {
show: (subscribe: API.Subscribe) => void;
show: (subscribe: API.Subscribe, tabValue: string) => void;
hide: () => void;
}
@@ -123,7 +123,7 @@ const Purchase = forwardRef<PurchaseDialogRef, PurchaseProps>((props, ref) => {
</DialogHeader>
<div>
<div className='pl-4 text-4xl font-bold text-[#0F2C53] sm:mb-8 sm:pl-0 sm:text-center sm:text-4xl'>
{t('purchaseTitle')}
</div>
<div>
<Tabs
@@ -142,7 +142,7 @@ const Purchase = forwardRef<PurchaseDialogRef, PurchaseProps>((props, ref) => {
<TabsList className='relative mb-8 h-[74px] flex-wrap rounded-full bg-[#EAEAEA] p-2.5'>
{tabValue === 'year' ? (
<span className='absolute -top-8 left-16 z-10 rounded-md bg-[#E22C2E] px-2 py-0.5 text-[10px] font-bold leading-none text-white shadow sm:text-xs'>
-20%
{t('discount20')}
{/* 小三角箭头 */}
{/* <span className="
absolute right-0 top-full
@@ -160,13 +160,13 @@ const Purchase = forwardRef<PurchaseDialogRef, PurchaseProps>((props, ref) => {
className='rounded-full px-10 py-3.5 text-xl data-[state=active]:bg-[#0F2C53] data-[state=active]:text-white md:px-12'
value='year'
>
{t('yearlyPlan')}
</TabsTrigger>
<TabsTrigger
className='rounded-full px-10 py-3.5 text-xl data-[state=active]:bg-[#0F2C53] data-[state=active]:text-white md:px-12'
value='month'
>
{t('monthlyPlan')}
</TabsTrigger>
</TabsList>
</Tabs>
@@ -188,8 +188,8 @@ const Purchase = forwardRef<PurchaseDialogRef, PurchaseProps>((props, ref) => {
/>
<Separator className='mb-3 mt-4 bg-[#225BA9]' />
<div className='flex items-center justify-between text-[15px] text-[#225BA9]'>
<div></div>
<div className='font-light text-[#666]'></div>
<div>{t('paymentMethod')}</div>
<div className='font-light text-[#666]'>{t('walletBalance')}</div>
</div>
</div>
<div className='mt-8 flex items-center justify-center'>
+1 -1
View File
@@ -36,7 +36,7 @@ export default function Recharge(props: Readonly<ButtonProps>) {
return (
<Dialog open={open} onOpenChange={setOpen}>
<DialogTrigger asChild>
<Button {...props}></Button>
<Button {...props}>{t('walletRecharge')}</Button>
</DialogTrigger>
<DialogContent className='flex h-full flex-col overflow-hidden md:h-auto'>
<DialogHeader>
+1 -1
View File
@@ -103,7 +103,7 @@ export default function Renewal({ id, subscribe, className }: Readonly<RenewalPr
<Dialog open={open} onOpenChange={setOpen}>
<DialogTrigger asChild>
<Button size='sm' className={className}>
{t('renewPlan')}
</Button>
</DialogTrigger>
<DialogContent className='flex h-full max-w-screen-lg flex-col overflow-hidden md:h-auto'>