context added translations for modals
This commit is contained in:
parent
e53a42a231
commit
96ea219340
@ -165,11 +165,12 @@
|
||||
|
||||
kick(member: Member) {
|
||||
this.$swal({
|
||||
title: `Kick ${member.displayname}?`,
|
||||
text: `Are you sure you want to kick ${member.displayname}?`,
|
||||
title: this.$t('context.confirm.kick_title', { name: member.displayname }),
|
||||
text: this.$t('context.confirm.kick_text', { name: member.displayname }),
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonText: 'Yes',
|
||||
confirmButtonText: this.$t('context.confirm.button_yes'),
|
||||
cancelButtonText: this.$t('context.confirm.button_cancel'),
|
||||
}).then(({ value }) => {
|
||||
if (value) {
|
||||
this.$accessor.user.kick(member)
|
||||
@ -179,11 +180,12 @@
|
||||
|
||||
ban(member: Member) {
|
||||
this.$swal({
|
||||
title: `Ban ${member.displayname}?`,
|
||||
text: `Are you sure you want to ban ${member.displayname}? You will need to restart the server to undo this.`,
|
||||
title: this.$t('context.confirm.ban_title', { name: member.displayname }),
|
||||
text: this.$t('context.confirm.ban_text', { name: member.displayname }),
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonText: 'Yes',
|
||||
confirmButtonText: this.$t('context.confirm.button_yes'),
|
||||
cancelButtonText: this.$t('context.confirm.button_cancel'),
|
||||
}).then(({ value }) => {
|
||||
if (value) {
|
||||
this.$accessor.user.ban(member)
|
||||
@ -193,11 +195,12 @@
|
||||
|
||||
mute(member: Member) {
|
||||
this.$swal({
|
||||
title: `Mute ${member.displayname}?`,
|
||||
text: `Are you sure you want to mute ${member.displayname}?`,
|
||||
title: this.$t('context.confirm.mute_title', { name: member.displayname }),
|
||||
text: this.$t('context.confirm.mute_text', { name: member.displayname }),
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonText: 'Yes',
|
||||
confirmButtonText: this.$t('context.confirm.button_yes'),
|
||||
cancelButtonText: this.$t('context.confirm.button_cancel'),
|
||||
}).then(({ value }) => {
|
||||
if (value) {
|
||||
this.$accessor.user.mute(member)
|
||||
@ -207,11 +210,12 @@
|
||||
|
||||
unmute(member: Member) {
|
||||
this.$swal({
|
||||
title: `Unmute ${member.displayname}?`,
|
||||
text: `Are you sure you want to unmute ${member.displayname}?`,
|
||||
title: this.$t('context.confirm.unmute_title', { name: member.displayname }),
|
||||
text: this.$t('context.confirm.unmute_text', { name: member.displayname }),
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonText: 'Yes',
|
||||
confirmButtonText: this.$t('context.confirm.button_yes'),
|
||||
cancelButtonText: this.$t('context.confirm.button_cancel'),
|
||||
}).then(({ value }) => {
|
||||
if (value) {
|
||||
this.$accessor.user.unmute(member)
|
||||
|
@ -25,6 +25,18 @@ export const context = {
|
||||
give: 'Give Controls',
|
||||
kick: 'Kick',
|
||||
ban: 'Ban IP',
|
||||
confirm: {
|
||||
kick_title: 'Kick {name}?',
|
||||
kick_text: 'Are you sure you want to kick {name}?',
|
||||
ban_title: 'Ban {name}?',
|
||||
ban_text: 'Are you sure you want to ban {name}? You will need to restart the server to undo this.',
|
||||
mute_title: 'Mute {name}?',
|
||||
mute_text: 'Are you sure you want to mute {name}?',
|
||||
unmute_title: 'Unmute {name}?',
|
||||
unmute_text: 'Are you sure you want to unmute {name}?',
|
||||
button_yes: 'Yes',
|
||||
button_cancel: 'Cancel',
|
||||
}
|
||||
}
|
||||
|
||||
export const controls = {
|
||||
|
Reference in New Issue
Block a user