From 965ec502aceeb206c0067e36a61f755a31002bc4 Mon Sep 17 00:00:00 2001 From: kunish Date: Fri, 8 Sep 2023 21:22:34 +0800 Subject: [PATCH] feat(logs): add i18n translation support Signed-off-by: kunish --- src/i18n/en.ts | 2 ++ src/i18n/zh.ts | 2 ++ src/pages/Logs.tsx | 3 +++ 3 files changed, 7 insertions(+) diff --git a/src/i18n/en.ts b/src/i18n/en.ts index 64e17be..6400d92 100644 --- a/src/i18n/en.ts +++ b/src/i18n/en.ts @@ -72,4 +72,6 @@ export default { latencyTestTimeoutDuration: 'Latency Test Timeout Duration', closedConnections: 'Closed Connections', all: 'All', + sequence: 'Sequence', + payload: 'Payload', } diff --git a/src/i18n/zh.ts b/src/i18n/zh.ts index 5348546..77df36f 100644 --- a/src/i18n/zh.ts +++ b/src/i18n/zh.ts @@ -71,4 +71,6 @@ export default { latencyTestTimeoutDuration: '测速超时时间', closedConnections: '已关闭连接', all: '全部', + sequence: '序列号', + payload: '内容', } diff --git a/src/pages/Logs.tsx b/src/pages/Logs.tsx index da8493f..c5911cb 100644 --- a/src/pages/Logs.tsx +++ b/src/pages/Logs.tsx @@ -35,14 +35,17 @@ export default () => { const columns: ColumnDef[] = [ { accessorKey: 'Sequence', + header: t('sequence'), accessorFn: (row) => row.seq, }, { accessorKey: 'Type', + header: t('type'), accessorFn: (row) => row.type, }, { accessorKey: 'Payload', + header: t('payload'), accessorFn: (row) => row.payload, }, ]