mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2024-11-22 07:10:09 +01:00
Added some new translation
This commit is contained in:
parent
8534e8cf5b
commit
c269e46892
@ -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,
|
||||
|
@ -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")
|
||||
}
|
||||
|
@ -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": "端点数据重置成功"
|
||||
}
|
Loading…
Reference in New Issue
Block a user