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',
// Sections titles
Home: 'Inici',
Orders: 'Comandes',
Ticket: `Detall de l'encarrec`,
'Pending orders': 'Comandes pendents',
'Last orders': 'Comandes confirmades',
Invoices: 'Factures',
Basket: 'Cistella',
Catalog: 'Catàleg',
Administration: 'Administració',
'Control panel': 'Panell de control',
Users: 'Usuaris',
Connections: 'Connexions',
Visits: 'Visites',
News: 'Gestió de noticies',
Photos: 'Imatges',
Images: 'Imatges',
Items: 'Articles',
Agencies: 'Paquets per agència',
Reports: 'Informes',
Configuration: 'Configuració',
Shelves: 'Prestatgeries',
Account: 'Compte',
Addresses: 'Adreces',
OrderSummary: 'Resum de la comanda',
Checkout: `Configurar l'encarrec`,
'Address details': 'Configuració',
'Admin news details': `Afegir o editar notícia`,
'Access log': 'Registre daccés',
titles: {
Home: 'Inici',
Orders: 'Comandes',
Ticket: `Detall de l'encarrec`,
'Pending orders': 'Comandes pendents',
'Last orders': 'Comandes confirmades',
Invoices: 'Factures',
Basket: 'Cistella',
Catalog: 'Catàleg',
Administration: 'Administració',
'Control panel': 'Panell de control',
Users: 'Usuaris',
Connections: 'Connexions',
Visits: 'Visites',
News: 'Gestió de noticies',
Photos: 'Imatges',
Images: 'Imatges',
Items: 'Articles',
Agencies: 'Paquets per agència',
Reports: 'Informes',
Configuration: 'Configuració',
Shelves: 'Prestatgeries',
Account: 'Compte',
Addresses: 'Adreces',
OrderSummary: 'Resum de la comanda',
Checkout: `Configurar l'encarrec`,
'Address details': 'Configuració',
'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!',
loadAnOrder:

View File

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

View File

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

View File

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

View File

@ -50,34 +50,59 @@ export default {
},
of: 'de',
// Sections titles
Home: 'Início',
Orders: 'Pedidos',
Ticket: 'Detalhe do pedido',
'Pending orders': 'Pedidos pendentes',
'Last orders': 'Pedidos confirmados',
Invoices: 'Faturas',
Basket: 'Carrinho',
Catalog: 'Catálogo',
Administration: 'Administração',
'Control panel': 'Painel de controle',
Users: 'Usuários',
Connections: 'Conexões',
Visits: 'Visitas',
News: 'Gestão de noticias',
Photos: 'Imagens',
Images: 'Imagens',
Items: 'Artigos',
Agencies: 'Bultos por agencia',
Reports: 'Informes',
Configuration: 'Configuração',
Shelves: 'Estantes',
Account: 'Conta',
Addresses: 'Moradas',
OrderSummary: 'Resumo da encomenda',
Checkout: 'Configurar encomenda',
'Address details': 'Configuração',
'Admin news details': 'Adicionar ou editar notícia',
'Access log': 'Registo de acessos',
titles: {
Home: 'Início',
Orders: 'Pedidos',
Ticket: 'Detalhe do pedido',
'Pending orders': 'Pedidos pendentes',
'Last orders': 'Pedidos confirmados',
Invoices: 'Faturas',
Basket: 'Carrinho',
Catalog: 'Catálogo',
Administration: 'Administração',
'Control panel': 'Painel de controle',
Users: 'Usuários',
Connections: 'Conexões',
Visits: 'Visitas',
News: 'Gestão de noticias',
Photos: 'Imagens',
Images: 'Imagens',
Items: 'Artigos',
Agencies: 'Bultos por agencia',
Reports: 'Informes',
Configuration: 'Configuração',
Shelves: 'Estantes',
Account: 'Conta',
Addresses: 'Moradas',
OrderSummary: 'Resumo da encomenda',
Checkout: 'Configurar encomenda',
'Address details': 'Configuração',
'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!',
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">
<QItem v-if="!item.childs" :to="`/${item.path}`">
<QItemSection>
<QItemLabel>{{ $t(item.description) }}</QItemLabel>
<QItemLabel>{{
$t(`menuTitles.${item.description}`)
}}</QItemLabel>
</QItemSection>
</QItem>
<QExpansionItem
v-if="item.childs"
:label="$t(item.description)"
:label="$t(`menuTitles.${item.description}`)"
expand-separator
>
<QList>
@ -110,7 +112,9 @@ const logoutSupplantedUser = async () => {
>
<QItemSection>
<QItemLabel>
{{ $t(subitem.description) }}
{{
$t(`menuTitles.${subitem.description}`)
}}
</QItemLabel>
</QItemSection>
</QItem>

View File

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