From 7c2471d6cf3bdacb958fb4e56019cfa813d54e99 Mon Sep 17 00:00:00 2001 From: Mohammad Foroughi Date: Sun, 30 Oct 2022 14:42:58 +0330 Subject: [PATCH] update: translate dialogs --- web/html/xui/inbounds.html | 28 ++++++++++++++------------ web/translation/translate.en_US.toml | 8 ++++++++ web/translation/translate.zh_Hans.toml | 15 +++++++++++--- 3 files changed, 35 insertions(+), 16 deletions(-) diff --git a/web/html/xui/inbounds.html b/web/html/xui/inbounds.html index cd9bd595..2836770b 100644 --- a/web/html/xui/inbounds.html +++ b/web/html/xui/inbounds.html @@ -236,8 +236,9 @@ }, openAddInbound() { inModal.show({ - title: '添加入站', - okText: '添加', + title: '{{ i18n "pages.inbounds.addInbound"}}', + okText: '{{ i18n "pages.inbounds.addTo"}}', + cancelText: '{{ i18n "close" }}', confirm: async (inbound, dbInbound) => { inModal.loading(); await this.addInbound(inbound, dbInbound); @@ -248,8 +249,9 @@ openEditInbound(dbInbound) { const inbound = dbInbound.toInbound(); inModal.show({ - title: '修改入站', - okText: '修改', + title: '{{ i18n "pages.inbounds.modifyInbound"}}', + okText: '{{ i18n "pages.inbounds.revise"}}', + cancelText: '{{ i18n "close" }}', inbound: inbound, dbInbound: dbInbound, confirm: async (inbound, dbInbound) => { @@ -297,10 +299,10 @@ }, resetTraffic(dbInbound) { this.$confirm({ - title: '重置流量', - content: '确定要重置流量吗?', - okText: '重置', - cancelText: '取消', + title: '{{ i18n "pages.inbounds.resetTraffic"}}', + content: '{{ i18n "pages.inbounds.resetTrafficContent"}}', + okText: '{{ i18n "reset"}}', + cancelText: '{{ i18n "cancel"}}', onOk: () => { const inbound = dbInbound.toInbound(); dbInbound.up = 0; @@ -311,16 +313,16 @@ }, delInbound(dbInbound) { this.$confirm({ - title: '删除入站', - content: '确定要删除入站吗?', - okText: '删除', - cancelText: '取消', + title: '{{ i18n "pages.inbounds.deleteInbound"}}', + content: '{{ i18n "pages.inbounds.deleteInboundContent"}}', + okText: '{{ i18n "delete"}}', + cancelText: '{{ i18n "cancel"}}', onOk: () => this.submit('/xui/inbound/del/' + dbInbound.id), }); }, showQrcode(dbInbound) { const link = dbInbound.genLink(); - qrModal.show('二维码', link); + qrModal.show('{{ i18n "qrCode"}}', link); }, showInfo(dbInbound) { infoModal.show(dbInbound); diff --git a/web/translation/translate.en_US.toml b/web/translation/translate.en_US.toml index db265d20..5b83a405 100644 --- a/web/translation/translate.en_US.toml +++ b/web/translation/translate.en_US.toml @@ -23,6 +23,7 @@ "qrCode" = "QR Code" "edit" = "edit" "delete" = "delete" +"reset" = "reset" [menu] "dashboard" = "System Status" @@ -79,6 +80,13 @@ "transportConfig" = "transport config" "expireDate" = "expire date" "resetTraffic" = "reset traffic" +"addInbound" = "addInbound" +"addTo" = "Add To" +"revise" = "Revise" +"modifyInbound" = "Modify InBound" +"deleteInbound" = "Delete Inbound" +"deleteInboundContent" = "Are you sure you want to delete inbound?" +"resetTrafficContent" = "Are you sure you want to reset traffic?" [pages.setting] "title" = "Setting" diff --git a/web/translation/translate.zh_Hans.toml b/web/translation/translate.zh_Hans.toml index 771f3ed8..d39c2b41 100644 --- a/web/translation/translate.zh_Hans.toml +++ b/web/translation/translate.zh_Hans.toml @@ -20,6 +20,10 @@ "indefinitely" = "无限期" "unlimited" = "无限制" "none" = "无" +"qrCode" = "二维码" +"edit" = "编辑" +"delete" = "删除" +"reset" = "重置" [menu] "dashboard" = "系统状态" @@ -75,9 +79,14 @@ "transportConfig" = "传输配置" "expireDate" = "到期时间" "resetTraffic" = "重置流量" -"qrCode" = "二维码" -"edit" = "编辑" -"delete" = "删除" +"addInbound" = "添加入" +"addTo" = "添加" +"revise" = "修改" +"modifyInbound" = "修改入站" +"deleteInbound" = "删除入站" +"deleteInboundContent" = "确定要删除入站吗?" +"resetTrafficContent" = "确定要重置流量吗?" +