Skip to content

Commit

Permalink
THE-1364 traductions valeur des filtres (checkboxes)
Browse files Browse the repository at this point in the history
  • Loading branch information
clementdelafontaine committed Oct 14, 2024
1 parent 951e1f6 commit 5cdd814
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions components/common/results/FacetCheckbox.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<v-lazy :min-height="10" :options="{ threshold: 0 }">
<v-checkbox :aria-label="`${replaceFacetsText(facetItem.label)} (${facetItem.value.toLocaleString('fr-FR')})` + ' résultats'" v-model="checkboxState" @click="updateCheckbox" :class="`checkboxes ms-${props.marginOffset}`"
:label="`${replaceFacetsText(facetItem.label)} (${facetItem.value.toLocaleString('fr-FR')})`" density="compact" inline hide-details @keyup.enter="updateCheckbox">
<v-checkbox :aria-label="`${replaceFacetsTextAndTranslate(facetItem.label)} (${facetItem.value.toLocaleString('fr-FR')})` + ' résultats'" v-model="checkboxState" @click="updateCheckbox" :class="`checkboxes ms-${props.marginOffset}`"
:label="`${replaceFacetsTextAndTranslate(facetItem.label)} (${facetItem.value.toLocaleString('fr-FR')})`" density="compact" inline hide-details @keyup.enter="updateCheckbox">
</v-checkbox>
</v-lazy>

Expand All @@ -19,7 +19,9 @@
<script setup>
import { computed, onMounted, ref, watch } from "vue";
import { replaceFacetsText } from "../../../services/Common";
import { useI18n } from "vue-i18n";
const { t } = useI18n();
const { addToFiltersLabelsMap } = useStrategyAPI();
const emit = defineEmits(['updateParentCheckbox', 'updateFilterData', 'updateFilterDataRecursive']);
Expand Down Expand Up @@ -140,6 +142,10 @@ function arrayContainsFilter() {
}
return false;
}
function replaceFacetsTextAndTranslate(label) {
return t(replaceFacetsText(label));
}
</script>

<style scoped lang="scss">
Expand Down

0 comments on commit 5cdd814

Please sign in to comment.