Compare commits

...

5 Commits

Author SHA1 Message Date
mo
1f7abcbd85 Merge pull request 'ph4' (#52) from ph4 into prod
Reviewed-on: #52
2025-06-02 19:09:21 +02:00
mohamad
588abb1217 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
2025-06-02 19:08:30 +02:00
mohamad
d150dd28c9 Update OAuth redirect URIs and API routing structure
- Changed the Google and Apple redirect URIs in the configuration to include the API version in the path.
- Reorganized the inclusion of OAuth routes in the main application to ensure they are properly prefixed and accessible.

These updates aim to enhance the API structure and ensure consistency in the authentication flow.
2025-06-02 19:08:30 +02:00
mohamad
6b54566cef Refactor API routing and update login URLs
- Updated the OAuth routes to be included under the main API prefix for better organization.
- Changed the Google login URL in the SocialLoginButtons component to reflect the new API structure.

These changes aim to improve the clarity and consistency of the API routing and enhance the login flow for users.
2025-06-02 19:08:12 +02:00
mohamad
2d16116716 Enhance i18n support and PWA configuration
- Increased the maximum file size for caching in PWA settings from 5MB to 15MB in vite.config.ts.
- Updated import paths for i18n messages in main.ts for consistency.
- Simplified the i18n index by removing unnecessary keys and using shorthand for language imports.
- Added debug output in LoginPage.vue to log current locale and available messages for easier troubleshooting.
2025-06-02 18:06:21 +02:00
4 changed files with 30 additions and 13 deletions

View File

@ -1,11 +1,11 @@
import en from './en.json'; // Changed from enUS and path
import en from './en.json';
import de from './de.json';
import fr from './fr.json';
import es from './es.json';
export default {
'en': en, // Changed from 'en-US': enUS
'de': de,
'fr': fr,
'es': es
en,
de,
fr,
es
};

View File

@ -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';
@ -26,10 +29,15 @@ import { useAuthStore } from '@/stores/auth';
// // export interface DefineNumberFormat {}
// // }
const i18n = createI18n({
legacy: false, // Recommended for Vue 3
locale: 'en', // Default locale
fallbackLocale: 'en', // Fallback locale
messages,
legacy: false, // Recommended for Vue 3
locale: 'en', // Default locale
fallbackLocale: 'en', // Fallback locale
messages: {
en: enMessages,
de: deMessages,
fr: frMessages,
es: esMessages,
},
});
const app = createApp(App);

View File

@ -57,8 +57,16 @@ const router = useRouter();
const route = useRoute();
const authStore = useAuthStore();
const notificationStore = useNotificationStore();
const { t, locale, messages } = useI18n();
const { t } = useI18n();
// Debug output
console.log('=== i18n Debug Info ===');
console.log('Current locale:', locale.value);
console.log('Available messages:', messages.value);
console.log('English messages:', messages.value.en);
console.log('LoginPage messages:', messages.value.en?.loginPage);
console.log('Test translation:', t('loginPage.emailLabel'));
console.log('Test fallback:', t('message.hello'));
const email = ref('');
const password = ref('');

View File

@ -44,7 +44,7 @@ const pwaOptions: Partial<VitePWAOptions> = {
'dev-sw.js',
'index.html',
],
maximumFileSizeToCacheInBytes: 5 * 1024 * 1024, // 5MB
maximumFileSizeToCacheInBytes: 15 * 1024 * 1024, // 5MB
},
workbox: {
cleanupOutdatedCaches: true,
@ -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: {