From 953f6f4af3564ad84ec81c81365a737f80261a2c Mon Sep 17 00:00:00 2001 From: jorgep Date: Wed, 27 Nov 2024 09:54:56 +0100 Subject: [PATCH] refactor: refs #7936 locale --- src/components/ui/VnFilterPanel.vue | 4 +- src/i18n/locale/en.yml | 6 ++ src/i18n/locale/es.yml | 4 ++ .../InvoiceIn/Card/InvoiceInBasicData.vue | 2 +- .../InvoiceIn/Card/InvoiceInDescriptor.vue | 10 +-- src/pages/InvoiceIn/Card/InvoiceInSummary.vue | 68 +++++++++---------- src/pages/InvoiceIn/InvoiceInCreate.vue | 6 +- src/pages/InvoiceIn/InvoiceInFilter.vue | 47 +++---------- src/pages/InvoiceIn/InvoiceInList.vue | 18 ++--- src/pages/InvoiceIn/locale/en.yml | 7 +- src/pages/InvoiceIn/locale/es.yml | 6 +- 11 files changed, 85 insertions(+), 93 deletions(-) diff --git a/src/components/ui/VnFilterPanel.vue b/src/components/ui/VnFilterPanel.vue index 714fe3f31..22bd89675 100644 --- a/src/components/ui/VnFilterPanel.vue +++ b/src/components/ui/VnFilterPanel.vue @@ -230,7 +230,9 @@ function sanitizer(params) { const getLocale = (label) => { const param = label.split('.').at(-1); const globalLocale = `globals.params.${param}`; - return te(globalLocale) ? t(globalLocale) : t(`params.${param}`); + if (te(globalLocale)) return t(globalLocale); + else if (te(t(`params.${param}`))); + else return t(`${route.meta.moduleName}.params.${param}`); }; diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index 622ef833b..e89bf3ba3 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -335,6 +335,12 @@ globals: from: From to: To supplierFk: Supplier + supplierRef: Supplier ref + serial: Serial + amount: Importe + awbCode: AWB + correctedFk: Rectified + correctingFk: Rectificative changePass: Change password deleteConfirmTitle: Delete selected elements changeState: Change state diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index 20317aa49..e1080421d 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -339,6 +339,10 @@ globals: from: Desde to: Hasta supplierFk: Proveedor + supplierRef: Ref. proveedor + serial: Serie + amount: Importe + awbCode: AWB changePass: Cambiar contraseña deleteConfirmTitle: Eliminar los elementos seleccionados changeState: Cambiar estado diff --git a/src/pages/InvoiceIn/Card/InvoiceInBasicData.vue b/src/pages/InvoiceIn/Card/InvoiceInBasicData.vue index 209681b7c..d22ee5b16 100644 --- a/src/pages/InvoiceIn/Card/InvoiceInBasicData.vue +++ b/src/pages/InvoiceIn/Card/InvoiceInBasicData.vue @@ -262,7 +262,7 @@ function deleteFile(dmsFk) { {