diff --git a/client/src/types/vue-i18n.d.ts b/client/src/types/vue-i18n.d.ts
deleted file mode 100644
index a7f184a..0000000
--- a/client/src/types/vue-i18n.d.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
- * you need to import the some interfaces
- */
-import { DefineLocaleMessage, DefineDateTimeFormat, DefineNumberFormat } from 'vue-i18n';
-import type en from '@/locales/en';
-
-type LocaleMessage = typeof en;
-
-declare module 'vue-i18n' {
- // define the locale messages schema
- export interface DefineLocaleMessage extends LocaleMessage {}
-
- // define the datetime format schema
- export interface DefineDateTimeFormat {}
-
- // define the number format schema
- export interface DefineNumberFormat {}
-}
diff --git a/client/src/views/Home.vue b/client/src/views/Home.vue
index 3165fd9..a7a569f 100644
--- a/client/src/views/Home.vue
+++ b/client/src/views/Home.vue
@@ -7,6 +7,7 @@ import { useGameStore } from '@/stores/game.js';
import { useRoomStore } from '@/stores/room.js';
import { useRoute } from 'vue-router';
import socket from '@/socket/socket';
+import { useI18n } from 'vue-i18n';
const click = new AudioWrap(ClickMp3);
const route = useRoute();
@@ -32,6 +33,8 @@ function onSubmit(joinGame: boolean) {
roomStore.setName(form.name);
socket.emit(event, form.name, form.roomName, navigator.languages);
}
+
+const { t } = useI18n();
@@ -47,7 +50,7 @@ function onSubmit(joinGame: boolean) {
v-model="form.name"
type="text"
class="form-control"
- :placeholder="$t('usernamePlaceholder')" />
+ :placeholder="t('usernamePlaceholder')" />
@@ -57,7 +60,7 @@ function onSubmit(joinGame: boolean) {
v-model="form.roomName"
type="text"
class="form-control"
- :placeholder="$t('roomNamePlaceholder')" />
+ :placeholder="t('roomNamePlaceholder')" />
@@ -70,9 +73,9 @@ function onSubmit(joinGame: boolean) {