@@ -9,7 +12,7 @@
-
Notificación
+
{{ t('global.notification') }}
{{ notifications.text }}
diff --git a/src/i18n/en.js b/src/i18n/en.js
new file mode 100644
index 0000000..ecd68d1
--- /dev/null
+++ b/src/i18n/en.js
@@ -0,0 +1,197 @@
+const en = {
+ labels: {
+ email: 'Email',
+ password: 'Password',
+ password2: 'New password',
+ password3: 'Confirm Password',
+ code: 'Enter the code',
+ questionCompany: 'What is the name of the company?',
+ questionRfc: "What is the company's RFC?",
+ questionSegments: 'What segments does the company belong to?',
+ questionSates: "What are the company's loading locations by state?",
+ questionCities: "What are the company's loading locations by city?",
+ questionTrucks: "What type of transport does the company use?",
+ infoCompanies: 'Additional company information',
+ questionSignOut: 'Are you sure to sign out?',
+ selectSegment: 'Search by segment',
+ selectTruck: 'Search by type of transport',
+ selectState: 'Search by state',
+ selectCity: 'Search by city',
+ names: 'Name(s)',
+ lastnames: 'Last name',
+ phone: 'Phone',
+ phone1: 'Phone 1',
+ phone2: 'Phone 2',
+ typeCompany: 'Type of company',
+ codeId: 'Code',
+ dateMembership: 'Company member since',
+ segmentsCompany: 'Company segments',
+ locationLoadState: 'Load locations by state',
+ locationLoadCity: 'Load locations by city',
+ truckUsed: 'Transports used',
+ infoCompany: 'General company information',
+ registryNumber: "Registry number",
+ userRole: "User role",
+ userInfo: "Additional User Information",
+ memberSince: "Member since",
+ createUser: 'Create user',
+ editUser: 'Edit user',
+ selectedRol: 'Select Role',
+ manager: 'Manager',
+ staff: 'Staff',
+ driver: 'Driver',
+ filters: 'Filters',
+ location: 'Location',
+ both: 'Both',
+ load: 'Load',
+ download: 'Download',
+ select: 'Select',
+ additionalInformation: 'Additional information',
+ writeHere: 'Write here',
+ },
+ buttons: {
+ enter: "Enter here",
+ signup: "Sign up here",
+ continue: "Continue",
+ back: "Go back",
+ resendCode: "Resend code",
+ terms: 'Terms and Conditions',
+ noticePrivacity: 'Privacy notice',
+ save: 'save',
+ closeSesion: 'Sign out',
+ yes: 'Yes',
+ no: 'No',
+ close: 'Close',
+ addUser: "Add user",
+ edit: "Edit",
+ delete: "Delete",
+ cancel: "Cancel",
+ add: 'Add'
+ },
+ errors: {
+ requireds: "All fields required",
+ email: "Email is not valid",
+ weakPassword: "Weak password",
+ matchPassword: "Passwords do not match",
+ code: 'Enter valid code',
+ company: 'Enter valid company name',
+ rfc: 'Enter valid RFC',
+ segments: 'Select at least one segment',
+ states: 'Select at least one state',
+ cities: 'Select at least one city',
+ trucks: 'Select at least one type of transport',
+ name: 'Enter valid name(s)',
+ lastname: 'Enter valid last name(s)',
+ phone: 'Enter valid phone number',
+ generic: "Something went wrong, try again later",
+ msgTitleNotDel: 'Not removed!'
+ },
+ messages: {
+ sendCode: 'We send you a code to the email, entered!',
+ changePassword: 'Password has been changed successfully!',
+ register: "Successful registration, Complete your registration!",
+ registerCompleted: 'Registration completed successfully, Welcome',
+ updateCompany: "Updated company",
+ createdUser: 'User created successfully!',
+ updatedUser: 'User successfully updated!',
+ msgCreatedUser: 'When creating a new user, you inform the account beneficiary that they must use their email to set a password in the
Forgot my password section so they can log in.',
+ loading: 'Please wait!'
+ },
+ global: {
+ signIn: "Sign In",
+ and: "and",
+ es: "Spanish",
+ en: "English",
+ shipper: 'Shipper',
+ carrier: 'Carrier',
+ brokerShipper: 'Broker (Shipper)',
+ brokerCarrier: 'Broker (Carrier)',
+ fisica: 'Persona fisica',
+ moral: 'Persona moral',
+ helpSelected: 'Press to select',
+ selected: 'Selected',
+ removeSelected: 'Press to remove selection',
+ emptyList: 'Empty list',
+ notFound: 'Oops! No matches found.',
+ infoUser: 'Personal information',
+ footer: 'ETA VIAPORTE ALL RIGHTS RESERVED',
+ company: 'Company',
+ users: 'Users',
+ directory: 'Internal directory',
+ publications: 'Publications',
+ calendar: 'Calendar',
+ carriers: 'Carriers',
+ shippers: 'Shippers',
+ vehicles: 'Vehicles',
+ loads: 'Loads',
+ acceptedOffers: 'Accepted offers',
+ calculator: 'Calculator',
+ cities: 'Cities',
+ states: 'States',
+ segments: 'Segments',
+ notification: "Notification"
+ },
+ login: {
+ title: 'Sign in',
+ recovery: 'Recover password',
+ register: 'Registration of new users',
+ completeRegister: 'Complete your registration',
+ questionTypeCompany: 'How do you want to register?',
+ questionFiscal: 'How do you work?',
+ companyData: 'Company data',
+ helptext: "The Password must be at least 8 characters, at least one uppercase letter, at least one lowercase letter, and one digit.",
+ helptextCode: "We send you a verification code to the email, enter it to confirm the password recovery. Don't forget to check the spam folder.",
+ greeting: 'Welcome! Enter your email and password',
+ notHaveAccount: "You do not have an account?",
+ forgotPassword: "Forgot your password?",
+ notice: 'By registering you accept our',
+ questionAccount: 'Do you already have an account?',
+ },
+ dashboard: {
+ title: 'Administrative Dashboard',
+ totalLoads: 'Total loads this month',
+ activeLoads: 'Active loads',
+ segmentsChart: 'Most used segments',
+ statesChart: 'Most used states',
+ citiesChart: 'Most used cities',
+ trucksChart: 'Most used type of transport'
+ },
+ company: {
+ title: 'My company',
+ edit: 'Edit company',
+ },
+ users: {
+ titleDel: 'User deletion!',
+ textDel: 'Are you sure to delete this user?',
+ loadingDel: 'Deleting user',
+ msgTitleDel: 'User deleted!',
+ msgTitleNotDel: '"Not deleted!',
+ msgDel: 'The user has been successfully deleted.',
+ msgNotDel: 'The user could not be deleted, try again later.'
+ },
+ directory: {
+ querySearch: 'Search by location name',
+ directory: 'Directory',
+ notLocations: 'No locations added',
+ editLocation: 'Edit location',
+ createLocation: 'Create Location',
+ name: 'Location name',
+ address: 'Address',
+ state: 'State of the location',
+ city: 'Municipality of the location',
+ typeDirectory: 'Type of directory',
+ zipCode: 'Zip Code',
+ typeTruck: 'Type of transport',
+ typeTruckNeed: 'Types of trucks needed',
+ additionalInfoLocation: 'Additional location information',
+
+ titleDel: 'Delete Location!',
+ textDel: 'Are you sure to delete this location?',
+ loadingDel: 'Deleting location',
+ msgTitleDel: 'Location deleted!',
+ msgDel: 'Your location has been successfully deleted.',
+ msgNotDel: 'Your location could not be deleted, try again later.'
+ }
+};
+
+export default en;
\ No newline at end of file
diff --git a/src/i18n/es.js b/src/i18n/es.js
new file mode 100644
index 0000000..e3f0352
--- /dev/null
+++ b/src/i18n/es.js
@@ -0,0 +1,199 @@
+
+
+const es = {
+ labels: {
+ email: 'Correo electrónico',
+ password: 'Contraseña',
+ password2: 'Nueva contraseña',
+ password3: 'Confirmar contraseña',
+ code: 'Ingresa el código',
+ questionCompany: '¿Cuál es el nombre de la empresa?',
+ questionRfc: '¿Cuál es el RFC de la empresa?',
+ questionSegments: '¿A que segmentos pertenece la empresa?',
+ questionSates: '¿Cuáles son las locaciones de carga de la empresa por estado?',
+ questionCities: '¿Cuáles son las locaciones de carga de la empresa por municipio?',
+ questionTrucks: '¿Qué tipo de transportes utiliza la empresa?',
+ questionSignOut: '¿Estás seguro de cerrar sesión?',
+ infoCompanies: 'Información adicional de la empresa',
+ selectSegment: 'Busca por segmento',
+ selectTruck: 'Busca por tipo de transporte',
+ selectState: 'Busca por estado',
+ selectCity: 'Busca por ciudad',
+ names: 'Nombre(s)',
+ lastnames: 'Apellido(s)',
+ phone1: 'Teléfono',
+ phone1: 'Teléfono 1',
+ phone2: 'Teléfono 2',
+ typeCompany: 'Tipo de empresa',
+ codeId: 'Código',
+ dateMembership: 'Empresa miembro desde',
+ segmentsCompany: 'Segmentos de la empresa',
+ locationLoadState: 'Ubicaciones de carga por estado',
+ locationLoadCity: 'Ubicaciones de carga por municipio',
+ truckUsed: 'Transportes utilizados',
+ infoCompany: 'Información general de la empresa',
+ registryNumber: "Número de registro",
+ userRole: "Rol del usuario",
+ userInfo: "Información adicional del usuario",
+ memberSince: "Miembro desde",
+ createUser: 'Crear usuario',
+ editUser: 'Editar usuario',
+ selectedRol: 'Seleccionar Rol',
+ manager: 'Gerente',
+ staff: 'Personal',
+ driver: 'Conductor',
+ filters: 'Filtros',
+ location: 'Locación',
+ both: 'Ambas',
+ load: 'Carga',
+ download: 'Descarga',
+ select: 'Seleccionar',
+ additionalInformation: 'Información adicional',
+ writeHere: 'Escribe aqui',
+ },
+ buttons: {
+ enter: "Ingresa aqui",
+ signup: "Registrate aqui",
+ continue: "Continuar",
+ back: "Volver",
+ resendCode: "Reenviar código",
+ terms: 'Términos y condiciones',
+ noticePrivacity: 'Aviso de privaciadad',
+ save: 'Guardar',
+ close: 'Cerrar',
+ closeSesion: 'Cerrar sesión',
+ yes: 'Si',
+ no: 'No',
+ addUser: "Agregar usuario",
+ edit: "Editar",
+ delete: "Eliminar",
+ cancel: "Cancelar",
+ add: 'Agregar'
+ },
+ errors: {
+ requireds: 'Todos los campos con obligatorios',
+ email: 'Correo electrónico no es valido',
+ weakPassword: 'Contraseña poco segura',
+ matchPassword: 'Las contraseñas no coinciden',
+ code: 'Ingresa código valido',
+ company: 'Ingresa nombre de empresa valido',
+ rfc: 'Ingresa RFC valido',
+ segments: 'Selecciona al menos un segmento',
+ states: 'Selecciona al menos un estado',
+ cities: 'Selecciona al menos un municipio',
+ trucks: 'Selecciona al menos un tipo de transporte',
+ name: 'Ingresa nombre(s) valido',
+ lastname: 'Ingresa apellido(s) valido',
+ phone: 'Ingresa teléfono valido',
+ generic: "Algo salio mal, intente más tarde",
+ msgTitleNotDel: 'No eliminado!',
+ },
+ messages: {
+ sendCode: 'Te enviamos un código al correo, ingresado!',
+ changePassword: 'Contraseña se ha cambiando exitosamente!',
+ register: "Registro exitoso, Complete su registro!",
+ registerCompleted: 'Registro completado exitosamento, Bienvenido',
+ updateCompany: "Empresa actualizada",
+ createdUser: 'Usuario creado con éxito!',
+ updatedUser: 'Usuario actualizado con éxito!',
+ msgCreatedUser: 'Al crear un nuevo usuario, informa al beneficiario de la cuenta, que debe utilizar su correo electrónico para establecer una contraseña en la sección
Olvidé mi contraseña y así poder iniciar sesión.',
+ loading: 'Por favor espere!'
+ },
+ global: {
+ signIn: 'Ingresar',
+ and: "y",
+ es: 'Español',
+ en: 'Ingles',
+ shipper: 'Embarcador',
+ carrier: 'Transportista',
+ brokerShipper: 'Broker (Embarcador)',
+ brokerCarrier: 'Broker (Transportista)',
+ fisica: 'Persona fisica',
+ moral: 'Persona moral',
+ helpSelected: 'Presione para seleccionar',
+ selected: 'Seleccionado',
+ removeSelected: 'Presione para remover selecion',
+ emptyList: 'Lista vacia',
+ notFound: 'Oops! No se encontro coincidencias.',
+ infoUser: 'Información personal',
+ footer: 'ETA VIAPORTE TODOS LOS DERECHOS RESERVADOS',
+ company: 'Empresa',
+ users: 'Usuarios',
+ directory: 'Directorio interno',
+ publications: 'Publicaciones',
+ calendar: 'Calendario',
+ carriers: 'Transportistas',
+ shippers: 'Embarcadores',
+ vehicles: 'Vehiculos',
+ loads: 'Cargas',
+ acceptedOffers: 'Ofertas aceptadas',
+ calculator: 'Calculadora',
+ cities: 'Ciudades',
+ states: 'Estados',
+ segments: 'Segmentos',
+ notification: "Notificación",
+ },
+ login: {
+ title: 'Iniciar sesión',
+ recovery: 'Recuperar contraseña',
+ register: 'Registro de nuevos usuarios',
+ completeRegister: 'Complete su registro',
+ questionTypeCompany: '¿Como te quieres registrar?',
+ questionFiscal: '¿Como trabajas?',
+ companyData: 'Datos de la empresa',
+ helptext: 'La Contraseña debe ser mínimo 8 caracteres, al menos una mayúscula, al menos una minúscula, y un digito.',
+ helptextCode: "Te enviamos un código de verificación al correo electrónico, ingresalo para confirmar la recuperacion de contraseña. No olvides revisar en la carpeta spam.",
+ greeting: 'Bienvenido! Ingresa tu email y contraseña',
+ forgotPassword: '¿Olvidaste tu contreseña?',
+ notHaveAccount: '¿No tienes una cuenta?',
+ notice: 'Al registrarte aceptas nuestros',
+ questionAccount: '¿Ya tienes una cuenta?',
+ },
+ dashboard: {
+ title: 'Dashboard Administrativo',
+ totalLoads: 'Total de cargas este mes',
+ activeLoads: 'Cargas activas',
+ segmentsChart: 'Segmentos más usados',
+ statesChart: 'Estados más usados',
+ citiesChart: 'Ciudades más usadas',
+ trucksChart: 'Tipo de transporte más usados'
+ },
+ company: {
+ title: 'Mi empresa',
+ edit: 'Editar empresa',
+ },
+ users: {
+ titleDel: 'Eliminación de usuario!',
+ textDel: '¿Estás seguro de eliminar este usuario?',
+ loadingDel: 'Elimininando usuario',
+ msgTitleDel: 'Usuario eliminado!',
+ msgTitleNotDel: '"No eliminado!',
+ msgDel: 'El usuario ha sido eliminado exitosamente.',
+ msgNotDel: 'El usuario no se pudo eliminar, intente más tarde.'
+ },
+ directory: {
+ querySearch: 'Buscar por nombre de locación',
+ directory: 'Directorio',
+ notLocations: 'No hay ubicaciones agregadas',
+ editLocation: 'Editar locación',
+ createLocation: 'Crear Locación',
+ name: 'Nombre de la locación',
+ address: 'Dirección',
+ state: 'Estado de la locación',
+ city: 'Municipio de la locación',
+ typeDirectory: 'Tipo de directorio',
+ zipCode: 'Código postal',
+ typeTruck: 'Tipo de transporte',
+ typeTruckNeed: 'Tipos de camiones que se necesitan',
+ additionalInfoLocation: 'Información adicional de la locación',
+
+ titleDel: 'Eliminar Locación!',
+ textDel: '¿Estás seguro de eliminar este locación?',
+ loadingDel: 'Eliminando locación',
+ msgTitleDel: 'Locación eliminado!',
+ msgDel: 'Tu locación ha sido eliminado exitosamente.',
+ msgNotDel: 'Tu locación no se pudo eliminar, intente más tarde.'
+ }
+};
+
+export default es;
\ No newline at end of file
diff --git a/src/i18n/i18n.js b/src/i18n/i18n.js
index 1c93f13..b674d73 100644
--- a/src/i18n/i18n.js
+++ b/src/i18n/i18n.js
@@ -1,272 +1,17 @@
import { createI18n } from 'vue-i18n';
+import es from './es';
+import en from './en';
const messages = {
- en: {
- labels: {
- email: 'Email',
- password: 'Password',
- password2: 'New password',
- password3: 'Confirm Password',
- code: 'Enter the code',
- questionCompany: 'What is the name of the company?',
- questionRfc: "What is the company's RFC?",
- questionSegments: 'What segments does the company belong to?',
- questionSates: "What are the company's loading locations by state?",
- questionCities: "What are the company's loading locations by city?",
- questionTrucks: "What type of transport does the company use?",
- infoCompanies: 'Additional company information',
- questionSignOut: 'Are you sure to sign out?',
- selectSegment: 'Search by segment',
- selectTruck: 'Search by type of transport',
- selectState: 'Search by state',
- selectCity: 'Search by city',
- names: 'Name(s)',
- lastnames: 'Last name',
- phone1: 'Phone 1',
- phone2: 'Phone 2',
- typeCompany: 'Type of company',
- codeId: 'Code',
- dateMembership: 'Company member since',
- segmentCompany: 'Company segment',
- locationLoadState: 'Load location by state',
- locationLoadCity: 'Load location by city',
- truckUsed: 'Transports used',
- infoCompany: 'General company information'
- },
- buttons: {
- enter: "Enter here",
- signup: "Sign up here",
- continue: "Continue",
- back: "Go back",
- resendCode: "Resend code",
- terms: 'Terms and Conditions',
- noticePrivacity: 'Privacy notice',
- save: 'save',
- closeSesion: 'Sign out',
- yes: 'Yes',
- no: 'No'
- },
- errors: {
- requireds: "All fields required",
- email: "Email is not valid",
- weakPassword: "Weak password",
- matchPassword: "Passwords do not match",
- code: 'Enter valid code',
- company: 'Enter valid company name',
- rfc: 'Enter valid RFC',
- segments: 'Select at least one segment',
- states: 'Select at least one state',
- cities: 'Select at least one city',
- trucks: 'Select at least one type of transport',
- name: 'Enter valid name(s)',
- lastname: 'Enter valid last name(s)',
- phone: 'Enter valid phone number'
- },
- messages: {
- sendCode: 'We send you a code to the email, entered!',
- changePassword: 'Password has been changed successfully!',
- register: "Successful registration, Complete your registration!",
- registerCompleted: 'Registration completed successfully, Welcome'
- },
- global: {
- signIn: "Sign In",
- and: "and",
- es: "Spanish",
- en: "English",
- shipper: 'Shipper',
- carrier: 'Carrier',
- brokerShipper: 'Broker (Shipper)',
- brokerCarrier: 'Broker (Carrier)',
- fisica: 'Persona fisica',
- moral: 'Persona moral',
- helpSelected: 'Press to select',
- selected: 'Selected',
- removeSelected: 'Press to remove selection',
- emptyList: 'Empty list',
- notFound: 'Oops! No matches found.',
- infoUser: 'Personal information',
- footer: 'ETA VIAPORTE ALL RIGHTS RESERVED',
- company: 'Company',
- users: 'Users',
- directory: 'Internal directory',
- publications: 'Publications',
- calendar: 'Calendar',
- carriers: 'Carriers',
- shippers: 'Shippers',
- vehicles: 'Vehicles',
- loads: 'Loads',
- acceptedOffers: 'Accepted offers',
- calculator: 'Calculator',
- cities: 'Cities',
- states: 'States',
- segments: 'Segments',
- },
- login: {
- title: 'Sign in',
- recovery: 'Recover password',
- register: 'Registration of new users',
- completeRegister: 'Complete your registration',
- questionTypeCompany: 'How do you want to register?',
- questionFiscal: 'How do you work?',
- companyData: 'Company data',
- helptext: "The Password must be at least 8 characters, at least one uppercase letter, at least one lowercase letter, and one digit.",
- helptextCode: "We send you a verification code to the email, enter it to confirm the password recovery. Don't forget to check the spam folder.",
- greeting: 'Welcome! Enter your email and password',
- notHaveAccount: "You do not have an account?",
- forgotPassword: "Forgot your password?",
- notice: 'By registering you accept our',
- questionAccount: 'Do you already have an account?',
- },
- dashboard: {
- title: 'Administrative Dashboard',
- totalLoads: 'Total loads this month',
- activeLoads: 'Active loads',
- segmentsChart: 'Most used segments',
- statesChart: 'Most used states',
- citiesChart: 'Most used cities',
- trucksChart: 'Most used type of transport'
- },
- company: {
- title: 'My company',
- edit: 'Edit company',
- }
-},
-es: {
- labels: {
- email: 'Correo electrónico',
- password: 'Contraseña',
- password2: 'Nueva contraseña',
- password3: 'Confirmar contraseña',
- code: 'Ingresa el código',
- questionCompany: '¿Cuál es el nombre de la empresa?',
- questionRfc: '¿Cuál es el RFC de la empresa?',
- questionSegments: '¿A que segmentos pertenece la empresa?',
- questionSates: '¿Cuáles son las locaciones de carga de la empresa por estado?',
- questionCities: '¿Cuáles son las locaciones de carga de la empresa por municipio?',
- questionTrucks: '¿Qué tipo de transportes utiliza la empresa?',
- questionSignOut: '¿Estás seguro de cerrar sesión?',
- infoCompanies: 'Información adicional de la empresa',
- selectSegment: 'Busca por segmento',
- selectTruck: 'Busca por tipo de transporte',
- selectState: 'Busca por estado',
- selectCity: 'Busca por ciudad',
- names: 'Nombre(s)',
- lastnames: 'Apellido(s)',
- phone1: 'Teléfono 1',
- phone2: 'Teléfono 2',
- typeCompany: 'Tipo de empresa',
- codeId: 'Código',
- dateMembership: 'Empresa miembro desde',
- segmentCompany: 'Segmento de empresa',
- locationLoadState: 'Ubicación de carga por estado',
- locationLoadCity: 'Ubicación de carga por municipio',
- truckUsed: 'Transportes utilizados',
- infoCompany: 'Información general de la empresa'
- },
- buttons: {
- enter: "Ingresa aqui",
- signup: "Registrate aqui",
- continue: "Continuar",
- back: "Volver",
- resendCode: "Reenviar código",
- terms: 'Términos y condiciones',
- noticePrivacity: 'Aviso de privaciadad',
- save: 'Guardar',
- closeSesion: 'Cerrar sesión',
- yes: 'Si',
- no: 'No'
- },
- errors: {
- requireds: 'Todos los campos con obligatorios',
- email: 'Correo electrónico no es valido',
- weakPassword: 'Contraseña poco segura',
- matchPassword: 'Las contraseñas no coinciden',
- code: 'Ingresa código valido',
- company: 'Ingresa nombre de empresa valido',
- rfc: 'Ingresa RFC valido',
- segments: 'Selecciona al menos un segmento',
- states: 'Selecciona al menos un estado',
- cities: 'Selecciona al menos un municipio',
- trucks: 'Selecciona al menos un tipo de transporte',
- name: 'Ingresa nombre(s) valido',
- lastname: 'Ingresa apellido(s) valido',
- phone: 'Ingresa teléfono valido'
- },
- messages: {
- sendCode: 'Te enviamos un código al correo, ingresado!',
- changePassword: 'Contraseña se ha cambiando exitosamente!',
- register: "Registro exitoso, Complete su registro!",
- registerCompleted: 'Registro completado exitosamento, Bienvenido'
- },
- global: {
- signIn: 'Ingresar',
- and: "y",
- es: 'Español',
- en: 'Ingles',
- shipper: 'Embarcador',
- carrier: 'Transportista',
- brokerShipper: 'Broker (Embarcador)',
- brokerCarrier: 'Broker (Transportista)',
- fisica: 'Persona fisica',
- moral: 'Persona moral',
- helpSelected: 'Presione para seleccionar',
- selected: 'Seleccionado',
- removeSelected: 'Presione para remover selecion',
- emptyList: 'Lista vacia',
- notFound: 'Oops! No se encontro coincidencias.',
- infoUser: 'Información personal',
- footer: 'ETA VIAPORTE TODOS LOS DERECHOS RESERVADOS',
- company: 'Empresa',
- users: 'Usuarios',
- directory: 'Directorio interno',
- publications: 'Publicaciones',
- calendar: 'Calendario',
- carriers: 'Transportistas',
- shippers: 'Embarcadores',
- vehicles: 'Vehiculos',
- loads: 'Cargas',
- acceptedOffers: 'Ofertas aceptadas',
- calculator: 'Calculadora',
- cities: 'Ciudades',
- states: 'Estados',
- segments: 'Segmentos',
- },
- login: {
- title: 'Iniciar sesión',
- recovery: 'Recuperar contraseña',
- register: 'Registro de nuevos usuarios',
- completeRegister: 'Complete su registro',
- questionTypeCompany: '¿Como te quieres registrar?',
- questionFiscal: '¿Como trabajas?',
- companyData: 'Datos de la empresa',
- helptext: 'La Contraseña debe ser mínimo 8 caracteres, al menos una mayúscula, al menos una minúscula, y un digito.',
- helptextCode: "Te enviamos un código de verificación al correo electrónico, ingresalo para confirmar la recuperacion de contraseña. No olvides revisar en la carpeta spam.",
- greeting: 'Bienvenido! Ingresa tu email y contraseña',
- forgotPassword: '¿Olvidaste tu contreseña?',
- notHaveAccount: '¿No tienes una cuenta?',
- notice: 'Al registrarte aceptas nuestros',
- questionAccount: '¿Ya tienes una cuenta?',
- },
- dashboard: {
- title: 'Dashboard Administrativo',
- totalLoads: 'Total de cargas este mes',
- activeLoads: 'Cargas activas',
- segmentsChart: 'Segmentos más usados',
- statesChart: 'Estados más usados',
- citiesChart: 'Ciudades más usadas',
- trucksChart: 'Tipo de transporte más usados'
- },
- company: {
- title: 'Mi empresa',
- edit: 'Editar empresa',
- }
- }
+ en: en,
+ es: es,
}
const i18n = createI18n({
legacy: false,
locale: 'es', // default locale
fallbackLocale: 'es',
+ warnHtmlMessage: false,
messages,
});
diff --git a/src/stores/company.js b/src/stores/company.js
index 67f1444..d9d0d0e 100644
--- a/src/stores/company.js
+++ b/src/stores/company.js
@@ -3,6 +3,7 @@ import { ref } from "vue";
import { getBudgets, getCompany, updateBudget, updateCompany, deleteBudget, createBudget, getUsers, updateUser, createUser, deleteUser, getLocations, createLocation, updateLocation, deleteLocation } from "../services/company";
import api from "../lib/axios";
import { saveProposal, updateProposal } from "../services/vehicles";
+import { useI18n } from "vue-i18n";
export const useCompanyStore = defineStore('company', () => {
@@ -22,6 +23,7 @@ export const useCompanyStore = defineStore('company', () => {
const proposalsTotal = ref(0);
const proposalsCurrentPage = ref(0)
const loading = ref(false);
+ const { t } = useI18n();
const getCompanyData = async() => {
const companyId = localStorage.getItem('id');
@@ -81,7 +83,7 @@ export const useCompanyStore = defineStore('company', () => {
}
return 'success';
} else {
- return 'Algo salio mal, intente más tarde';
+ return t('errors.generic');
}
}
@@ -108,7 +110,7 @@ export const useCompanyStore = defineStore('company', () => {
}
return 'success';
} else {
- return 'Algo salio mal, intente más tarde';
+ return t('errors.generic');
}
}
@@ -121,14 +123,14 @@ export const useCompanyStore = defineStore('company', () => {
}
return 'success';
} else {
- return 'Algo salio mal, intente más tarde';
+ return t('errors.generic');
}
}
const editCompany = async(formData) => {
const data = await updateCompany(formData);
if(data === null) {
- return 'Algo salio mal, intente más tarde';
+ return t('errors.generic');
} else {
company.value = {
...company.value,
@@ -190,7 +192,7 @@ export const useCompanyStore = defineStore('company', () => {
proposalsTotal.value++;
return 'success';
} else {
- return 'Algo salio mal, intente más tarde';
+ return t('errors.generic');
}
}
@@ -205,7 +207,7 @@ export const useCompanyStore = defineStore('company', () => {
};
return 'success';
} else {
- return 'Algo salio mal, intente más tarde';
+ return t('errors.generic');
}
}
@@ -250,7 +252,7 @@ export const useCompanyStore = defineStore('company', () => {
return 'No se pudo actualizar presupuesto, intente mas tarde';
}
} catch (error) {
- return 'Algo salio mal, intente más tarde';
+ return t('errors.generic');
}
}
@@ -268,7 +270,7 @@ export const useCompanyStore = defineStore('company', () => {
return 'No se pudo agregar presupuesto, intente mas tarde';
}
} catch (error) {
- return 'Algo salio mal, intente más tarde';
+ return t('errors.generic');
}
}
@@ -332,7 +334,7 @@ export const useCompanyStore = defineStore('company', () => {
})
return 'success';
} else {
- return 'Algo salio mal, intente más tarde';
+ return t('errors.generic');
}
}
@@ -357,7 +359,7 @@ export const useCompanyStore = defineStore('company', () => {
}
return 'success';
} else {
- return 'Algo salio mal, intente más tarde';
+ return t('errors.generic');
}
}
@@ -371,7 +373,7 @@ export const useCompanyStore = defineStore('company', () => {
return 'success';
} else {
- return 'Algo salio mal, intente más tarde';
+ return t('errors.generic');
}
}
diff --git a/src/stores/vehicles.js b/src/stores/vehicles.js
index 1ebd0b5..9f7b977 100644
--- a/src/stores/vehicles.js
+++ b/src/stores/vehicles.js
@@ -1,11 +1,13 @@
import { defineStore } from "pinia";
import { ref } from "vue";
import { createVehicle, deleteVehicle, getVehicles, updateVehicle } from "../services/vehicles";
+import { useI18n } from "vue-i18n";
export const useVehiclesStore = defineStore('vehicles', () => {
const vehicles = ref([]);
const vehiclesTotal = ref(0);
const vehiclesCurrentPage = ref(0)
+ const { t } = useI18n()
const fetchVehicles = async(filterQuery, reload = false) => {
let filterArr = Object.values(filterQuery);
@@ -35,7 +37,7 @@ export const useVehiclesStore = defineStore('vehicles', () => {
vehiclesTotal.value++;
return 'success';
} else {
- return 'Algo salio mal, intente más tarde';
+ return t('errors.generic');
}
}
@@ -53,7 +55,7 @@ export const useVehiclesStore = defineStore('vehicles', () => {
console.log(vehicles.value[index]);
return 'success';
} else {
- return 'Algo salio mal, intente más tarde';
+ return t('errors.generic');
}
}
@@ -64,7 +66,7 @@ export const useVehiclesStore = defineStore('vehicles', () => {
vehiclesTotal.value--;
return 'success';
} else {
- return 'Algo salio mal, intente más tarde';
+ return t('errors.generic');
}
}
diff --git a/src/views/LocationsView.vue b/src/views/LocationsView.vue
index 6c3a7ea..3200957 100644
--- a/src/views/LocationsView.vue
+++ b/src/views/LocationsView.vue
@@ -7,6 +7,7 @@
import CardLocation from '../components/CardLocation.vue';
import Pagination from '../components/Pagination.vue';
import CustomPopup from '../components/CustomPopup.vue';
+ import { useI18n } from 'vue-i18n';
const companyStore = useCompanyStore();
@@ -15,10 +16,12 @@
const query = ref('');
const locationCurrent = ref(null);
const openModal = ref(false);
+ const { t } = useI18n();
// const typeDirection = ref(null)
- const typeDirection = ref({value: 'both', label: 'Ambas'})
+ const typeDirection = ref({value: 'both', label: t('labels.both')})
const openPopup = ref(false);
+
onMounted(() => {
getInitData();
})
@@ -105,9 +108,9 @@
}
const optionsFilter = [
- {value: 'both',label: 'Ambas'},
- {value: 'load',label: 'Carga'},
- {value: 'download',label: 'Descarga'}
+ {value: 'both',label: t('labels.both')},
+ {value: 'load',label: t('labels.load')},
+ {value: 'download',label: t('labels.download')}
]
const closePopup = () => {
@@ -134,28 +137,28 @@
:location="locationCurrent"
@reset-location="handleResetCurrentBudget"
/>
-
Directorio interno
+
{{ t('global.directory') }}
diff --git a/src/views/MyCompanyView.vue b/src/views/MyCompanyView.vue
index 874519f..c2f66e0 100644
--- a/src/views/MyCompanyView.vue
+++ b/src/views/MyCompanyView.vue
@@ -30,6 +30,8 @@
await auth.authenticationPromise;
// await authenticationPromise;
await company.getCompanyData();
+ console.log(company.company)
+
}
@@ -70,7 +72,7 @@
{{getDateMonthDay(company.company?.createAt)}}
- {{ t('labels.segmentCompany') }}:
+ {{ t('labels.segmentsCompany') }}:
{{company.company?.categories.map((e) => e.name).join(', ')}}