0
1
Fork 0

Add menu translations

This commit is contained in:
William Buezas 2024-09-07 19:34:22 -03:00
parent 2bff9304e8
commit c41d1430f7
8 changed files with 213 additions and 109 deletions

View File

@ -40,26 +40,35 @@ export default {
]
},
of: 'de',
// Menu
home: 'Inici',
catalog: 'Catàleg',
pendingOrders: 'Comandes pendents',
confirmedOrders: 'Comandes confirmades',
invoices: 'Factures',
agencyPackages: 'Paquets per agència',
accountConfig: 'Configuració',
addressesList: 'Adreces',
addressDetails: 'Configuració',
checkout: 'Configurar encàrrec',
controlPanel: 'Panell de control',
adminConnections: 'Connexions',
adminItems: 'Articles',
adminVisits: 'Visites',
adminUsers: "Gestió d'usuaris",
adminPhotos: 'Imatges',
adminNews: 'Gestió de noticies',
adminNewsDetails: 'Afegir o editar notícia',
basket: 'Cistella de la compra',
// 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: 'Notícies',
Photos: 'Imatges',
Images: 'Imatges',
Items: 'Articles',
Agencies: 'Agències',
Reports: 'Informes',
Configuration: 'Configuració',
Shelves: 'Prestatgeries',
Account: 'Compte',
Addresses: 'Adreces',
Confirm: 'Confirmar',
Checkout: `Configurar l'encarrec`,
'Address details': 'Configuració',
'Admin news details': `Afegir o editar notícia`,
//
orderLoadedIntoBasket: 'Comanda carregada a la cistella!',
loadAnOrder:

View File

@ -53,26 +53,34 @@ export default {
]
},
// menu
home: 'Home',
catalog: 'Catalog',
pendingOrders: 'Pending orders',
confirmedOrders: 'Confirmed orders',
invoices: 'Invoices',
agencyPackages: 'Bundles by agency',
accountConfig: 'Configuration',
addressesList: 'Addresses',
addressDetails: 'Configuration',
checkout: 'Configure order',
controlPanel: 'Control panel',
adminConnections: 'Connections',
adminItems: 'Items',
adminVisits: 'Visits',
adminUsers: 'User management',
adminPhotos: 'Images',
adminNews: 'News management',
adminNewsDetails: 'Add or edit new',
basket: 'Shopping basket',
// 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',
Photos: 'Images',
Images: 'Images',
Items: 'Items',
Agencies: 'Agencies',
Reports: 'Reports',
Configuration: 'Configuration',
Shelves: 'Shelves',
Account: 'Account',
Addresses: 'Addresses',
Confirm: 'Confirm',
Checkout: 'Configure order',
'Address details': 'Configuration',
'Admin news details': 'Add or edit new',
//
orderLoadedIntoBasket: 'Order loaded into basket!',
loadAnOrder: 'Please load a pending order to the cart or start a new one',

View File

@ -59,26 +59,34 @@ export default {
]
},
// Menu
home: 'Inicio',
catalog: 'Catálogo',
pendingOrders: 'Pedidos pendientes',
confirmedOrders: 'Pedidos confirmados',
invoices: 'Facturas',
agencyPackages: 'Bultos por agencia',
accountConfig: 'Configuración',
addressesList: 'Direcciones',
addressDetails: 'Configuración',
checkout: 'Configurar pedido',
controlPanel: 'Panel de control',
adminConnections: 'Conexiones',
adminItems: 'Artículos',
adminVisits: 'Visitas',
adminUsers: 'Gestión de usuarios',
adminPhotos: 'Imágenes',
adminNews: 'Gestión de noticias',
adminNewsDetails: 'Añadir o editar noticia',
basket: 'Cesta de la compra',
// 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: 'Noticias',
Photos: 'Imágenes',
Images: 'Imágenes',
Items: 'Artículos',
Agencies: 'Agencias',
Reports: 'Informes',
Configuration: 'Configuración',
Shelves: 'Estanterías',
Account: 'Cuenta',
Addresses: 'Direcciones',
Confirm: 'Confirmar',
Checkout: 'Configurar pedido',
'Address details': 'Configuración',
'Admin news details': 'Añadir o editar noticia',
//
orderLoadedIntoBasket: '¡Pedido cargado en la cesta!',
loadAnOrder:

