diff --git a/src/dashboard.py b/src/dashboard.py index 16ff44d..4f9e43f 100644 --- a/src/dashboard.py +++ b/src/dashboard.py @@ -991,18 +991,18 @@ class Peer: os.remove(str(uid)) if len(updatePsk.decode().strip("\n")) != 0: return ResponseObject(False, - "Update peer failed when updating preshared key") + "Update peer failed when updating Pre-Shared Key") updateAllowedIp = subprocess.check_output( f'wg set {self.configuration.Name} peer {self.id} allowed-ips "{allowed_ip.replace(" ", "")}"', shell=True, stderr=subprocess.STDOUT) if len(updateAllowedIp.decode().strip("\n")) != 0: return ResponseObject(False, - "Update peer failed when updating allowed IPs") + "Update peer failed when updating Allowed IPs") saveConfig = subprocess.check_output(f"wg-quick save {self.configuration.Name}", shell=True, stderr=subprocess.STDOUT) if f"wg showconf {self.configuration.Name}" not in saveConfig.decode().strip('\n'): return ResponseObject(False, - "Update peer failed when saving the configuration.") + "Update peer failed when saving the configuration") sqlUpdate( '''UPDATE '%s' SET name = ?, private_key = ?, DNS = ?, endpoint_allowed_ip = ?, mtu = ?, keepalive = ?, preshared_key = ? WHERE id = ?''' % self.configuration.Name, diff --git a/src/static/app/src/components/configurationComponents/peerSettings.vue b/src/static/app/src/components/configurationComponents/peerSettings.vue index d45a30b..951baba 100644 --- a/src/static/app/src/components/configurationComponents/peerSettings.vue +++ b/src/static/app/src/components/configurationComponents/peerSettings.vue @@ -48,7 +48,7 @@ export default { }, (res) => { this.saving = false; if (res.status){ - this.dashboardConfigurationStore.newMessage("Server", "Peer data usage reset successfully.", "success") + this.dashboardConfigurationStore.newMessage("Server", "Peer data usage reset successfully", "success") }else{ this.dashboardConfigurationStore.newMessage("Server", res.message, "danger") } diff --git a/src/static/locale/zh-CN.json b/src/static/locale/zh-CN.json index d24fd43..469ad35 100644 --- a/src/static/locale/zh-CN.json +++ b/src/static/locale/zh-CN.json @@ -189,6 +189,14 @@ "Configuration does not exist": "此配置不存在", "Please provide a valid configuration name": "请提供一个正确的配置名称", "Peer saved": "端点保存成功", - "Allowed IP already taken by another peer": "允许的 IP 地址已被其他端点使用", - "Endpoint Allowed IPs format is incorrect": "" + "Allowed IPs already taken by another peer": "允许的 IP 地址已被其他端点使用", + "Endpoint Allowed IPs format is incorrect": "终结点允许的 IP 地址格式不正确", + "DNS format is incorrect": "域名系统(DNS)格式不正确", + "MTU format is not correct": "最大传输单元格式不正确", + "Persistent Keepalive format is not correct": "持久保持活动格式不正确", + "Private key does not match with the public key": "秘钥与公钥不匹配", + "Update peer failed when updating Pre-Shared Key": "更新共享密钥失败", + "Update peer failed when updating Allowed IPs": "更新允许的 IP 地址失败", + "Update peer failed when saving the configuration": "配置保存端点失败", + "Peer data usage reset successfully": "端点数据重置成功" } \ No newline at end of file