0
1
Fork 0

Add different translations for header titles and menu titles

This commit is contained in:
William Buezas 2024-09-29 20:30:16 -03:00
parent 477c42b964
commit 2eb0963829
7 changed files with 278 additions and 144 deletions

View File

@ -51,34 +51,59 @@ export default {
of: 'de', of: 'de',
// Sections titles // Sections titles
Home: 'Inici', titles: {
Orders: 'Comandes', Home: 'Inici',
Ticket: `Detall de l'encarrec`, Orders: 'Comandes',
'Pending orders': 'Comandes pendents', Ticket: `Detall de l'encarrec`,
'Last orders': 'Comandes confirmades', 'Pending orders': 'Comandes pendents',
Invoices: 'Factures', 'Last orders': 'Comandes confirmades',
Basket: 'Cistella', Invoices: 'Factures',
Catalog: 'Catàleg', Basket: 'Cistella',
Administration: 'Administració', Catalog: 'Catàleg',
'Control panel': 'Panell de control', Administration: 'Administració',
Users: 'Usuaris', 'Control panel': 'Panell de control',
Connections: 'Connexions', Users: 'Usuaris',
Visits: 'Visites', Connections: 'Connexions',
News: 'Gestió de noticies', Visits: 'Visites',
Photos: 'Imatges', News: 'Gestió de noticies',
Images: 'Imatges', Photos: 'Imatges',
Items: 'Articles', Images: 'Imatges',
Agencies: 'Paquets per agència', Items: 'Articles',
Reports: 'Informes', Agencies: 'Paquets per agència',
Configuration: 'Configuració', Reports: 'Informes',
Shelves: 'Prestatgeries', Configuration: 'Configuració',
Account: 'Compte', Shelves: 'Prestatgeries',
Addresses: 'Adreces', Account: 'Compte',
OrderSummary: 'Resum de la comanda', Addresses: 'Adreces',
Checkout: `Configurar l'encarrec`, OrderSummary: 'Resum de la comanda',
'Address details': 'Configuració', Checkout: `Configurar l'encarrec`,
'Admin news details': `Afegir o editar notícia`, 'Address details': 'Configuració',
'Access log': 'Registre daccés', 'Admin news details': `Afegir o editar notícia`,
'Access log': 'Registre daccés'
},
menuTitles: {
Home: 'Inici',
Orders: 'Comandes',
Basket: 'Cistella',
Catalog: 'Catàleg',
Administration: 'Administració',
Agencies: 'Agències',
Reports: 'Informes',
Shelves: 'Prestatgeries',
Configuration: 'Configuració',
'Pending orders': 'Pendents',
'Last orders': 'Confirmades',
Invoices: 'Factures',
'Control panel': 'Panell de control',
Users: 'Usuaris',
Connections: 'Connexions',
Visits: 'Visites',
News: 'Gestió de notícies',
Photos: 'Imatges',
Items: 'Articles',
Account: 'Compte',
Addresses: 'Adreces'
},
// //
orderLoadedIntoBasket: 'Comanda carregada a la cistella!', orderLoadedIntoBasket: 'Comanda carregada a la cistella!',
loadAnOrder: loadAnOrder:

View File

@ -63,34 +63,60 @@ export default {
}, },
// Sections titles // Sections titles
Home: 'Home', titles: {
Orders: 'Orders', Home: 'Home',
Ticket: 'Detalle del pedido', Orders: 'Orders',
'Pending orders': 'Pending orders', Ticket: 'Detalle del pedido',
'Last orders': 'Confirmed orders', 'Pending orders': 'Pending orders',
Invoices: 'Invoices', 'Last orders': 'Confirmed orders',
Basket: 'Basket', Invoices: 'Invoices',
Catalog: 'Catalog', Basket: 'Basket',
Administration: 'Administration', Catalog: 'Catalog',
'Control panel': 'Control panel', Administration: 'Administration',
Users: 'Users', 'Control panel': 'Control panel',
Connections: 'Connections', Users: 'Users',
Visits: 'Visits', Connections: 'Connections',
News: 'News management', Visits: 'Visits',
Photos: 'Images', News: 'News management',
Images: 'Images', Photos: 'Images',
Items: 'Items', Images: 'Images',
Agencies: 'Bundles by agency', Items: 'Items',
Reports: 'Reports', Agencies: 'Bundles by agency',
Configuration: 'Configuration', Reports: 'Reports',
Shelves: 'Shelves', Configuration: 'Configuration',
Account: 'Account', Shelves: 'Shelves',
Addresses: 'Addresses', Account: 'Account',
OrderSummary: 'Order summary', Addresses: 'Addresses',
Checkout: 'Configure order', OrderSummary: 'Order summary',
'Address details': 'Configuration', Checkout: 'Configure order',
'Admin news details': 'Add or edit new', 'Address details': 'Configuration',
'Access log': 'Access log', 'Admin news details': 'Add or edit new',
'Access log': 'Access log'
},
menuTitles: {
Home: 'Home',
Orders: 'Orders',
Basket: 'Basket',
Catalog: 'Catalog',
Administration: 'Administration',
Agencies: 'Agencies',
Reports: 'Reports',
Shelves: 'Shelves',
Configuration: 'Configuration',
'Pending orders': 'Pending',
'Last orders': 'Confirmed',
Invoices: 'Invoices',
'Control panel': 'Control panel',
Users: 'Users',
Connections: 'Connections',
Visits: 'Visits',
News: 'News',
Photos: 'Images',
Items: 'Items',
Account: 'Account',
Addresses: 'Addresses'
},
// //
orderLoadedIntoBasket: 'Order loaded into basket!', orderLoadedIntoBasket: 'Order loaded into basket!',
loadAnOrder: 'Please load a pending order to the cart or start a new one', loadAnOrder: 'Please load a pending order to the cart or start a new one',

