mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +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:
@@ -22,6 +22,7 @@
|
||||
|
||||
<script>
|
||||
import VueMultiselect from "vue-multiselect";
|
||||
import { localizeString } from "ChillMainAssets/lib/localizationHelper/localizationHelper";
|
||||
|
||||
export default {
|
||||
name: "CountrySelection",
|
||||
@@ -68,7 +69,7 @@ export default {
|
||||
)[0];
|
||||
},
|
||||
transName({ name }) {
|
||||
return name.fr; //TODO multilang
|
||||
return localizeString(name);
|
||||
},
|
||||
selectCountry(value) {
|
||||
//console.log('select country', value);
|
||||
|
@@ -32,7 +32,7 @@
|
||||
class="chill-entity entity-social-issue"
|
||||
>
|
||||
<span class="badge bg-chill-l-gray text-dark">
|
||||
{{ i.title.fr }}
|
||||
{{ localizeString(i.title) }}
|
||||
</span>
|
||||
</span>
|
||||
</td>
|
||||
@@ -77,6 +77,7 @@
|
||||
import { mapState, mapGetters } from "vuex";
|
||||
import TabTable from "./TabTable";
|
||||
import OnTheFly from "ChillMainAssets/vuejs/OnTheFly/components/OnTheFly";
|
||||
import { localizeString } from "ChillMainAssets/lib/localizationHelper/localizationHelper";
|
||||
|
||||
export default {
|
||||
name: "MyAccompanyingCourses",
|
||||
@@ -96,6 +97,7 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
localizeString,
|
||||
getUrl(c) {
|
||||
return `/fr/parcours/${c.id}`;
|
||||
},
|
||||
|
@@ -26,7 +26,7 @@
|
||||
>
|
||||
<td>{{ $d(e.maxDate.datetime, "short") }}</td>
|
||||
<td>
|
||||
{{ e.evaluation.title.fr }}
|
||||
{{ localizeString(e.evaluation.title) }}
|
||||
</td>
|
||||
<td>
|
||||
<span class="chill-entity entity-social-issue">
|
||||
@@ -97,6 +97,7 @@
|
||||
import { mapState, mapGetters } from "vuex";
|
||||
import TabTable from "./TabTable";
|
||||
import OnTheFly from "ChillMainAssets/vuejs/OnTheFly/components/OnTheFly";
|
||||
import { localizeString } from "../../lib/localizationHelper/localizationHelper";
|
||||
|
||||
export default {
|
||||
name: "MyEvaluations",
|
||||
@@ -116,6 +117,7 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
localizeString,
|
||||
getUrl(e) {
|
||||
switch (e.type) {
|
||||
case "accompanying_period_work_evaluation":
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<template v-for="(container, index) in data.containers" :key="index">
|
||||
<h4>{{ container.layer.name.fr }}</h4>
|
||||
<h4>{{ localizeString(container.layer.name) }}</h4>
|
||||
<ul>
|
||||
<li v-for="(unit, index) in container.units" :key="index">
|
||||
{{ unit.unitName }} ({{ unit.unitRefId }})
|
||||
@@ -20,6 +20,7 @@ import {
|
||||
getAllGeographicalUnitLayers,
|
||||
} from "../../../../lib/api/address";
|
||||
import { onMounted, reactive } from "vue";
|
||||
import { localizeString } from "ChillMainAssets/lib/localizationHelper/localizationHelper";
|
||||
|
||||
export interface AddressDetailsGeographicalLayersProp {
|
||||
address: Address;
|
||||
|
@@ -30,7 +30,7 @@
|
||||
{{ address.postcode.name }}
|
||||
</p>
|
||||
<p v-if="null !== address.country" class="country">
|
||||
{{ address.country.name.fr }}
|
||||
{{ localizeString(address.country.name) }}
|
||||
</p>
|
||||
</div>
|
||||
</template>
|
||||
@@ -84,9 +84,11 @@
|
||||
import Confidential from "ChillMainAssets/vuejs/_components/Confidential.vue";
|
||||
import AddressDetailsButton from "ChillMainAssets/vuejs/_components/AddressDetails/AddressDetailsButton.vue";
|
||||
import { trans, ADDRESS_VALID_FROM, ADDRESS_VALID_TO } from "translator";
|
||||
import { localizeString } from "ChillMainAssets/lib/localizationHelper/localizationHelper";
|
||||
|
||||
export default {
|
||||
name: "AddressRenderBox",
|
||||
methods: { localizeString },
|
||||
components: {
|
||||
Confidential,
|
||||
AddressDetailsButton,
|
||||
|
@@ -1,6 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { UserGroup } from "../../../types";
|
||||
import { computed } from "vue";
|
||||
import { localizeString } from "ChillMainAssets/lib/localizationHelper/localizationHelper";
|
||||
|
||||
interface UserGroupRenderBoxProps {
|
||||
userGroup: UserGroup;
|
||||
@@ -18,7 +19,7 @@ const styles = computed<{ color: string; "background-color": string }>(() => {
|
||||
|
||||
<template>
|
||||
<span class="badge-user-group" :style="styles">{{
|
||||
userGroup.label.fr
|
||||
localizeString(userGroup.label)
|
||||
}}</span>
|
||||
</template>
|
||||
|
||||
|
@@ -2,10 +2,10 @@
|
||||
<span class="chill-entity entity-user">
|
||||
{{ user.label }}
|
||||
<span class="user-job" v-if="user.user_job !== null"
|
||||
>({{ user.user_job.label.fr }})</span
|
||||
>({{ localizeString(user.user_job.label) }})</span
|
||||
>
|
||||
<span class="main-scope" v-if="user.main_scope !== null"
|
||||
>({{ user.main_scope.name.fr }})</span
|
||||
>({{ localizeString(user.main_scope.name) }})</span
|
||||
>
|
||||
<span
|
||||
v-if="user.isAbsent"
|
||||
@@ -17,8 +17,15 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { localizeString } from "ChillMainAssets/lib/localizationHelper/localizationHelper";
|
||||
|
||||
export default {
|
||||
name: "UserRenderBoxBadge",
|
||||
methods: {
|
||||
localizeString() {
|
||||
return localizeString;
|
||||
},
|
||||
},
|
||||
props: ["user"],
|
||||
};
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user