vue_activity Location i18n translations

This commit is contained in:
Mathieu Jaumotte 2021-10-15 12:44:44 +02:00
parent ada9efc75d
commit 3e4cb41f7a
3 changed files with 37 additions and 22 deletions

View File

@ -2,7 +2,7 @@
<teleport to="#location">
<div class="mb-3 row">
<label class="col-form-label col-sm-4">
Localisation
{{ $t('activity.location') }}
</label>
<div class="col-sm-8">
@ -13,14 +13,13 @@
:multiple="false"
:searchable="true"
open-direction="top"
placeholder="Choisissez une localisation"
:placeholder="$t('activity.choose_location')"
label="name"
:custom-label="customLabel"
v-model="location"
:options="locations">
</VueMultiselect>
<!--
-->
<new-location @saveNewLocation="saveNewLocation"></new-location>
</div>
</div>

View File

@ -3,7 +3,7 @@
<ul class="record_actions">
<li>
<a class="btn btn-sm btn-create" @click="openModal">
Créer une nouvelle localisation
{{ $t('activity.create_new_location') }}
</a>
</li>
</ul>
@ -14,7 +14,7 @@
@close="modal.showModal = false">
<template v-slot:header>
<h3 class="modal-title">Créer une nouvelle localisation</h3>
<h3 class="modal-title">{{ $t('activity.create_new_location') }}</h3>
</template>
<template v-slot:body>
@ -26,38 +26,38 @@
</add-address>
<div class="form-floating mb-3">
<input class="form-control form-control-lg" id="name" v-model="inputName" placeholder="edit me" />
<label for="name">Nom</label>
<input class="form-control form-control-lg" id="name" v-model="inputName" placeholder />
<label for="name">{{ $t('activity.location_fields.name') }}</label>
</div>
<div class="form-floating mb-3">
<select class="form-select form-select-lg" id="type" v-model="selectType">
<option selected disabled value="">Please select one</option>
<option v-for="ltype in locationTypes" :value="ltype.id">
{{ ltype.title.fr }}
<option selected disabled value="">{{ $t('activity.choose_location_type') }}</option>
<option v-for="t in locationTypes" :value="t.id">
{{ t.title.fr }}
</option>
</select>
<label>Type</label>
<label>{{ $t('activity.location_fields.type') }}</label>
</div>
<div class="form-floating mb-3">
<input class="form-control form-control-lg" id="phonenumber1" v-model="inputPhonenumber1" placeholder="edit me" />
<label for="phonenumber1">Téléphone</label>
<input class="form-control form-control-lg" id="phonenumber1" v-model="inputPhonenumber1" placeholder />
<label for="phonenumber1">{{ $t('activity.location_fields.phonenumber1') }}</label>
</div>
<div class="form-floating mb-3" v-if="hasPhonenumber1">
<input class="form-control form-control-lg" id="phonenumber2" v-model="inputPhonenumber2" placeholder="edit me" />
<label for="phonenumber2">Autre téléphone</label>
<input class="form-control form-control-lg" id="phonenumber2" v-model="inputPhonenumber2" placeholder />
<label for="phonenumber2">{{ $t('activity.location_fields.phonenumber2') }}</label>
</div>
<div class="form-floating mb-3">
<input class="form-control form-control-lg" id="email" v-model="inputEmail" placeholder="edit me" />
<label for="email">Adresse courriel</label>
<input class="form-control form-control-lg" id="email" v-model="inputEmail" placeholder />
<label for="email">{{ $t('activity.location_fields.email') }}</label>
</div>
</template>
<template v-slot:footer>
<button class="btn btn-save"
@click.prevent="$emit('saveNewLocation', selected); modal.showModal = false;">
Enregistrer
{{ $t('action.save') }}
</button>
</template>
@ -96,10 +96,10 @@ export default {
addAddress: {
options: {
button: {
text: { create: 'Créer une adresse', edit: "Modifier l'adresse" },
text: { create: 'activity.create_address', edit: 'activity.edit_address' },
size: 'btn-sm'
},
title: { create: 'Créer une adresse', edit: "Modifier l'adresse" },
title: { create: 'activity.create_address', edit: 'activity.edit_address' },
},
context: {
target: { //name, id

View File

@ -8,7 +8,7 @@ const appMessages = {
choose_other_social_issue: "Ajouter une autre problématique sociale...",
social_actions: "Actions d'accompagnement",
select_first_a_social_issue: "Sélectionnez d'abord une problématique sociale",
//
add_persons: "Ajouter des personnes concernées",
bloc_persons: "Usagers",
@ -16,6 +16,22 @@ const appMessages = {
bloc_persons_not_associated: "Tiers non-pro.",
bloc_thirdparty: "Tiers professionnels",
bloc_users: "T(M)S",
//
location: "Localisation",
choose_location: "Choisissez une localisation",
choose_location_type: "Choisissez un type de localisation",
create_new_location: "Créer une nouvelle localisation",
location_fields: {
name: "Nom",
type: "Type",
phonenumber1: "Téléphone",
phonenumber2: "Autre téléphone",
email: "Adresse courriel",
},
create_address: 'Créer une adresse',
edit_address: "Modifier l'adresse"
}
}
}