Resolve "Finish handling of internationalization in vuejs: handling translation of "translatable string""

This commit is contained in:
2025-05-28 14:40:26 +00:00
committed by Julien Fastré
parent dc44c46667
commit 649ad26721
22 changed files with 118 additions and 464 deletions

View File

@@ -79,7 +79,7 @@
:value="personAltNamesLabels[i]"
@input="onAltNameInput"
/>
<label :for="a.key">{{ a.labels.fr }}</label>
<label :for="a.key">{{ localizeString(a.labels) }}</label>
</div>
<!-- TODO fix placeholder if undefined
@@ -117,7 +117,7 @@
{{ $t("person.civility.placeholder") }}
</option>
<option v-for="c in config.civilities" :value="c.id" :key="c.id">
{{ c.name.fr }}
{{ localizeString(c.name) }}
</option>
</select>
<label>{{ $t("person.civility.title") }}</label>
@@ -219,6 +219,7 @@ import {
} from "../../_api/OnTheFly";
import PersonRenderBox from "../Entity/PersonRenderBox.vue";
import AddAddress from "ChillMainAssets/vuejs/Address/components/AddAddress.vue";
import { localizeString } from "ChillMainAssets/lib/localizationHelper/localizationHelper";
export default {
name: "OnTheFlyPerson",
@@ -427,7 +428,8 @@ export default {
}
},
methods: {
checkErrors(e) {
localizeString,
checkErrors() {
this.errors = [];
if (this.person.lastName === "") {
this.errors.push("Le nom ne doit pas être vide.");
@@ -445,7 +447,7 @@ export default {
loadData() {
getPerson(this.id).then(
(person) =>
new Promise((resolve, reject) => {
new Promise((resolve) => {
this.person = person;
//console.log('get person', this.person);
resolve();