View File

@ -60,34 +60,60 @@ export default {
}, },
// Sections titles // Sections titles
Home: 'Inicio', titles: {
Orders: 'Pedidos', Home: 'Inicio',
Ticket: 'Pedido', Orders: 'Pedidos',
'Pending orders': 'Pedidos pendientes', Ticket: 'Pedido',
'Last orders': 'Pedidos confirmados', 'Pending orders': 'Pedidos pendientes',
Invoices: 'Facturas', 'Last orders': 'Pedidos confirmados',
Basket: 'Cesta', Invoices: 'Facturas',
Catalog: 'Catálogo', Basket: 'Cesta',
Administration: 'Administración', Catalog: 'Catálogo',
'Control panel': 'Panel de control', Administration: 'Administración',
Users: 'Usuarios', 'Control panel': 'Panel de control',
Connections: 'Conexiones', Users: 'Usuarios',
Visits: 'Visitas', Connections: 'Conexiones',
News: 'Gestión de noticias', Visits: 'Visitas',
Photos: 'Imágenes', News: 'Gestión de noticias',
Images: 'Imágenes', Photos: 'Imágenes',
Items: 'Artículos', Images: 'Imágenes',
Agencies: 'Bultos por agencia', Items: 'Artículos',
Reports: 'Informes', Agencies: 'Bultos por agencia',
Configuration: 'Configuración', Reports: 'Informes',
Shelves: 'Estanterías', Configuration: 'Configuración',
Account: 'Cuenta', Shelves: 'Estanterías',
Addresses: 'Direcciones', Account: 'Cuenta',
OrderSummary: 'Resumen del pedido', Addresses: 'Direcciones',
Checkout: 'Configurar pedido', OrderSummary: 'Resumen del pedido',
'Address details': 'Configuración', Checkout: 'Configurar pedido',
'Admin news details': 'Añadir o editar noticia', 'Address details': 'Configuración',
'Access log': 'Registro de accesos', 'Admin news details': 'Añadir o editar noticia',
'Access log': 'Registro de accesos'
},
menuTitles: {
Home: 'Inicio',
Orders: 'Pedidos',
Basket: 'Cesta',
Catalog: 'Catálogo',
Administration: 'Administración',
Agencies: 'Agencias',
Reports: 'Informes',
Shelves: 'Estanterías',
Configuration: 'Configuración',
'Pending orders': 'Pendientes',
'Last orders': 'Confirmados',
Invoices: 'Facturas',
'Control panel': 'Panel de control',
Users: 'Usuarios',
Connections: 'Conexiones',
Visits: 'Visitas',
News: 'Noticias',
Photos: 'Imágenes',
Items: 'Artículos',
Account: 'Cuenta',
Addresses: 'Direcciones'
},
// //
orderLoadedIntoBasket: '¡Pedido cargado en la cesta!', orderLoadedIntoBasket: '¡Pedido cargado en la cesta!',
loadAnOrder: loadAnOrder:

