refactor: refs #6425 new translation proposal
This commit is contained in:
parent
02574ec42d
commit
63c6b523fb
src
i18n
pages
Customer
Entry
Travel
|
@ -1,9 +1,32 @@
|
||||||
import en from './en';
|
const langs = import.meta.glob(`./**/*.js`);
|
||||||
import es from './es';
|
const files = import.meta.glob(`../pages/**/Translation/en.js`);
|
||||||
export const localeEquivalence = {
|
const importLang = {};
|
||||||
'en':'en-GB'
|
|
||||||
|
for (const fileLang in langs) {
|
||||||
|
const lang = fileLang.split('/').at(1);
|
||||||
|
|
||||||
|
import(fileLang)
|
||||||
|
.then((t) => {
|
||||||
|
importLang[lang] = t.default;
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
for (const file in files) {
|
||||||
|
const splittedFile = file.split('/');
|
||||||
|
splittedFile.pop();
|
||||||
|
const langFiles = splittedFile.join('/') + '/' + lang + '.js';
|
||||||
|
console.log('myFile: ', langFiles);
|
||||||
|
import(langFiles)
|
||||||
|
.then((t) => {
|
||||||
|
Object.assign(importLang[lang], t.default);
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log('no va: ' + err, file, importLang);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
export default {
|
|
||||||
en: en,
|
export const localeEquivalence = {
|
||||||
es: es,
|
en: 'en-GB',
|
||||||
};
|
};
|
||||||
|
export default importLang;
|
||||||
|
|
|
@ -48,13 +48,17 @@ const zones = ref();
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem class="q-mb-sm">
|
<QItem class="q-mb-sm">
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnInput :label="t('Name')" v-model="params.name" is-outlined />
|
<VnInput
|
||||||
|
:label="t('customerFilter.filter.name')"
|
||||||
|
v-model="params.name"
|
||||||
|
is-outlined
|
||||||
|
/>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem class="q-mb-sm">
|
<QItem class="q-mb-sm">
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnInput
|
<VnInput
|
||||||
:label="t('Social Name')"
|
:label="t('customerFilter.filter.socialName')"
|
||||||
v-model="params.socialName"
|
v-model="params.socialName"
|
||||||
is-outlined
|
is-outlined
|
||||||
/>
|
/>
|
||||||
|
@ -170,8 +174,7 @@ en:
|
||||||
params:
|
params:
|
||||||
search: Contains
|
search: Contains
|
||||||
fi: FI
|
fi: FI
|
||||||
name: Name
|
|
||||||
socialName: Social Name
|
|
||||||
salesPersonFk: Salesperson
|
salesPersonFk: Salesperson
|
||||||
provinceFk: Province
|
provinceFk: Province
|
||||||
city: City
|
city: City
|
||||||
|
@ -193,8 +196,8 @@ es:
|
||||||
zoneFk: Zona
|
zoneFk: Zona
|
||||||
postcode: CP
|
postcode: CP
|
||||||
FI: NIF
|
FI: NIF
|
||||||
Name: Nombre
|
|
||||||
Social Name: Razón social
|
|
||||||
Salesperson: Comercial
|
Salesperson: Comercial
|
||||||
Province: Provincia
|
Province: Provincia
|
||||||
City: Ciudad
|
City: Ciudad
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
export default {
|
||||||
|
customerFilter: {
|
||||||
|
filter: {
|
||||||
|
name: 'Name',
|
||||||
|
socialName: 'Social name',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
|
@ -0,0 +1,8 @@
|
||||||
|
export default {
|
||||||
|
customerFilter: {
|
||||||
|
filter: {
|
||||||
|
name: 'Nombre',
|
||||||
|
socialName: 'Razón Social',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
|
@ -1,6 +1,8 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
import { onMounted } from 'vue';
|
||||||
|
import { useStateStore } from 'stores/useStateStore';
|
||||||
|
|
||||||
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
|
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
|
||||||
import VnSelectFilter from 'src/components/common/VnSelectFilter.vue';
|
import VnSelectFilter from 'src/components/common/VnSelectFilter.vue';
|
||||||
|
@ -19,6 +21,11 @@ const props = defineProps({
|
||||||
const currenciesOptions = ref([]);
|
const currenciesOptions = ref([]);
|
||||||
const companiesOptions = ref([]);
|
const companiesOptions = ref([]);
|
||||||
const suppliersOptions = ref([]);
|
const suppliersOptions = ref([]);
|
||||||
|
|
||||||
|
const stateStore = useStateStore();
|
||||||
|
onMounted(async () => {
|
||||||
|
stateStore.rightDrawer = true;
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -58,7 +65,7 @@ const suppliersOptions = ref([]);
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnInput
|
<VnInput
|
||||||
v-model="params.search"
|
v-model="params.search"
|
||||||
:label="t('params.search')"
|
:label="t('entryFilter.filter.search')"
|
||||||
is-outlined
|
is-outlined
|
||||||
/>
|
/>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
|
@ -67,7 +74,7 @@ const suppliersOptions = ref([]);
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnInput
|
<VnInput
|
||||||
v-model="params.reference"
|
v-model="params.reference"
|
||||||
:label="t('params.reference')"
|
:label="t('entryFilter.filter.reference')"
|
||||||
is-outlined
|
is-outlined
|
||||||
/>
|
/>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
|
@ -210,8 +217,7 @@ const suppliersOptions = ref([]);
|
||||||
<i18n>
|
<i18n>
|
||||||
en:
|
en:
|
||||||
params:
|
params:
|
||||||
search: General search
|
|
||||||
reference: Reference
|
|
||||||
invoiceNumber: Invoice number
|
invoiceNumber: Invoice number
|
||||||
travelFk: Travel
|
travelFk: Travel
|
||||||
companyFk: Company
|
companyFk: Company
|
||||||
|
@ -225,8 +231,7 @@ en:
|
||||||
isOrdered: Ordered
|
isOrdered: Ordered
|
||||||
es:
|
es:
|
||||||
params:
|
params:
|
||||||
search: Búsqueda general
|
|
||||||
reference: Referencia
|
|
||||||
invoiceNumber: Núm. factura
|
invoiceNumber: Núm. factura
|
||||||
travelFk: Envío
|
travelFk: Envío
|
||||||
companyFk: Empresa
|
companyFk: Empresa
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
export default {
|
||||||
|
entryList: {
|
||||||
|
list: {
|
||||||
|
inventoryEntry: 'Inventory entry',
|
||||||
|
virtualEntry: 'Virtual entry',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
entryFilter: {
|
||||||
|
filter: {
|
||||||
|
search: 'General search',
|
||||||
|
reference: 'Reference',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
|
@ -0,0 +1,14 @@
|
||||||
|
export default {
|
||||||
|
entryList: {
|
||||||
|
list: {
|
||||||
|
inventoryEntry: 'Es inventario',
|
||||||
|
virtualEntry: 'Es una redada',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
entryFilter: {
|
||||||
|
filter: {
|
||||||
|
search: 'Búsqueda general',
|
||||||
|
reference: 'Referencia',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
|
@ -0,0 +1,8 @@
|
||||||
|
export default {
|
||||||
|
travelFilter: {
|
||||||
|
filter: {
|
||||||
|
warehouseOutFk: 'Warehouse Out',
|
||||||
|
warehouseInFk: 'Warehouse In',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
|
@ -0,0 +1,8 @@
|
||||||
|
export default {
|
||||||
|
travelFilter: {
|
||||||
|
filter: {
|
||||||
|
warehouseInFk: 'Alm. entrada',
|
||||||
|
warehouseOutFk: 'Alm. salida',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
|
@ -88,7 +88,7 @@ const decrement = (paramsObj, key) => {
|
||||||
<QItem>
|
<QItem>
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnSelectFilter
|
<VnSelectFilter
|
||||||
:label="t('params.warehouseOutFk')"
|
:label="t('travelFilter.filter.warehouseOutFk')"
|
||||||
v-model="params.warehouseOutFk"
|
v-model="params.warehouseOutFk"
|
||||||
@update:model-value="searchFn()"
|
@update:model-value="searchFn()"
|
||||||
:options="warehousesOptions"
|
:options="warehousesOptions"
|
||||||
|
@ -104,7 +104,7 @@ const decrement = (paramsObj, key) => {
|
||||||
<QItem>
|
<QItem>
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnSelectFilter
|
<VnSelectFilter
|
||||||
:label="t('params.warehouseInFk')"
|
:label="t('travelFilter.filter.warehouseInFk')"
|
||||||
v-model="params.warehouseInFk"
|
v-model="params.warehouseInFk"
|
||||||
@update:model-value="searchFn()"
|
@update:model-value="searchFn()"
|
||||||
:options="warehousesOptions"
|
:options="warehousesOptions"
|
||||||
|
@ -221,8 +221,7 @@ en:
|
||||||
params:
|
params:
|
||||||
search: Id/Reference
|
search: Id/Reference
|
||||||
agencyModeFk: Agency
|
agencyModeFk: Agency
|
||||||
warehouseInFk: Warehouse In
|
|
||||||
warehouseOutFk: Warehouse Out
|
|
||||||
scopeDays: Days onward
|
scopeDays: Days onward
|
||||||
landedFrom: Landed from
|
landedFrom: Landed from
|
||||||
landedTo: Landed to
|
landedTo: Landed to
|
||||||
|
@ -232,8 +231,7 @@ es:
|
||||||
params:
|
params:
|
||||||
search: Id/Referencia
|
search: Id/Referencia
|
||||||
agencyModeFk: Agencia
|
agencyModeFk: Agencia
|
||||||
warehouseInFk: Alm. entrada
|
|
||||||
warehouseOutFk: Alm. salida
|
|
||||||
scopeDays: Días adelante
|
scopeDays: Días adelante
|
||||||
landedFrom: Llegada desde
|
landedFrom: Llegada desde
|
||||||
landedTo: Llegada hasta
|
landedTo: Llegada hasta
|
||||||
|
|
Loading…
Reference in New Issue