Refactor i18n message imports and update PWA configuration.
All checks were successful
Deploy to Production, build images and push to Gitea Registry / build_and_push (pull_request) Successful in 1m16s
All checks were successful
Deploy to Production, build images and push to Gitea Registry / build_and_push (pull_request) Successful in 1m16s
This commit is contained in:
parent
d150dd28c9
commit
588abb1217
@ -5,7 +5,10 @@ import { BrowserTracing } from '@sentry/tracing';
|
||||
import App from './App.vue';
|
||||
import router from './router';
|
||||
import { createI18n } from 'vue-i18n';
|
||||
import messages from './i18n';
|
||||
import enMessages from './i18n/en.json'; // Import en.json directly
|
||||
import deMessages from './i18n/de.json';
|
||||
import frMessages from './i18n/fr.json';
|
||||
import esMessages from './i18n/es.json';
|
||||
|
||||
// Global styles
|
||||
import './assets/main.scss';
|
||||
@ -29,7 +32,12 @@ const i18n = createI18n({
|
||||
legacy: false, // Recommended for Vue 3
|
||||
locale: 'en', // Default locale
|
||||
fallbackLocale: 'en', // Fallback locale
|
||||
messages,
|
||||
messages: {
|
||||
en: enMessages,
|
||||
de: deMessages,
|
||||
fr: frMessages,
|
||||
es: esMessages,
|
||||
},
|
||||
});
|
||||
|
||||
const app = createApp(App);
|
||||
|
@ -57,9 +57,10 @@ export default defineConfig({
|
||||
vue(),
|
||||
VitePWA(pwaOptions),
|
||||
VueI18nPlugin({
|
||||
include: [path.resolve(path.dirname(fileURLToPath(import.meta.url)), './src/i18n/**')],
|
||||
include: [path.resolve(path.dirname(fileURLToPath(import.meta.url)), './src/i18n/**.json')],
|
||||
strictMessage: false,
|
||||
runtimeOnly: false,
|
||||
compositionOnly: false,
|
||||
}),
|
||||
],
|
||||
resolve: {
|
||||
|
Loading…
Reference in New Issue
Block a user