feat: internationalize various components and views with i18n translations
This commit is contained in:
@@ -7,6 +7,7 @@ import CryptocurrencyColorNuls from "~icons/cryptocurrency-color/nuls";
|
||||
import { client, safeClient } from "@/api";
|
||||
import { DepositTypeEnum } from "@/api/enum";
|
||||
|
||||
const { t } = useI18n();
|
||||
const [query] = useResetRef<UserDepositOrderBody>({
|
||||
limit: 20,
|
||||
offset: 0,
|
||||
@@ -49,14 +50,14 @@ async function handleInfinite(event: InfiniteScrollCustomEvent) {
|
||||
}
|
||||
async function handleCancel(id: string) {
|
||||
const alert = await alertController.create({
|
||||
header: "确认取消充值?",
|
||||
header: t("wallet.deposit.confirmCancel"),
|
||||
buttons: [
|
||||
{
|
||||
text: "取消",
|
||||
text: t("wallet.deposit.cancel"),
|
||||
role: "cancel",
|
||||
},
|
||||
{
|
||||
text: "确认取消",
|
||||
text: t("wallet.deposit.confirmCancelButton"),
|
||||
role: "destructive",
|
||||
handler: async () => {
|
||||
await safeClient(client.api.deposit.orders({ orderId: id }).cancel.post());
|
||||
@@ -102,7 +103,7 @@ onBeforeMount(() => {
|
||||
<ion-row class="ion-align-items-center">
|
||||
<ion-col size="3" class="flex flex-col">
|
||||
<div class="text-xs text-text-500">
|
||||
金额
|
||||
{{ t('wallet.deposit.amount') }}
|
||||
</div>
|
||||
<div class="text-sm font-bold">
|
||||
{{ Number(item.amount).toFixed(2) }}
|
||||
@@ -110,7 +111,7 @@ onBeforeMount(() => {
|
||||
</ion-col>
|
||||
<ion-col size="3" class="flex flex-col">
|
||||
<div class="text-xs text-text-500">
|
||||
充值方式
|
||||
{{ t('wallet.deposit.depositMethod') }}
|
||||
</div>
|
||||
<div class="text-xs font-bold">
|
||||
{{ item.depositType }}
|
||||
@@ -118,7 +119,7 @@ onBeforeMount(() => {
|
||||
</ion-col>
|
||||
<ion-col size="6" class="flex flex-col">
|
||||
<div class="text-xs text-text-500 text-right">
|
||||
创建时间
|
||||
{{ t('wallet.deposit.createdAt') }}
|
||||
</div>
|
||||
<div class="text-xs font-bold text-right">
|
||||
{{ useDateFormat(item.createdAt, 'MM/DD HH:mm') }}
|
||||
@@ -129,7 +130,7 @@ onBeforeMount(() => {
|
||||
<ion-row class="ion-align-items-center">
|
||||
<ion-col size="6" class="flex flex-col">
|
||||
<div class="text-xs text-text-500">
|
||||
订单号
|
||||
{{ t('wallet.deposit.orderNo') }}
|
||||
</div>
|
||||
<div class="text-xs font-bold">
|
||||
{{ item.orderNo }}
|
||||
@@ -137,7 +138,7 @@ onBeforeMount(() => {
|
||||
</ion-col>
|
||||
<ion-col size="6" class="text-right">
|
||||
<ion-button v-if="item.status === 'pending'" size="small" fill="outline" color="success" @click.stop="handleCancel(item.id)">
|
||||
取消充值
|
||||
{{ t('wallet.deposit.cancelDeposit') }}
|
||||
</ion-button>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
Reference in New Issue
Block a user