@@ -5,8 +5,10 @@ import { useProfilesComposable } from '../composables/ProfilesComposable';
55import { computed , nextTick , ref , watchEffect } from ' vue' ;
66import { getStore } from ' ../../providers/generic/store/StoreProvider' ;
77import { State } from ' ../../store' ;
8+ import {useI18n } from " vue-i18n" ;
89
910const store = getStore <State >();
11+ const { t } = useI18n ();
1012
1113const {
1214 doesProfileExist,
@@ -60,10 +62,14 @@ async function performRename() {
6062 <ModalCard id =" rename-profile-modal" v-if =" isOpen" :is-active =" isOpen" @close-modal =" closeModal" >
6163
6264 <template v-slot :header >
63- <h2 class =" modal-title" >Rename a profile</h2 >
65+ <h2 class =" modal-title" >
66+ {{ t('translations.pages.profileSelection.renameProfileModal.title') }}
67+ </h2 >
6468 </template >
6569 <template v-slot :body >
66- <p >This profile will store its own mods independently from other profiles.</p >
70+ <p >
71+ {{ t('translations.pages.profileSelection.renameProfileModal.content') }}
72+ </p >
6773
6874 <input
6975 v-model =" newProfileName"
@@ -75,18 +81,22 @@ async function performRename() {
7581 />
7682
7783 <span class =" tag is-dark" v-if =" newProfileName === '' || makeProfileNameSafe(newProfileName) === ''" >
78- Profile name required
84+ {{ t('translations.pages.profileSelection.renameProfileModal.tagStates. required') }}
7985 </span >
8086 <span class =" tag is-success" v-else-if =" !doesProfileExist(newProfileName)" >
81- "{{ makeProfileNameSafe(newProfileName)}}" is available
87+ {{ t('translations.pages.profileSelection.renameProfileModal.tagStates.valid', { profileName: makeProfileNameSafe(newProfileName) }) }}
8288 </span >
8389 <span class =" tag is-danger" v-else-if =" doesProfileExist(newProfileName)" >
84- "{{makeProfileNameSafe(newProfileName)}}" is either already in use, or contains invalid characters
90+ {{ t('translations.pages.profileSelection.renameProfileModal.tagStates.error', { profileName: makeProfileNameSafe(newProfileName) }) }}
8591 </span >
8692 </template >
8793 <template v-slot :footer >
88- <button class =" button is-danger" v-if =" doesProfileExist(newProfileName)" disabled >Rename</button >
89- <button class =" button is-info" @click =" performRename()" :disabled =" renamingInProgress" v-else >Rename</button >
94+ <button class =" button is-danger" v-if =" doesProfileExist(newProfileName)" disabled >
95+ {{ t('translations.pages.profileSelection.renameProfileModal.actions.rename') }}
96+ </button >
97+ <button class =" button is-info" @click =" performRename()" :disabled =" renamingInProgress" v-else >
98+ {{ t('translations.pages.profileSelection.renameProfileModal.actions.rename') }}
99+ </button >
90100 </template >
91101
92102 </ModalCard >
0 commit comments