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