View File

@ -40,27 +40,35 @@ export default {
]
},
of: 'de',
// Menu
home: 'Accueil',
catalog: 'Catalogue',
pendingOrders: 'Commandes en attente',
confirmedOrders: 'Commandes confirmées',
invoices: 'Factures',
agencyPackages: 'Liste par agence',
accountConfig: 'Configuration',
addressesList: 'Adresses',
addressDetails: 'Configuration',
checkout: "Définissez l'ordre",
controlPanel: 'Panneau de configuration',
adminConnections: 'Connexions',
adminItems: 'Articles',
adminVisits: 'Visites',
adminUsers: 'Gestion des utilisateurs',
adminPhotos: 'Images',
adminNews: 'Gestion des nouvelles',
adminNewsDetails: 'Ajouter ou editer nouvelles',
emptyList: 'Vider la liste',
basket: 'Panier',
// 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: 'Nouvelles',
Photos: 'Images',
Images: 'Images',
Items: 'Articles',
Agencies: 'Agences',
Reports: 'Rapports',
Configuration: 'Configuration',
Shelves: 'Étagères',
Account: 'Compte',
Addresses: 'Adresses',
Confirm: 'Confirmer',
Checkout: 'Configurer la commande',
'Address details': 'Configuration',
'Admin news details': 'Ajouter ou éditer une nouvelle',
//
orderLoadedIntoBasket: 'Commande chargée dans le panier!',
loadAnOrder:

View File

@ -40,28 +40,34 @@ export default {
]
},
of: 'de',
// Menu
home: 'Principio',
catalog: 'Catálogo',
pendingOrders: 'Pedidos pendentes',
confirmedOrders: 'Pedidos confirmados',
invoices: 'Facturas',
agencyPackages: 'Bultos por agencia',
accountConfig: 'Configuração',
addressesList: 'Moradas',
addressDetails: 'Configuração',
checkout: 'Configurar encomenda',
controlPanel: 'Painel de controle',
adminConnections: 'Conexões',
adminItems: 'Artigos',
adminVisits: 'Visitas',
adminUsers: 'Gestão de usuários',
adminPhotos: 'Imagens',
adminNews: 'Gestão de notícias',
adminNewsDetails: 'Ajouter ou editer nouvelles',
emptyList: 'Lista vazia',
basket: 'Cesta da compra',
// 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: 'Notícias',
Photos: 'Imagens',
Images: 'Imagens',
Items: 'Artigos',
Agencies: 'Agências',
Reports: 'Informes',
Configuration: 'Configuração',
Shelves: 'Estantes',
Account: 'Conta',
Addresses: 'Moradas',
Confirm: 'Confirme',
Checkout: 'Configurar encomenda',
'Address details': 'Configuração',
'Admin news details': 'Adicionar ou editar notícia',
//
orderLoadedIntoBasket: 'Pedido carregado na cesta!',
loadAnOrder: 'Carregue um pedido pendente no carrinho ou inicie um novo',

View File

