From 9d32f6af3bdc2af79b2c121e5510f585077ef7d7 Mon Sep 17 00:00:00 2001 From: jtubau Date: Fri, 17 Jan 2025 14:08:14 +0100 Subject: [PATCH] refactor: refs #8316 add new localization keys and update existing ones for invoiceOut components --- src/components/ui/VnFilterPanel.vue | 5 +- src/i18n/locale/en.yml | 56 --------------------- src/i18n/locale/es.yml | 56 --------------------- src/pages/Item/locale/en.yml | 78 ++++++++++++++--------------- src/pages/Item/locale/es.yml | 68 ++++++++++++------------- src/router/modules/item.js | 72 +++++++++++++------------- 6 files changed, 110 insertions(+), 225 deletions(-) diff --git a/src/components/ui/VnFilterPanel.vue b/src/components/ui/VnFilterPanel.vue index aba797678..93f069cc6 100644 --- a/src/components/ui/VnFilterPanel.vue +++ b/src/components/ui/VnFilterPanel.vue @@ -190,7 +190,10 @@ const getLocale = (label) => { const globalLocale = `globals.params.${param}`; if (te(globalLocale)) return t(globalLocale); else if (te(t(`params.${param}`))); - else return t(`${route.meta.moduleName.toLowerCase()}.params.${param}`); + else { + const camelCaseModuleName = route.meta.moduleName.charAt(0).toLowerCase() + route.meta.moduleName.slice(1); + return t(`${camelCaseModuleName}.params.${param}`); + } }; diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index dbc3e4077..eec9f242a 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -725,62 +725,6 @@ travel: destination: Destination thermograph: Thermograph travelFileDescription: 'Travel id { travelId }' -item: - descriptor: - buyer: Buyer - color: Color - category: Category - available: Available - warehouseText: 'Calculated on the warehouse of { warehouseName }' - itemDiary: Item diary - list: - id: Identifier - stems: Stems - category: Category - typeName: Type - isActive: Active - userName: Buyer - weightByPiece: Weight/Piece - stemMultiplier: Multiplier - fixedPrice: - itemFk: Item ID - groupingPrice: Grouping price - packingPrice: Packing price - hasMinPrice: Has min price - minPrice: Min price - started: Started - ended: Ended - create: - priority: Priority - buyRequest: - requester: Requester - requested: Requested - attender: Atender - achieved: Achieved - concept: Concept - summary: - otherData: Other data - tax: Tax - botanical: Botanical - barcode: Barcode - completeName: Complete name - family: Familiy - stems: Stems - multiplier: Multiplier - buyer: Buyer - doPhoto: Do photo - intrastatCode: Intrastat code - ref: Reference - relevance: Relevance - weight: Weight (gram)/stem - units: Units/box - expense: Expense - generic: Generic - recycledPlastic: Recycled plastic - nonRecycledPlastic: Non recycled plastic - minSalesQuantity: Min sales quantity - genus: Genus - specie: Specie components: topbar: {} itemsFilterPanel: diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index 1b6ed7b71..e58760299 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -721,62 +721,6 @@ travel: destination: Destino thermograph: Termógrafo travelFileDescription: 'Id envío { travelId }' -item: - descriptor: - buyer: Comprador - color: Color - category: Categoría - available: Disponible - warehouseText: 'Calculado sobre el almacén de { warehouseName }' - itemDiary: Registro de compra-venta - list: - id: Identificador - stems: Tallos - category: Reino - typeName: Tipo - isActive: Activo - weightByPiece: Peso (gramos)/tallo - userName: Comprador - stemMultiplier: Multiplicador - fixedPrice: - itemFk: ID Artículo - groupingPrice: Precio grouping - packingPrice: Precio packing - hasMinPrice: Tiene precio mínimo - minPrice: Precio min - started: Inicio - ended: Fin - create: - priority: Prioridad - summary: - otherData: Otros datos - tax: IVA - botanical: Botánico - barcode: Código de barras - completeName: Nombre completo - family: Familia - stems: Tallos - multiplier: Multiplicador - buyer: Comprador - doPhoto: Hacer foto - intrastatCode: Código intrastat - ref: Referencia - relevance: Relevancia - weight: Peso (gramos)/tallo - units: Unidades/caja - expense: Gasto - generic: Genérico - recycledPlastic: Plástico reciclado - nonRecycledPlastic: Plástico no reciclado - minSalesQuantity: Cantidad mínima de venta - genus: Genus - specie: Specie - buyRequest: - requester: Solicitante - requested: Solicitado - attender: Comprador - achieved: Conseguido - concept: Concepto components: topbar: {} itemsFilterPanel: diff --git a/src/pages/Item/locale/en.yml b/src/pages/Item/locale/en.yml index eeaafc0f0..96bdd9b6d 100644 --- a/src/pages/Item/locale/en.yml +++ b/src/pages/Item/locale/en.yml @@ -180,46 +180,46 @@ item: intrastat: Intrastat origin: Origin buyRequest: - ticketId: 'Ticket ID' - shipped: 'Shipped' - requester: 'Requester' - requested: 'Requested' - price: 'Price' - attender: 'Attender' - item: 'Item' - achieved: 'Achieved' - concept: 'Concept' - state: 'State' + ticketId: Ticket ID + shipped: Shipped + requester: Requester + requested: Requested + price: Price + attender: Attender + item: Item + achieved: Achieved + concept: Concept + state: State summary: - basicData: 'Basic data' - otherData: 'Other data' - description: 'Description' - tax: 'Tax' - tags: 'Tags' - botanical: 'Botanical' - barcode: 'Barcode' - name: 'Nombre' - completeName: 'Nombre completo' - family: 'Familia' - size: 'Medida' - origin: 'Origen' - stems: 'Tallos' - multiplier: 'Multiplicador' - buyer: 'Comprador' - doPhoto: 'Do photo' - intrastatCode: 'Código intrastat' + basicData: Basic data + otherData: Other data + description: Description + tax: Tax + tags: Tags + botanical: Botanical + barcode: Barcode + name: Name + completeName: Complete name + family: Family + size: Size + origin: Origin + stems: Stems + multiplier: Multiplier + buyer: Buyer + doPhoto: Do photo + intrastatCode: Intrastat code intrastat: 'Intrastat' - ref: 'Referencia' - relevance: 'Relevancia' - weight: 'Peso (gramos)/tallo' - units: 'Unidades/caja' - expense: 'Gasto' - generic: 'Genérico' - recycledPlastic: 'Plástico reciclado' - nonRecycledPlastic: 'Plástico no reciclado' - minSalesQuantity: 'Cantidad mínima de venta' - genus: 'Genus' - specie: 'Specie' + ref: Reference + relevance: Relevance + weight: Weight (gram)/stem + units: Units/box + expense: Expense + generic: Generic + recycledPlastic: Recycled plastic + nonRecycledPlastic: Non recycled plastic + minSalesQuantity: Min sales quantity + genus: Genus + specie: Specie search: 'Search item' searchInfo: 'You can search by id' - regularizeStock: Regularize stock + regularizeStock: Regularize stock \ No newline at end of file diff --git a/src/pages/Item/locale/es.yml b/src/pages/Item/locale/es.yml index 736be22de..c65062a2b 100644 --- a/src/pages/Item/locale/es.yml +++ b/src/pages/Item/locale/es.yml @@ -73,9 +73,6 @@ itemTags: addTag: Añadir etiqueta tag: Etiqueta value: Valor -searchbar: - label: Buscar artículo - info: Buscar por id de artículo itemType: shared: code: Código @@ -108,9 +105,6 @@ item: concept: Concepto denyOptions: Denegado scopeDays: Días en adelante - searchbar: - label: Buscar artículo - info: Puedes buscar por id descriptor: item: Artículo buyer: Comprador @@ -182,35 +176,35 @@ item: intrastat: Intrastat origin: Origen summary: - basicData: 'Datos básicos' - otherData: 'Otros datos' - description: 'Descripción' - tax: 'IVA' - tags: 'Etiquetas' - botanical: 'Botánico' - barcode: 'Código de barras' - name: 'Nombre' - completeName: 'Nombre completo' - family: 'Familia' - size: 'Medida' - origin: 'Origen' - stems: 'Tallos' - multiplier: 'Multiplicador' - buyer: 'Comprador' - doPhoto: 'Hacer foto' - intrastatCode: 'Código intrastat' - intrastat: 'Intrastat' - ref: 'Referencia' - relevance: 'Relevancia' - weight: 'Peso (gramos)/tallo' - units: 'Unidades/caja' - expense: 'Gasto' - generic: 'Genérico' - recycledPlastic: 'Plástico reciclado' - nonRecycledPlastic: 'Plástico no reciclado' - minSalesQuantity: 'Cantidad mínima de venta' - genus: 'Genus' - specie: 'Specie' + basicData: Datos básicos + otherData: Otros datos + description: Descripción + tax: IVA + tags: Etiquetas + botanical: Botánico + barcode: Código de barras + name: Nombre + completeName: Nombre completo + family: Familia + size: Medida + origin: Origen + stems: Tallos + multiplier: Multiplicador + buyer: Comprador + doPhoto: Hacer foto + intrastatCode: Código intrastat + intrastat: Intrastat + ref: Referencia + relevance: Relevancia + weight: Peso (gramos)/tallo + units: Unidades/caja + expense: Gasto + generic: Genérico + recycledPlastic: Plástico reciclado + nonRecycledPlastic: Plástico no reciclado + minSalesQuantity: Cantidad mínima de venta + genus: Genus + specie: Specie regularizeStock: Regularizar stock buyRequest: ticketId: 'ID Ticket' @@ -222,6 +216,6 @@ item: item: 'Artículo' achieved: 'Conseguido' concept: 'Concepto' - state: 'Estado' + state: 'Estado' search: 'Buscar artículo' - searchInfo: 'Puedes buscar por id' + searchInfo: 'Puedes buscar por id' \ No newline at end of file diff --git a/src/router/modules/item.js b/src/router/modules/item.js index 125be4d5d..b47841ef4 100644 --- a/src/router/modules/item.js +++ b/src/router/modules/item.js @@ -8,14 +8,14 @@ const itemCard = { meta: { menu: [ 'ItemBasicData', - 'ItemLog', - 'ItemDiary', 'ItemTags', + 'ItemLastEntries', 'ItemTax', 'ItemBotanical', - 'ItemBarcode', 'ItemShelving', - 'ItemLastEntries', + 'ItemBarcode', + 'ItemDiary', + 'ItemLog', ], }, children: [ @@ -37,24 +37,6 @@ const itemCard = { }, component: () => import('src/pages/Item/Card/ItemBasicData.vue'), }, - { - path: 'log', - name: 'ItemLog', - meta: { - title: 'log', - icon: 'vn:History', - }, - component: () => import('src/pages/Item/Card/ItemLog.vue'), - }, - { - path: 'diary', - name: 'ItemDiary', - meta: { - title: 'diary', - icon: 'vn:transaction', - }, - component: () => import('src/pages/Item/Card/ItemDiary.vue'), - }, { path: 'tags', name: 'ItemTags', @@ -64,6 +46,15 @@ const itemCard = { }, component: () => import('src/pages/Item/Card/ItemTags.vue'), }, + { + path: 'last-entries', + name: 'ItemLastEntries', + meta: { + title: 'lastEntries', + icon: 'vn:regentry', + }, + component: () => import('src/pages/Item/Card/ItemLastEntries.vue'), + }, { path: 'tax', name: 'ItemTax', @@ -82,15 +73,6 @@ const itemCard = { }, component: () => import('src/pages/Item/Card/ItemBotanical.vue'), }, - { - path: 'barcode', - name: 'ItemBarcode', - meta: { - title: 'barcode', - icon: 'vn:barcode', - }, - component: () => import('src/pages/Item/Card/ItemBarcode.vue'), - }, { path: 'shelving', name: 'ItemShelving', @@ -101,13 +83,31 @@ const itemCard = { component: () => import('src/pages/Item/Card/ItemShelving.vue'), }, { - path: 'last-entries', - name: 'ItemLastEntries', + path: 'barcode', + name: 'ItemBarcode', meta: { - title: 'lastEntries', - icon: 'vn:regentry', + title: 'barcode', + icon: 'vn:barcode', }, - component: () => import('src/pages/Item/Card/ItemLastEntries.vue'), + component: () => import('src/pages/Item/Card/ItemBarcode.vue'), + }, + { + path: 'diary', + name: 'ItemDiary', + meta: { + title: 'diary', + icon: 'vn:transaction', + }, + component: () => import('src/pages/Item/Card/ItemDiary.vue'), + }, + { + path: 'log', + name: 'ItemLog', + meta: { + title: 'log', + icon: 'vn:History', + }, + component: () => import('src/pages/Item/Card/ItemLog.vue'), }, ], };