From 9289ce691b9ad9127622fffe36fc28bd3a28a942 Mon Sep 17 00:00:00 2001 From: Mohammad Foroughi Date: Sun, 30 Oct 2022 07:20:40 +0330 Subject: [PATCH] update: translate dashboard --- web/assets/js/util/common.js | 8 ++--- web/html/xui/index.html | 48 +++++++++++++------------- web/translation/translate.en_US.toml | 25 ++++++++++++++ web/translation/translate.zh_Hans.toml | 25 ++++++++++++++ 4 files changed, 78 insertions(+), 28 deletions(-) diff --git a/web/assets/js/util/common.js b/web/assets/js/util/common.js index 39c964d1..7225e4ba 100644 --- a/web/assets/js/util/common.js +++ b/web/assets/js/util/common.js @@ -33,13 +33,13 @@ function safeBase64(str) { function formatSecond(second) { if (second < 60) { - return second.toFixed(0) + ' 秒'; + return second.toFixed(0) + ' s'; } else if (second < 3600) { - return (second / 60).toFixed(0) + ' 分钟'; + return (second / 60).toFixed(0) + ' m'; } else if (second < 3600 * 24) { - return (second / 3600).toFixed(0) + ' 小时'; + return (second / 3600).toFixed(0) + ' h'; } else { - return (second / 3600 / 24).toFixed(0) + ' 天'; + return (second / 3600 / 24).toFixed(0) + ' d'; } } diff --git a/web/html/xui/index.html b/web/html/xui/index.html index 05d849d4..c2a2a253 100644 --- a/web/html/xui/index.html +++ b/web/html/xui/index.html @@ -35,7 +35,7 @@ :stroke-color="status.mem.color" :percent="status.mem.percent">
- 内存: [[ sizeFormat(status.mem.current) ]] / [[ sizeFormat(status.mem.total) ]] + {{ i18n "pages.index.memory"}}: [[ sizeFormat(status.mem.current) ]] / [[ sizeFormat(status.mem.total) ]]
@@ -55,7 +55,7 @@ :stroke-color="status.disk.color" :percent="status.disk.percent">
- 硬盘: [[ sizeFormat(status.disk.current) ]] / [[ sizeFormat(status.disk.total) ]] + {{ i18n "pages.index.hard"}}: [[ sizeFormat(status.disk.current) ]] / [[ sizeFormat(status.disk.total) ]]
@@ -68,7 +68,7 @@ - xray 状态: + {{ i18n "pages.index.xrayStatus" }}: [[ status.xray.state ]]