Translating to zh-cn is done

This commit is contained in:
Donald Zou
2024-09-22 21:50:30 +08:00
parent c269e46892
commit 21672f99d1
11 changed files with 44 additions and 25 deletions

View File

@@ -29,7 +29,7 @@ export default {
for(let ip in i){
if (!this.store.regexCheckIP(i[ip])){
if (!this.error){
this.dashboardStore.newMessage("WGDashboard", "DNS is invalid", "danger");
this.dashboardStore.newMessage("WGDashboard", "DNS format is incorrect", "danger");
}
this.error = true;
this.data.DNS = "";

View File

@@ -27,7 +27,7 @@ export default {
for (let ip in i){
if (!this.store.checkCIDR(i[ip])){
if (!this.error){
this.dashboardStore.newMessage("WGDashboard", "Endpoint Allowed IP is invalid.", "danger")
this.dashboardStore.newMessage("WGDashboard", "Endpoint Allowed IPs format is incorrect", "danger")
}
this.data.endpoint_allowed_ip = "";
this.error = true;

View File

@@ -44,7 +44,7 @@ export default {
if (window.wireguard.generatePublicKey(this.keypair.privateKey)
!== this.keypair.publicKey){
this.error = true;
this.dashboardStore.newMessage("WGDashboard", "Private Key and Public Key does not match.", "danger");
this.dashboardStore.newMessage("WGDashboard", "Private key does not match with the public key", "danger");
}else{
this.data.private_key = this.keypair.privateKey
this.data.public_key = this.keypair.publicKey

View File

@@ -51,7 +51,7 @@ export default {
}, (res) => {
if (res.status){
this.edit = false;
this.store.newMessage("Server", "Job Saved!", "success")
this.store.newMessage("Server", "Peer job saved", "success")
console.log(res.data)
this.$emit("refresh", res.data[0])
this.newJob = false;
@@ -91,7 +91,7 @@ export default {
this.store.newMessage("Server", res.message, "danger")
this.$emit('delete')
}else{
this.store.newMessage("Server", "Job Deleted!", "success")
this.store.newMessage("Server", "Peer job deleted", "success")
}
})

View File

@@ -31,7 +31,7 @@ export default {
}, (res) => {
if (res.status){
this.dashboardConfigurationStore.newMessage("Server",
`${this.c.Name} is ${res.data ? 'is on':'is off'}`)
`${this.c.Name} ${res.data ? 'is on':'is off'}`)
}else{
this.dashboardConfigurationStore.newMessage("Server",
res.message, 'danger')

View File

@@ -34,7 +34,7 @@ export default {
}else{
this.value = this.store.Configuration.Peers[this.targetData];
this.store.newMessage("Server",
`API Keys function is failed ${this.value ? 'enabled':'disabled'}`, "danger")
`API Keys function is failed to ${this.value ? 'enabled':'disabled'}`, "danger")
}
})
},

View File

@@ -31,7 +31,7 @@ export default {
fetchPost('/api/newDashboardAPIKey', this.newKeyData, (res) => {
if (res.status){
this.$emit('created', res.data);
this.store.newMessage("Server", "New API Key created", "success");
this.store.newMessage("Server", "API Key created", "success");
this.$emit('close')
}else{
this.store.newMessage("Server", res.message, "danger")

View File

@@ -149,7 +149,7 @@ router.beforeEach(async (to, from, next) => {
}else{
dashboardConfigurationStore.Redirect = to;
next("/signin")
dashboardConfigurationStore.newMessage("WGDashboard", "Session Ended", "warning")
dashboardConfigurationStore.newMessage("WGDashboard", "Sign in session ended, please sign in again", "warning")
}
}else{
await dashboardConfigurationStore.getConfiguration()

View File

@@ -37,7 +37,7 @@ export const fetchGet = async (url, params=undefined, callback=undefined) => {
if (x.status !== 200){
if (x.status === 401){
store.newMessage("WGDashboard", "Session Ended", "warning")
store.newMessage("WGDashboard", "Sign in session ended, please sign in again", "warning")
}
throw new Error(x.statusText)
}
@@ -61,7 +61,7 @@ export const fetchPost = async (url, body, callback) => {
if (x.status !== 200){
if (x.status === 401){
store.newMessage("WGDashboard", "Session Ended", "warning")
store.newMessage("WGDashboard", "Sign in session ended, please sign in again", "warning")
}
throw new Error(x.statusText)
}