mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-28 02:23:51 +00:00
Merge branch '379-translation-localization-vue' into 'master'
Resolve "Finish handling of internationalization in vuejs: handling translation of "translatable string"" Closes #379 See merge request Chill-Projet/chill-bundles!822
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
:value="s"
|
||||
/>
|
||||
<label class="form-check-label">
|
||||
{{ s.name.fr }}
|
||||
{{ localizeString(s.name) }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
<script>
|
||||
import { mapState, mapGetters } from "vuex";
|
||||
import { localizeString } from "ChillMainAssets/lib/localizationHelper/localizationHelper";
|
||||
|
||||
export default {
|
||||
name: "Scopes",
|
||||
@@ -48,6 +49,7 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
localizeString,
|
||||
restore() {
|
||||
console.log("restore");
|
||||
},
|
||||
|
@@ -68,7 +68,7 @@
|
||||
<!-- results which **are** attached to an objective -->
|
||||
<div v-for="g in goalsPicked" :key="g.goal.id">
|
||||
<div class="item-title" @click="removeGoal(g)">
|
||||
<span class="removable">{{ g.goal.title.fr }}</span>
|
||||
<span class="removable">{{ localizeString(g.goal.title) }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<add-result :goal="g.goal" destination="goal"></add-result>
|
||||
@@ -112,7 +112,7 @@
|
||||
@click="addGoal(g)"
|
||||
:key="g.id"
|
||||
>
|
||||
<span>{{ g.title.fr }}</span>
|
||||
<span>{{ localizeString(g.title) }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</template>
|
||||
@@ -157,7 +157,7 @@
|
||||
@click="addEvaluation(e)"
|
||||
:key="e.id"
|
||||
>
|
||||
<span>{{ e.title.fr }}</span>
|
||||
<span>{{ localizeString(e.title) }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -460,6 +460,7 @@ import OnTheFly from "ChillMainAssets/vuejs/OnTheFly/components/OnTheFly.vue";
|
||||
import ListWorkflowModal from "ChillMainAssets/vuejs/_components/EntityWorkflow/ListWorkflowModal.vue";
|
||||
import PersonText from "ChillPersonAssets/vuejs/_components/Entity/PersonText.vue";
|
||||
import { makeFetch } from "ChillMainAssets/lib/api/apiMethods";
|
||||
import { localizeString } from "ChillMainAssets/lib/localizationHelper/localizationHelper";
|
||||
|
||||
const i18n = {
|
||||
messages: {
|
||||
@@ -661,6 +662,7 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
localizeString,
|
||||
toggleSelect() {
|
||||
this.isExpanded = !this.isExpanded;
|
||||
},
|
||||
|
@@ -2,7 +2,7 @@
|
||||
<div>
|
||||
<a id="evaluations"></a>
|
||||
<div class="item-title" :title="evaluation.id || 'no id yet'">
|
||||
<span>{{ evaluation.evaluation.title.fr }}</span>
|
||||
<span>{{ localizeString(evaluation.evaluation.title) }}</span>
|
||||
</div>
|
||||
|
||||
<div class="item-url mt-3 mb-4" v-if="evaluation.evaluation.url">
|
||||
@@ -69,6 +69,7 @@ import FormEvaluation from "./FormEvaluation.vue";
|
||||
import Modal from "ChillMainAssets/vuejs/_components/Modal";
|
||||
import ListWorkflowModal from "ChillMainAssets/vuejs/_components/EntityWorkflow/ListWorkflowModal.vue";
|
||||
import { buildLinkCreate } from "ChillMainAssets/lib/entity-workflow/api";
|
||||
import { localizeString } from "ChillMainAssets/lib/localizationHelper/localizationHelper";
|
||||
|
||||
const i18n = {
|
||||
messages: {
|
||||
@@ -129,17 +130,18 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
localizeString,
|
||||
removeEvaluation(e) {
|
||||
this.$store.commit("removeEvaluation", e);
|
||||
return;
|
||||
},
|
||||
toggleEditEvaluation(e) {
|
||||
toggleEditEvaluation() {
|
||||
this.$store.commit("toggleEvaluationEdit", { key: this.evaluation.key });
|
||||
},
|
||||
submitForm() {
|
||||
this.toggleEditEvaluation();
|
||||
},
|
||||
goToGenerateWorkflow({ event, link, workflowName }) {
|
||||
goToGenerateWorkflow({ workflowName }) {
|
||||
const callback = (data) => {
|
||||
let evaluationId = data.accompanyingPeriodWorkEvaluations.find(
|
||||
(e) => e.key === this.evaluation.key,
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<ul class="list-suggest remove-items">
|
||||
<li v-for="r in pickedResults" @click="removeResult(r)" :key="r.id">
|
||||
<span>
|
||||
{{ r.title.fr }}
|
||||
{{ localizeString(r.title) }}
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -50,7 +50,7 @@
|
||||
@click="addResult(r)"
|
||||
:key="r.id"
|
||||
>
|
||||
<span>{{ r.title.fr }}</span>
|
||||
<span>{{ localizeString(r.title) }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</template>
|
||||
@@ -66,6 +66,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { localizeString } from "ChillMainAssets/lib/localizationHelper/localizationHelper";
|
||||
|
||||
const i18n = {
|
||||
messages: {
|
||||
fr: {
|
||||
@@ -124,6 +126,7 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
localizeString,
|
||||
toggleSelect() {
|
||||
this.isExpanded = !this.isExpanded;
|
||||
},
|
||||
|
@@ -28,7 +28,7 @@
|
||||
:key="t.id"
|
||||
:value="t.id"
|
||||
>
|
||||
{{ t.label.fr }}
|
||||
{{ localizeString(t.label) }}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
@@ -83,9 +83,11 @@
|
||||
<script>
|
||||
import CurrentHousehold from "./CurrentHousehold";
|
||||
import { mapGetters, mapState } from "vuex";
|
||||
import { localizeString } from "ChillMainAssets/lib/localizationHelper/localizationHelper";
|
||||
|
||||
export default {
|
||||
name: "Dates",
|
||||
methods: { localizeString },
|
||||
components: {
|
||||
CurrentHousehold,
|
||||
},
|
||||
|
@@ -38,7 +38,7 @@
|
||||
}"
|
||||
@click="moveToPosition(conc.person.id, position.id)"
|
||||
>
|
||||
{{ position.label.fr }}
|
||||
{{ localizeString(position.label) }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -57,6 +57,7 @@ import { mapGetters, mapState } from "vuex";
|
||||
import CurrentHousehold from "./CurrentHousehold";
|
||||
import PersonComment from "./PersonComment";
|
||||
import PersonText from "../../_components/Entity/PersonText.vue";
|
||||
import { localizeString } from "ChillMainAssets/lib/localizationHelper/localizationHelper";
|
||||
|
||||
export default {
|
||||
name: "Positioning",
|
||||
@@ -79,7 +80,7 @@ export default {
|
||||
this.$store.getters.concUnpositionned.length === 0
|
||||
);
|
||||
},
|
||||
allowHolderForConcerned: (app) => (conc) => {
|
||||
allowHolderForConcerned: () => (conc) => {
|
||||
console.log("allow holder for concerned", conc);
|
||||
if (conc.position === null) {
|
||||
return false;
|
||||
@@ -89,6 +90,7 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
localizeString,
|
||||
moveToPosition(person_id, position_id) {
|
||||
this.$store.dispatch("markPosition", { person_id, position_id });
|
||||
},
|
||||
|
@@ -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();
|
||||
|
Reference in New Issue
Block a user