diff --git a/client/src/components/chat.vue b/client/src/components/chat.vue
index 0b4e8eb..619909a 100644
--- a/client/src/components/chat.vue
+++ b/client/src/components/chat.vue
@@ -35,7 +35,7 @@
-
+
diff --git a/client/src/components/context.vue b/client/src/components/context.vue
index af4a447..34e8230 100644
--- a/client/src/components/context.vue
+++ b/client/src/components/context.vue
@@ -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 }) as string,
+ text: this.$t('context.confirm.kick_text', { name: member.displayname }) as string,
icon: 'warning',
showCancelButton: true,
- confirmButtonText: 'Yes',
+ confirmButtonText: this.$t('context.confirm.button_yes') as string,
+ cancelButtonText: this.$t('context.confirm.button_cancel') as string,
}).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 }) as string,
+ text: this.$t('context.confirm.ban_text', { name: member.displayname }) as string,
icon: 'warning',
showCancelButton: true,
- confirmButtonText: 'Yes',
+ confirmButtonText: this.$t('context.confirm.button_yes') as string,
+ cancelButtonText: this.$t('context.confirm.button_cancel') as string,
}).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 }) as string,
+ text: this.$t('context.confirm.mute_text', { name: member.displayname }) as string,
icon: 'warning',
showCancelButton: true,
- confirmButtonText: 'Yes',
+ confirmButtonText: this.$t('context.confirm.button_yes') as string,
+ cancelButtonText: this.$t('context.confirm.button_cancel') as string,
}).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 }) as string,
+ text: this.$t('context.confirm.unmute_text', { name: member.displayname }) as string,
icon: 'warning',
showCancelButton: true,
- confirmButtonText: 'Yes',
+ confirmButtonText: this.$t('context.confirm.button_yes') as string,
+ cancelButtonText: this.$t('context.confirm.button_cancel') as string,
}).then(({ value }) => {
if (value) {
this.$accessor.user.unmute(member)
diff --git a/client/src/components/side.vue b/client/src/components/side.vue
index 033ac07..db1ff81 100644
--- a/client/src/components/side.vue
+++ b/client/src/components/side.vue
@@ -4,11 +4,11 @@
-
- {{ $t('chat') }}
+ {{ $t('side.chat') }}
-
- {{ $t('settings') }}
+ {{ $t('side.settings') }}
diff --git a/client/src/locale/en-us.ts b/client/src/locale/en-us.ts
index 8fd05a6..1dfe645 100644
--- a/client/src/locale/en-us.ts
+++ b/client/src/locale/en-us.ts
@@ -1,12 +1,13 @@
-export const chat = 'Chat'
-export const settings = 'Settings'
export const logout = 'logout'
export const unsupported = 'this browser does not support webrtc'
export const admin_loggedin = 'You are logged in as an admin'
export const you = 'You'
-export const ok = 'ok'
-export const connected = 'connected'
-export const disconnected = 'disconnected'
+export const send_a_message = 'Send a message'
+
+export const side = {
+ chat: 'Chat',
+ settings: 'Settings',
+}
export const connect = {
title: 'Please Login',
@@ -25,6 +26,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 = {
@@ -50,11 +63,15 @@ export const setting = {
}
export const connection = {
- success: 'Successfully connected',
+ logged_out: 'You have been logged out!',
+ connected: 'Successfully connected',
+ disconnected: 'You have been disconnected',
+ button_confirm: 'Ok',
}
export const notifications = {
- logged_out: '{name} logged out!',
+ connected: '{name} connected',
+ disconnected: '{name} disconnected',
controls_taken: '{name} took the controls',
controls_taken_force: 'force took the controls',
controls_taken_steal: 'took the controls from {name}',
diff --git a/client/src/neko/index.ts b/client/src/neko/index.ts
index 571ab1c..880e793 100644
--- a/client/src/neko/index.ts
+++ b/client/src/neko/index.ts
@@ -54,9 +54,9 @@ export class NekoClient extends BaseClient implements EventEmitter