1
1
mirror of https://github.com/Fabio286/antares.git synced 2025-06-05 21:59:22 +02:00

refactor: improved vue-i18n implementation

This commit is contained in:
2022-08-05 17:03:16 +02:00
parent e2307341f3
commit a9fcfd57ec
32 changed files with 254 additions and 186 deletions

View File

@ -7,7 +7,7 @@
<div class="modal-title h6">
<div class="d-flex">
<i class="mdi mdi-24px mdi-database-plus mr-1" />
<span class="cut-text">{{ $t('message.createNewSchema') }}</span>
<span class="cut-text">{{ t('message.createNewSchema') }}</span>
</div>
</div>
<a class="btn btn-clear c-hand" @click.stop="closeModal" />
@ -17,7 +17,7 @@
<form class="form-horizontal" @submit.prevent="createSchema">
<div class="form-group">
<div class="col-3">
<label class="form-label">{{ $t('word.name') }}</label>
<label class="form-label">{{ t('word.name') }}</label>
</div>
<div class="col-9">
<input
@ -26,13 +26,13 @@
class="form-input"
type="text"
required
:placeholder="$t('message.schemaName')"
:placeholder="t('message.schemaName')"
>
</div>
</div>
<div v-if="customizations.collations" class="form-group">
<div class="col-3">
<label class="form-label">{{ $t('word.collation') }}</label>
<label class="form-label">{{ t('word.collation') }}</label>
</div>
<div class="col-9">
<BaseSelect
@ -42,7 +42,7 @@
option-label="collation"
option-track-by="collation"
/>
<small>{{ $t('message.serverDefault') }}: {{ defaultCollation }}</small>
<small>{{ t('message.serverDefault') }}: {{ defaultCollation }}</small>
</div>
</div>
</form>
@ -54,10 +54,10 @@
:class="{'loading': isLoading}"
@click.stop="createSchema"
>
{{ $t('word.add') }}
{{ t('word.add') }}
</button>
<button class="btn btn-link" @click.stop="closeModal">
{{ $t('word.close') }}
{{ t('word.close') }}
</button>
</div>
</div>
@ -73,6 +73,9 @@ import { useWorkspacesStore } from '@/stores/workspaces';
import { useFocusTrap } from '@/composables/useFocusTrap';
import Schema from '@/ipc-api/Schema';
import BaseSelect from '@/components/BaseSelect.vue';
import { useI18n } from 'vue-i18n';
const { t } = useI18n();
const { addNotification } = useNotificationsStore();
const workspacesStore = useWorkspacesStore();