View File

@ -51,34 +51,60 @@ export default {
of: 'de', of: 'de',
// Sections titles // Sections titles
Home: 'Accueil', titles: {
Orders: 'Commandes', Home: 'Accueil',
Ticket: 'Détail de la commande', Orders: 'Commandes',
'Pending orders': 'Commandes en attente', Ticket: 'Détail de la commande',
'Last orders': 'Commandes confirmées', 'Pending orders': 'Commandes en attente',
Invoices: 'Factures', 'Last orders': 'Commandes confirmées',
Basket: 'Panier', Invoices: 'Factures',
Catalog: 'Catalogue', Basket: 'Panier',
Administration: 'Administration', Catalog: 'Catalogue',
'Control panel': 'Panneau de configuration', Administration: 'Administration',
Users: 'Utilisateurs', 'Control panel': 'Panneau de configuration',
Connections: 'Connexions', Users: 'Utilisateurs',
Visits: 'Visites', Connections: 'Connexions',
News: 'Gestion des nouvelles', Visits: 'Visites',
Photos: 'Images', News: 'Gestion des nouvelles',
Images: 'Images', Photos: 'Images',
Items: 'Articles', Images: 'Images',
Agencies: 'Liste par agence', Items: 'Articles',
Reports: 'Rapports', Agencies: 'Liste par agence',
Configuration: 'Configuration', Reports: 'Rapports',
Shelves: 'Étagères', Configuration: 'Configuration',
Account: 'Compte', Shelves: 'Étagères',
Addresses: 'Adresses', Account: 'Compte',
OrderSummary: 'Résumé de la commande', Addresses: 'Adresses',
Checkout: 'Configurer la commande', OrderSummary: 'Résumé de la commande',
'Address details': 'Configuration', Checkout: 'Configurer la commande',
'Admin news details': 'Ajouter ou éditer une nouvelle', 'Address details': 'Configuration',
'Access log': "Journal d'accès", 'Admin news details': 'Ajouter ou éditer une nouvelle',
'Access log': "Journal d'accès"
},
menuTitles: {
Home: 'Accueil',
Orders: 'Commandes',
Basket: 'Panier',
Catalog: 'Catalogue',
Administration: 'Administration',
Agencies: 'Agences',
Reports: 'Rapports',
Shelves: 'Étagères',
Configuration: 'Configuration',
'Pending orders': 'En attente',
'Last orders': 'Confirmées',
Invoices: 'Factures',
'Control panel': 'Panneau de configuration',
Users: 'Utilisateurs',
Connections: 'Connexions',
Visits: 'Visites',
News: 'Nouvelles',
Photos: 'Images',
Items: 'Articles',
Account: 'Compte',
Addresses: 'Adresses'
},
// //
orderLoadedIntoBasket: 'Commande chargée dans le panier!', orderLoadedIntoBasket: 'Commande chargée dans le panier!',
loadAnOrder: loadAnOrder:

View File

@ -50,34 +50,59 @@ export default {
}, },
of: 'de', of: 'de',
// Sections titles // Sections titles
Home: 'Início', titles: {
Orders: 'Pedidos', Home: 'Início',
Ticket: 'Detalhe do pedido', Orders: 'Pedidos',
'Pending orders': 'Pedidos pendentes', Ticket: 'Detalhe do pedido',
'Last orders': 'Pedidos confirmados', 'Pending orders': 'Pedidos pendentes',
Invoices: 'Faturas', 'Last orders': 'Pedidos confirmados',
Basket: 'Carrinho', Invoices: 'Faturas',
Catalog: 'Catálogo', Basket: 'Carrinho',
Administration: 'Administração', Catalog: 'Catálogo',
'Control panel': 'Painel de controle', Administration: 'Administração',
Users: 'Usuários', 'Control panel': 'Painel de controle',
Connections: 'Conexões', Users: 'Usuários',
Visits: 'Visitas', Connections: 'Conexões',
News: 'Gestão de noticias', Visits: 'Visitas',
Photos: 'Imagens', News: 'Gestão de noticias',
Images: 'Imagens', Photos: 'Imagens',
Items: 'Artigos', Images: 'Imagens',
Agencies: 'Bultos por agencia', Items: 'Artigos',
Reports: 'Informes', Agencies: 'Bultos por agencia',
Configuration: 'Configuração', Reports: 'Informes',
Shelves: 'Estantes', Configuration: 'Configuração',
Account: 'Conta', Shelves: 'Estantes',
Addresses: 'Moradas', Account: 'Conta',
OrderSummary: 'Resumo da encomenda', Addresses: 'Moradas',
Checkout: 'Configurar encomenda', OrderSummary: 'Resumo da encomenda',
'Address details': 'Configuração', Checkout: 'Configurar encomenda',
'Admin news details': 'Adicionar ou editar notícia', 'Address details': 'Configuração',
'Access log': 'Registo de acessos', 'Admin news details': 'Adicionar ou editar notícia',
'Access log': 'Registo de acessos'
},
menuTitles: {
Home: 'Início',
Orders: 'Pedidos',
Basket: 'Carrinho',
Catalog: 'Catálogo',
Administration: 'Administração',
Agencies: 'Agências',
Reports: 'Informes',
Shelves: 'Estantes',
Configuration: 'Configuração',
'Pending orders': 'Pendentes',
'Last orders': 'Confirmados',
Invoices: 'Faturas',
'Control panel': 'Painel de controle',
Users: 'Usuários',
Connections: 'Conexões',
Visits: 'Visitas',
News: 'Notícias',
Photos: 'Imagens',
Items: 'Artigos',
Account: 'Conta',
Addresses: 'Moradas'
},
// //
orderLoadedIntoBasket: 'Pedido carregado na cesta!', orderLoadedIntoBasket: 'Pedido carregado na cesta!',
loadAnOrder: 'Carregue um pedido pendente no carrinho ou inicie um novo', loadAnOrder: 'Carregue um pedido pendente no carrinho ou inicie um novo',

