feat: enhance i18n support for campaign consumption and select all functionality
gitea/salix-front/pipeline/pr-dev This commit is unstable
Details
gitea/salix-front/pipeline/pr-dev This commit is unstable
Details
This commit is contained in:
parent
7bbabb9761
commit
f683d78e0e
|
@ -3,7 +3,9 @@ import { ref } from 'vue';
|
||||||
import VnCheckbox from './VnCheckbox.vue';
|
import VnCheckbox from './VnCheckbox.vue';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { toRaw } from 'vue';
|
import { toRaw } from 'vue';
|
||||||
|
import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
|
const { t } = useI18n();
|
||||||
const model = defineModel({ type: [Boolean] });
|
const model = defineModel({ type: [Boolean] });
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
url: {
|
url: {
|
||||||
|
@ -41,7 +43,7 @@ const onClick = async () => {
|
||||||
<QMenu anchor="bottom right" self="top right">
|
<QMenu anchor="bottom right" self="top right">
|
||||||
<QList>
|
<QList>
|
||||||
<QItem v-ripple clickable @click="$emit('select:all', toRaw(rows))">
|
<QItem v-ripple clickable @click="$emit('select:all', toRaw(rows))">
|
||||||
Select all({{ rows.length }})</QItem
|
{{ t('Select all', { rows: rows.length }) }}</QItem
|
||||||
>
|
>
|
||||||
<slot name="more-options"></slot>
|
<slot name="more-options"></slot>
|
||||||
</QList>
|
</QList>
|
||||||
|
@ -49,3 +51,17 @@ const onClick = async () => {
|
||||||
</QBtn>
|
</QBtn>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
<i18n lang="yml">
|
||||||
|
en:
|
||||||
|
Select all: 'Select all ({rows})'
|
||||||
|
fr:
|
||||||
|
Select all: 'Sélectionner tout ({rows})'
|
||||||
|
es:
|
||||||
|
Select all: Seleccionar todo ({rows})
|
||||||
|
de:
|
||||||
|
Select all: 'Alle auswählen ({rows})'
|
||||||
|
it:
|
||||||
|
Select all: 'Seleziona tutto ({rows})'
|
||||||
|
pt:
|
||||||
|
Select all: Selecionar tudo ({rows})
|
||||||
|
</i18n>
|
||||||
|
|
|
@ -98,7 +98,9 @@ onMounted(async () => {
|
||||||
<QBtn color="primary" icon="show_chart" :disable="!selectedRows">
|
<QBtn color="primary" icon="show_chart" :disable="!selectedRows">
|
||||||
<QPopupProxy ref="popupProxyRef">
|
<QPopupProxy ref="popupProxyRef">
|
||||||
<QCard class="column q-pa-md">
|
<QCard class="column q-pa-md">
|
||||||
<span class="text-body1 q-mb-sm">{{ t('Campaign consumption') }}</span>
|
<span class="text-body1 q-mb-sm">{{
|
||||||
|
t('Campaign consumption', { rows: $props.clients.length })
|
||||||
|
}}</span>
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:options="moreFields"
|
:options="moreFields"
|
||||||
|
@ -140,12 +142,13 @@ onMounted(async () => {
|
||||||
valentinesDay: Valentine's Day
|
valentinesDay: Valentine's Day
|
||||||
mothersDay: Mother's Day
|
mothersDay: Mother's Day
|
||||||
allSaints: All Saints' Day
|
allSaints: All Saints' Day
|
||||||
|
Campaign consumption: Campaign consumption ({rows})
|
||||||
es:
|
es:
|
||||||
params:
|
params:
|
||||||
valentinesDay: Día de San Valentín
|
valentinesDay: Día de San Valentín
|
||||||
mothersDay: Día de la Madre
|
mothersDay: Día de la Madre
|
||||||
allSaints: Día de Todos los Santos
|
allSaints: Día de Todos los Santos
|
||||||
Campaign consumption: Consumo campaña
|
Campaign consumption: Consumo campaña ({rows})
|
||||||
Campaign: Campaña
|
Campaign: Campaña
|
||||||
From: Desde
|
From: Desde
|
||||||
To: Hasta
|
To: Hasta
|
||||||
|
|
Loading…
Reference in New Issue