🐛 fix(locales): Order recharge related fields

This commit is contained in:
web@ppanel 2025-02-27 14:53:19 +07:00
parent d5847faeda
commit 35210fe8cf
32 changed files with 115 additions and 17 deletions

View File

@ -1,5 +1,5 @@
// @ts-ignore
// API 更新时间:
// API 唯一标识:
import * as ads from './ads';

View File

@ -1,5 +1,5 @@
// @ts-ignore
// API 更新时间:
// API 唯一标识:
import * as auth from './auth';

View File

@ -1,5 +1,5 @@
import { cn } from "@workspace/ui/lib/utils";
import { motion } from "framer-motion";
import { cn } from '@workspace/ui/lib/utils';
import { motion } from 'framer-motion';
export const CloseIcon = ({ className }: { className?: string }) => {
return (

View File

@ -105,7 +105,9 @@ export function DocumentButton({ items }: { items: API.Document[] }) {
<div className='flex flex-row items-center gap-4'>
<motion.div layoutId={`image-${item.id}-${id}`}>
<Avatar className='size-12'>
<AvatarFallback className='bg-primary/80 text-white'>{item.title.split('')[0]}</AvatarFallback>
<AvatarFallback className='bg-primary/80 text-white'>
{item.title.split('')[0]}
</AvatarFallback>
</Avatar>
</motion.div>
<div className=''>
@ -136,4 +138,4 @@ export function DocumentButton({ items }: { items: API.Document[] }) {
</ul>
</>
);
}
}

View File

@ -7,11 +7,11 @@ import { buttonVariants } from '@workspace/ui/components/button';
import { Markdown } from '@workspace/ui/custom-components/markdown';
import { useOutsideClick } from '@workspace/ui/hooks/use-outside-click';
import { cn } from '@workspace/ui/lib/utils';
import { formatDate } from '@workspace/ui/utils';
import { AnimatePresence, motion } from 'framer-motion';
import { useTranslations } from 'next-intl';
import { RefObject, useEffect, useId, useRef, useState } from 'react';
import { CloseIcon } from './close-icon';
import { formatDate } from '@workspace/ui/utils';
interface Item {
path: string;
@ -127,7 +127,9 @@ export function TutorialButton({ items }: { items: Item[] }) {
<motion.div layoutId={`image-${item.title}-${id}`}>
<Avatar className='size-12'>
<AvatarImage alt={item.title ?? ''} src={item.icon ?? ''} />
<AvatarFallback className='bg-primary/80 text-white'>{item.title.split('')[0]}</AvatarFallback>
<AvatarFallback className='bg-primary/80 text-white'>
{item.title.split('')[0]}
</AvatarFallback>
</Avatar>
</motion.div>
<div className=''>
@ -160,4 +162,4 @@ export function TutorialButton({ items }: { items: Item[] }) {
</ul>
</>
);
}
}

View File

@ -115,10 +115,12 @@ export default function Page() {
)}
{data?.type === 3 && (
<>
<div className='font-semibold'></div>
<div className='font-semibold'>{t('resetTraffic')}</div>
<ul className='grid grid-cols-2 gap-3 *:flex *:items-center *:justify-between lg:grid-cols-1'>
<li className='flex items-center justify-between'>
<span className='text-muted-foreground line-clamp-2 flex-1'></span>
<span className='text-muted-foreground line-clamp-2 flex-1'>
{t('resetPrice')}
</span>
<span>
<Display type='currency' value={data.amount} />
</span>

View File

@ -11,7 +11,7 @@ import {
} from '@workspace/ui/components/select';
import { Icon } from '@workspace/ui/custom-components/icon';
import { getCountry } from '@workspace/ui/utils';
import { useLocale, useTranslations } from 'next-intl';
import { useLocale } from 'next-intl';
import { useRouter } from 'next/navigation';
const languages = {

View File

@ -1,4 +1,5 @@
{
"balanceRecharge": "Dobití kreditu",
"cancel": "Zrušit",
"createdAt": "Datum vytvoření",
"detail": "Detail",
@ -20,6 +21,9 @@
"paymentMethod": "Platební metoda",
"paymentSuccess": "Platba úspěšná",
"productList": "Seznam produktů",
"rechargeAmount": "Částka dobíjení",
"resetPrice": "Obnovit cenu",
"resetTraffic": "Obnovit provoz",
"scanToPay": "Prosím, naskenujte kód pro platbu",
"status": {
"0": "Stav",

View File

@ -1,4 +1,5 @@
{
"balanceRecharge": "Guthabenaufladung",
"cancel": "Abbrechen",
"createdAt": "Erstellungszeitpunkt",
"detail": "Einzelheiten",
@ -20,6 +21,9 @@
"paymentMethod": "Zahlungsmethode",
"paymentSuccess": "Zahlung erfolgreich",
"productList": "Produktliste",
"rechargeAmount": "Aufladebetrag",
"resetPrice": "Preis zurücksetzen",
"resetTraffic": "Verkehr zurücksetzen",
"scanToPay": "Bitte scannen Sie zum Bezahlen",
"status": {
"0": "Status",

View File

@ -1,4 +1,5 @@
{
"balanceRecharge": "Balance Recharge",
"cancel": "Cancel",
"createdAt": "Created At",
"detail": "Detail",
@ -20,6 +21,9 @@
"paymentMethod": "Payment Method",
"paymentSuccess": "Payment Success",
"productList": "Product List",
"rechargeAmount": "Recharge Amount",
"resetPrice": "Reset Price",
"resetTraffic": "Reset Traffic",
"scanToPay": "Scan to Pay",
"status": {
"0": "Status",

View File

@ -1,4 +1,5 @@
{
"balanceRecharge": "Recarga de saldo",
"cancel": "Cancelar",
"createdAt": "Fecha de creación",
"detail": "Detalles",
@ -20,6 +21,9 @@
"paymentMethod": "Método de Pago",
"paymentSuccess": "Pago exitoso",
"productList": "Lista de productos",
"rechargeAmount": "Cantidad de recarga",
"resetPrice": "Restablecer precio",
"resetTraffic": "Restablecer tráfico",
"scanToPay": "Por favor, escanee para pagar",
"status": {
"0": "estado",

View File

@ -1,4 +1,5 @@
{
"balanceRecharge": "Recarga de Saldo",
"cancel": "Cancelar",
"createdAt": "Fecha de creación",
"detail": "Detalles",
@ -20,6 +21,9 @@
"paymentMethod": "Método de Pago",
"paymentSuccess": "Pago exitoso",
"productList": "Lista de productos",
"rechargeAmount": "Monto de Recarga",
"resetPrice": "Restablecer Precio",
"resetTraffic": "Restablecer Tráfico",
"scanToPay": "Por favor, escanee para pagar",
"status": {
"0": "Estado",

View File

@ -1,4 +1,5 @@
{
"balanceRecharge": "شارژ موجودی",
"cancel": "لغو",
"createdAt": "ایجاد شده در",
"detail": "جزئیات",
@ -20,6 +21,9 @@
"paymentMethod": "روش پرداخت",
"paymentSuccess": "پرداخت موفق",
"productList": "فهرست محصولات",
"rechargeAmount": "مقدار شارژ",
"resetPrice": "تنظیم مجدد قیمت",
"resetTraffic": "تنظیم مجدد ترافیک",
"scanToPay": "اسکن برای پرداخت",
"status": {
"0": "وضعیت",

View File

@ -1,4 +1,5 @@
{
"balanceRecharge": "Saldo Lataus",
"cancel": "Peruuta",
"createdAt": "Luontiaika",
"detail": "Yksityiskohdat",
@ -20,6 +21,9 @@
"paymentMethod": "Maksutapa",
"paymentSuccess": "Maksu onnistui",
"productList": "Tuotelista",
"rechargeAmount": "Latausmäärä",
"resetPrice": "Nollaa Hinta",
"resetTraffic": "Nollaa Liikenne",
"scanToPay": "Ole hyvä ja skannaa maksaaksesi",
"status": {
"0": "Tila",

View File

@ -1,4 +1,5 @@
{
"balanceRecharge": "Recharge de Solde",
"cancel": "Annuler",
"createdAt": "Date de création",
"detail": "Détails",
@ -20,6 +21,9 @@
"paymentMethod": "Méthode de paiement",
"paymentSuccess": "Paiement réussi",
"productList": "Liste des produits",
"rechargeAmount": "Montant du Recharge",
"resetPrice": "Réinitialiser le Prix",
"resetTraffic": "Réinitialiser le Trafic",
"scanToPay": "Veuillez scanner pour payer",
"status": {
"0": "Statut",

View File

@ -1,4 +1,5 @@
{
"balanceRecharge": "बैलेंस रिचार्ज",
"cancel": "रद्द करें",
"createdAt": "निर्माण समय",
"detail": "विवरण",
@ -20,6 +21,9 @@
"paymentMethod": "भुगतान विधि",
"paymentSuccess": "भुगतान सफल",
"productList": "उत्पाद सूची",
"rechargeAmount": "रिचार्ज राशि",
"resetPrice": "रीसेट मूल्य",
"resetTraffic": "रीसेट ट्रैफिक",
"scanToPay": "कृपया स्कैन करके भुगतान करें",
"status": {
"0": "स्थिति",

View File

@ -1,4 +1,5 @@
{
"balanceRecharge": "Egyenleg Feltöltés",
"cancel": "Mégse",
"createdAt": "Létrehozás ideje",
"detail": "Részletek",
@ -20,6 +21,9 @@
"paymentMethod": "Fizetési mód",
"paymentSuccess": "Fizetés sikeres",
"productList": "Terméklista",
"rechargeAmount": "Feltöltési Összeg",
"resetPrice": "Ár Visszaállítása",
"resetTraffic": "Forgalom Visszaállítása",
"scanToPay": "Kérjük, olvassa be a kódot a fizetéshez",
"status": {
"0": "Állapot",

View File

@ -1,4 +1,5 @@
{
"balanceRecharge": "残高のチャージ",
"cancel": "キャンセル",
"createdAt": "作成日時",
"detail": "詳細",
@ -20,6 +21,9 @@
"paymentMethod": "支払い方法",
"paymentSuccess": "支払い成功",
"productList": "製品リスト",
"rechargeAmount": "チャージ金額",
"resetPrice": "価格のリセット",
"resetTraffic": "トラフィックのリセット",
"scanToPay": "スキャンしてお支払いください",
"status": {
"0": "状態",

View File

@ -1,4 +1,5 @@
{
"balanceRecharge": "잔액 충전",
"cancel": "취소",
"createdAt": "생성 시간",
"detail": "세부사항",
@ -20,6 +21,9 @@
"paymentMethod": "결제 수단",
"paymentSuccess": "결제 성공",
"productList": "제품 목록",
"rechargeAmount": "충전 금액",
"resetPrice": "가격 초기화",
"resetTraffic": "트래픽 초기화",
"scanToPay": "스캔하여 결제하세요",
"status": {
"0": "상태",

View File

@ -1,4 +1,5 @@
{
"balanceRecharge": "Balansopplading",
"cancel": "Avbryt",
"createdAt": "Opprettet",
"detail": "Detaljer",
@ -20,6 +21,9 @@
"paymentMethod": "Betalingsmetode",
"paymentSuccess": "Betaling vellykket",
"productList": "Produktliste",
"rechargeAmount": "Oppladingsbeløp",
"resetPrice": "Tilbakestill pris",
"resetTraffic": "Tilbakestill trafikk",
"scanToPay": "Vennligst skann for å betale",
"status": {
"0": "Status",

View File

@ -1,4 +1,5 @@
{
"balanceRecharge": "Doładowanie balansu",
"cancel": "Anuluj",
"createdAt": "Czas utworzenia",
"detail": "Szczegóły",
@ -20,6 +21,9 @@
"paymentMethod": "Metoda płatności",
"paymentSuccess": "Płatność zakończona sukcesem",
"productList": "Lista produktów",
"rechargeAmount": "Kwota doładowania",
"resetPrice": "Resetuj cenę",
"resetTraffic": "Resetuj ruch",
"scanToPay": "Zeskanuj kod, aby zapłacić",
"status": {
"0": "Status",

View File

@ -1,4 +1,5 @@
{
"balanceRecharge": "Recarga de Saldo",
"cancel": "Cancelar",
"createdAt": "Data de Criação",
"detail": "Detalhes",
@ -20,6 +21,9 @@
"paymentMethod": "Método de Pagamento",
"paymentSuccess": "Pagamento bem-sucedido",
"productList": "Lista de Produtos",
"rechargeAmount": "Valor da Recarga",
"resetPrice": "Redefinir Preço",
"resetTraffic": "Redefinir Tráfego",
"scanToPay": "Por favor, escaneie para pagar",
"status": {
"0": "status",

View File

@ -1,4 +1,5 @@
{
"balanceRecharge": "Reîncărcare Sold",
"cancel": "Anulare",
"createdAt": "Data creării",
"detail": "Detalii",
@ -20,6 +21,9 @@
"paymentMethod": "Metodă de plată",
"paymentSuccess": "Plata a fost efectuată cu succes",
"productList": "Listă de produse",
"rechargeAmount": "Sumă de Reîncărcare",
"resetPrice": "Resetare Preț",
"resetTraffic": "Resetare Trafic",
"scanToPay": "Vă rugăm să scanați pentru a plăti",
"status": {
"0": "stare",

View File

@ -1,4 +1,5 @@
{
"balanceRecharge": "Пополнение баланса",
"cancel": "Отмена",
"createdAt": "Время создания",
"detail": "Подробности",
@ -20,6 +21,9 @@
"paymentMethod": "Способ оплаты",
"paymentSuccess": "Оплата успешно завершена",
"productList": "Список продуктов",
"rechargeAmount": "Сумма пополнения",
"resetPrice": "Сброс цены",
"resetTraffic": "Сброс трафика",
"scanToPay": "Пожалуйста, отсканируйте для оплаты",
"status": {
"0": "Статус",

View File

@ -1,4 +1,5 @@
{
"balanceRecharge": "เติมเงินยอดคงเหลือ",
"cancel": "ยกเลิก",
"createdAt": "เวลาที่สร้าง",
"detail": "รายละเอียด",
@ -20,6 +21,9 @@
"paymentMethod": "วิธีการชำระเงิน",
"paymentSuccess": "ชำระเงินสำเร็จ",
"productList": "รายการสินค้า",
"rechargeAmount": "จำนวนเงินที่เติม",
"resetPrice": "รีเซ็ตราคา",
"resetTraffic": "รีเซ็ตการใช้งาน",
"scanToPay": "กรุณาสแกนเพื่อชำระเงิน",
"status": {
"0": "สถานะ",

View File

@ -1,4 +1,5 @@
{
"balanceRecharge": "Bakiye Yenileme",
"cancel": "İptal",
"createdAt": "Oluşturulma Zamanı",
"detail": "Detaylar",
@ -20,6 +21,9 @@
"paymentMethod": "Ödeme Yöntemi",
"paymentSuccess": "Ödeme Başarılı",
"productList": "Ürün Listesi",
"rechargeAmount": "Yenileme Tutarı",
"resetPrice": "Fiyatı Sıfırla",
"resetTraffic": "Trafiği Sıfırla",
"scanToPay": "Lütfen tarayıcı ile ödeme yapın",
"status": {
"0": "Durum",

View File

@ -1,4 +1,5 @@
{
"balanceRecharge": "Поповнення балансу",
"cancel": "Скасувати",
"createdAt": "Час створення",
"detail": "Деталі",
@ -20,6 +21,9 @@
"paymentMethod": "Спосіб оплати",
"paymentSuccess": "Оплата успішна",
"productList": "Список продуктів",
"rechargeAmount": "Сума поповнення",
"resetPrice": "Скинути ціну",
"resetTraffic": "Скинути трафік",
"scanToPay": "Будь ласка, відскануйте для оплати",
"status": {
"0": "Статус",

View File

@ -1,4 +1,5 @@
{
"balanceRecharge": "Nạp Tiền Vào Tài Khoản",
"cancel": "Hủy",
"createdAt": "Thời gian tạo",
"detail": "Chi tiết",
@ -20,6 +21,9 @@
"paymentMethod": "Phương Thức Thanh Toán",
"paymentSuccess": "Thanh toán thành công",
"productList": "Danh sách sản phẩm",
"rechargeAmount": "Số Tiền Nạp",
"resetPrice": "Đặt Lại Giá",
"resetTraffic": "Đặt Lại Lưu Lượng",
"scanToPay": "Vui lòng quét mã để thanh toán",
"status": {
"0": "Trạng thái",

View File

@ -1,4 +1,5 @@
{
"balanceRecharge": "余额充值",
"cancel": "取消",
"createdAt": "创建时间",
"detail": "详情",
@ -20,6 +21,9 @@
"paymentMethod": "支付方式",
"paymentSuccess": "支付成功",
"productList": "产品列表",
"rechargeAmount": "充值金额",
"resetPrice": "重置价格",
"resetTraffic": "重置流量",
"scanToPay": "请扫码支付",
"status": {
"0": "状态",

View File

@ -1,4 +1,5 @@
{
"balanceRecharge": "餘額充值",
"cancel": "取消",
"createdAt": "建立時間",
"detail": "詳情",
@ -20,6 +21,9 @@
"paymentMethod": "付款方式",
"paymentSuccess": "付款成功",
"productList": "產品列表",
"rechargeAmount": "充值金額",
"resetPrice": "重置價格",
"resetTraffic": "重置流量",
"scanToPay": "請掃碼支付",
"status": {
"0": "狀態",

View File

@ -1,5 +1,5 @@
// @ts-ignore
// API 更新时间:
// API 唯一标识:
import * as auth from './auth';

View File

@ -13,8 +13,8 @@ async function getVersion() {
async function getVersionPath() {
return getVersion()
.then(version => `${BASE_URL}@${version}`)
.catch(error => {
.then((version) => `${BASE_URL}@${version}`)
.catch((error) => {
console.warn('Error fetching the version:', error);
return BASE_URL;
});
@ -51,7 +51,7 @@ type TutorialItem = {
};
const processIcon = (item: TutorialItem) => {
if ("icon" in item && typeof item.icon === 'string' && !item.icon.startsWith('http')) {
if ('icon' in item && typeof item.icon === 'string' && !item.icon.startsWith('http')) {
item.icon = `${BASE_URL}/${item.icon}`;
}
};
@ -66,7 +66,7 @@ export async function getTutorialList() {
Object.values(navigation)
.flat()
.forEach(item => {
.forEach((item) => {
item.subItems?.forEach(processIcon);
});