View File

@ -93,12 +93,14 @@ const logoutSupplantedUser = async () => {
<QList v-for="item in menuEssentialLinks" :key="item.id"> <QList v-for="item in menuEssentialLinks" :key="item.id">
<QItem v-if="!item.childs" :to="`/${item.path}`"> <QItem v-if="!item.childs" :to="`/${item.path}`">
<QItemSection> <QItemSection>
<QItemLabel>{{ $t(item.description) }}</QItemLabel> <QItemLabel>{{
$t(`menuTitles.${item.description}`)
}}</QItemLabel>
</QItemSection> </QItemSection>
</QItem> </QItem>
<QExpansionItem <QExpansionItem
v-if="item.childs" v-if="item.childs"
:label="$t(item.description)" :label="$t(`menuTitles.${item.description}`)"
expand-separator expand-separator
> >
<QList> <QList>
@ -110,7 +112,9 @@ const logoutSupplantedUser = async () => {
> >
<QItemSection> <QItemSection>
<QItemLabel> <QItemLabel>
{{ $t(subitem.description) }} {{
$t(`menuTitles.${subitem.description}`)
}}
</QItemLabel> </QItemLabel>
</QItemSection> </QItemSection>
</QItem> </QItem>

View File

@ -41,7 +41,9 @@ export default route(function (/* { store, ssrContext } */) {
if (from.name === to.name) return; if (from.name === to.name) return;
const app = useAppStore(); const app = useAppStore();
app.$patch({ app.$patch({
title: i18n.global.t(to.meta.title || 'home'), title: i18n.global.t(
to.meta.title ? `titles.${to.meta.title}` : 'home'
),
subtitle: null, subtitle: null,
useRightDrawer: false, useRightDrawer: false,
rightDrawerOpen: true rightDrawerOpen: true