♻️ refactor: Add localization updates for log and server files across multiple languages
- Added new keys for "server", "subscribe", "detail", "pending", "sending", "sent", and "unknown" in log.json files for various languages. - Introduced a "type" object with transaction types (Recharge, Withdraw, Purchase, Refund, Reward, Commission) in log.json files for multiple languages. - Updated "traffic_ratio" to "Ratio" and added "transport" in servers.json for English localization. - Ensured consistency and accuracy in translations for all affected languages including German, English, Spanish, French, Russian, Chinese, and more.
This commit is contained in:
@@ -9,9 +9,12 @@ import { useSearchParams } from 'next/navigation';
|
||||
export default function MobileLogPage() {
|
||||
const t = useTranslations('log');
|
||||
const sp = useSearchParams();
|
||||
|
||||
const today = new Date().toISOString().split('T')[0];
|
||||
|
||||
const initialFilters = {
|
||||
search: sp.get('search') || undefined,
|
||||
date: sp.get('date') || undefined,
|
||||
date: sp.get('date') || today,
|
||||
};
|
||||
return (
|
||||
<ProTable<API.MessageLog, { search?: string }>
|
||||
@@ -19,11 +22,10 @@ export default function MobileLogPage() {
|
||||
initialFilters={initialFilters}
|
||||
columns={[
|
||||
{
|
||||
accessorKey: 'id',
|
||||
header: t('column.id'),
|
||||
cell: ({ row }) => <Badge>{row.getValue('id')}</Badge>,
|
||||
accessorKey: 'platform',
|
||||
header: t('column.platform'),
|
||||
cell: ({ row }) => <Badge>{row.getValue('platform')}</Badge>,
|
||||
},
|
||||
{ accessorKey: 'platform', header: t('column.platform') },
|
||||
{ accessorKey: 'to', header: t('column.to') },
|
||||
{ accessorKey: 'subject', header: t('column.subject') },
|
||||
{
|
||||
@@ -35,7 +37,29 @@ export default function MobileLogPage() {
|
||||
</pre>
|
||||
),
|
||||
},
|
||||
{ accessorKey: 'status', header: t('column.status') },
|
||||
{
|
||||
accessorKey: 'status',
|
||||
header: t('column.status'),
|
||||
cell: ({ row }) => {
|
||||
const status = row.original.status;
|
||||
const getStatusVariant = (status: any) => {
|
||||
if (status === 1) {
|
||||
return 'default';
|
||||
} else if (status === 0) {
|
||||
return 'destructive';
|
||||
}
|
||||
return 'outline';
|
||||
};
|
||||
|
||||
const getStatusText = (status: any) => {
|
||||
if (status === 1) return t('sent');
|
||||
if (status === 0) return t('failed');
|
||||
return t('unknown');
|
||||
};
|
||||
|
||||
return <Badge variant={getStatusVariant(status)}>{getStatusText(status)}</Badge>;
|
||||
},
|
||||
},
|
||||
{
|
||||
accessorKey: 'created_at',
|
||||
header: t('column.time'),
|
||||
|
||||
Reference in New Issue
Block a user