I18n Translations (#2267)

* rebase

* i18n-1

* add error info i18n

* fix

* fix

* refactor: 删除error.json

* delete useI18n
This commit is contained in:
papapatrick
2024-08-05 18:42:21 +08:00
committed by GitHub
parent 025d405fe2
commit 10dcdb5491
107 changed files with 1128 additions and 416 deletions

View File

@@ -309,6 +309,7 @@ const ConfirmPayModal = ({
onConfirmPay
}: ConfirmPayModalProps & { onClose: () => void; onConfirmPay: () => void }) => {
const { t } = useTranslation();
const [qrPayData, setQRPayData] = useState<QRPayProps>();
const formatPayPrice = Math.ceil(formatStorePrice2Read(payPrice));
@@ -340,16 +341,24 @@ const ConfirmPayModal = ({
>
<ModalBody py={5} px={9}>
<Flex>
<Box flex={'0 0 100px'}></Box>
<Box>{formatStorePrice2Read(totalPrice)}</Box>
<Box flex={'0 0 100px'}>{t('common:pay.new_package_price')}</Box>
<Box>{t('common:pay.yuan', { amount: formatStorePrice2Read(totalPrice) })}</Box>
</Flex>
<Flex mt={6}>
<Box flex={'0 0 100px'}></Box>
<Box>{Math.floor(formatStorePrice2Read(totalPrice - payPrice))}</Box>
<Box flex={'0 0 100px'}>{t('common:pay.old_package_price')}</Box>
<Box>
{t('common:pay.yuan', {
amount: Math.floor(formatStorePrice2Read(totalPrice - payPrice))
})}
</Box>
</Flex>
<Flex mt={6}>
<Box flex={'0 0 100px'}></Box>
<Box>{formatPayPrice}</Box>
<Box flex={'0 0 100px'}>{t('common:pay.balance_notice')}</Box>
<Box>
{t('common:pay.yuan', {
amount: formatPayPrice
})}
</Box>
</Flex>
</ModalBody>
<ModalFooter
@@ -359,13 +368,15 @@ const ConfirmPayModal = ({
justifyContent={'flex-start'}
px={0}
>
<Box>: </Box>
<Box>{t('common:pay.balance') + ': '}</Box>
<Box ml={2} flex={1}>
{formatTeamBalance}
{t('common:pay.yuan', {
amount: formatTeamBalance
})}
</Box>
{teamBalance >= payPrice ? (
<Button size={'sm'} onClick={onConfirmPay}>
{t('common:pay.confirm_pay')}
</Button>
) : (
<Button
@@ -375,7 +386,7 @@ const ConfirmPayModal = ({
handleClickPay(Math.ceil(formatStorePrice2Read(payPrice - teamBalance)));
}}
>
{t('common:pay.to_recharge')}
</Button>
)}
</ModalFooter>