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