@ -1,5 +1,6 @@
<script setup>
import { ref, onMounted } from 'vue';
import { useI18n } from 'vue-i18n';
import { storeToRefs } from 'pinia';
import { useRouter } from 'vue-router';
@ -7,6 +8,7 @@ import { useRouter } from 'vue-router';
import { useUserStore } from 'stores/user';
import { useAppStore } from 'stores/app';
const { t } = useI18n();
const router = useRouter();
const userStore = useUserStore();
const appStore = useAppStore();
@ -95,12 +97,12 @@ const logoutSupplantedUser = async () => {
<QList v-for="item in menuEssentialLinks" :key="item.id">
<QItem v-if="!item.childs" :to="`/${item.path}`">
<QItemSection>
<QItemLabel>{{ item.description }}</QItemLabel>
<QItemLabel>{{ t(item.description) }}</QItemLabel>
</QItemSection>
</QItem>
<QExpansionItem
v-if="item.childs"
:label="item.description"
:label="t(item.description)"
expand-separator
>
<QList>
@ -112,7 +114,7 @@ const logoutSupplantedUser = async () => {
>
<QItemSection>
<QItemLabel>
{{ subitem.description }}
{{ t(subitem.description) }}
</QItemLabel>
</QItemSection>
</QItem>

View File

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

View File

@ -32,106 +32,169 @@ const routes = [
{
name: 'home',
path: '/cms/home',
meta: {
title: 'Home'
},
component: () => import('src/pages/Cms/HomeView.vue')
},
{
name: 'confirmedOrders',
path: '/ecomerce/orders',
meta: {
title: 'Last orders'
},
component: () => import('pages/Ecomerce/OrdersView.vue')
},
{
name: 'ticket',
path: '/ecomerce/ticket/:id',
meta: {
title: 'Ticket'
},
component: () => import('pages/Ecomerce/TicketView.vue')
},
{
name: 'invoices',
path: '/ecomerce/invoices',
meta: {
title: 'Invoices'
},
component: () => import('pages/Ecomerce/InvoicesView.vue')
},
{
name: 'pendingOrders',
path: '/ecomerce/pending',
meta: {
title: 'Pending orders'
},
component: () => import('pages/Ecomerce/PendingOrders.vue')
},
{
name: 'catalog',
path: '/ecomerce/catalog/:category?/:type?',
meta: {
title: 'Catalog'
},
component: () => import('pages/Ecomerce/Catalog.vue')
},
{
name: 'basket',
path: '/ecomerce/basket/:id?',
meta: {
title: 'Basket'
},
component: () => import('pages/Ecomerce/BasketView.vue')
},
{
name: 'confirm',
path: '/ecomerce/confirm/:id?',
meta: {
title: 'Confirm'
},
component: () => import('pages/Ecomerce/ConfirmView.vue')
},
{
name: 'checkout',
path: '/ecomerce/checkout/:id?',
meta: {
title: 'Checkout'
},
component: () => import('pages/Ecomerce/CheckoutView.vue')
},
{
name: 'agencyPackages',
path: '/agencies/packages',
meta: {
title: 'Agencies'
},
component: () => import('src/pages/Agencies/PackagesView.vue')
},
{
name: 'accountConfig',
path: '/account/conf',
meta: {
title: 'Account'
},
component: () => import('pages/Account/AccountConfig.vue')
},
{
name: 'addressesList',
path: '/account/address-list',
meta: {
title: 'Addresses'
},
component: () => import('pages/Account/AddressList.vue')
},
{
name: 'addressDetails',
path: '/account/address/:id?',
meta: {
title: 'Address details'
},
component: () => import('pages/Account/AddressDetails.vue')
},
{
name: 'controlPanel',
path: 'admin/links',
meta: {
title: 'Control panel'
},
component: () => import('pages/Admin/LinksView.vue')
},
{
name: 'adminUsers',
path: 'admin/users',
meta: {
title: 'Users'
},
component: () => import('pages/Admin/UsersView.vue')
},
{
name: 'adminConnections',
path: 'admin/connections',
meta: {
title: 'Connections'
},
component: () => import('pages/Admin/ConnectionsView.vue')
},
{
name: 'adminVisits',
path: 'admin/visits',
meta: {
title: 'Visits'
},
component: () => import('pages/Admin/VisitsView.vue')
},
{
name: 'adminNews',
path: 'news/news',
meta: {
title: 'News'
},
component: () => import('pages/Admin/NewsView.vue')
},
{
name: 'adminNewsDetails',
path: 'news/new/:id?',
meta: {
title: 'Admin news details'
},
component: () => import('pages/Admin/NewsDetails.vue')
},
{
name: 'adminPhotos',
path: 'admin/photos',
meta: {
title: 'Photos'
},
component: () => import('pages/Admin/PhotosView.vue')
},
{
name: 'adminItems',
path: 'admin/items',
meta: {
title: 'Items'
},
component: () => import('pages/Admin/ItemsView.vue')
}
]