Compare commits

..

No commits in common. "b17165454d2c37a6933b1f9e381ebb90b6b38e1b" and "3f420c520f524d2b391614a2a86bc51e5c840a1b" have entirely different histories.

View File

@ -4,7 +4,7 @@ import { createContext, useContext, useState, useEffect, useCallback, useRef, Re
import { DEFAULT_LANGUAGE } from './config'; import { DEFAULT_LANGUAGE } from './config';
import { en } from './translations/en'; import { en } from './translations/en';
import { de } from './translations/de'; import { de } from './translations/de';
// import { sl } from './translations/sl'; import { sl } from './translations/sl';
import { flattenObject } from './dynamicTranslations'; import { flattenObject } from './dynamicTranslations';
import { authFetch } from '../utils/authFetch'; import { authFetch } from '../utils/authFetch';
import useAuthStore from '../store/authStore'; import useAuthStore from '../store/authStore';
@ -23,7 +23,7 @@ type TranslationFilesPayload = {
const builtInTranslations: Record<string, Record<string, unknown>> = { const builtInTranslations: Record<string, Record<string, unknown>> = {
en: en as unknown as Record<string, unknown>, en: en as unknown as Record<string, unknown>,
de: de as unknown as Record<string, unknown>, de: de as unknown as Record<string, unknown>,
// sl: sl as unknown as Record<string, unknown>, sl: sl as unknown as Record<string, unknown>,
}; };
const APP_LANGUAGE_STORAGE_KEY = 'pp-selected-language'; const APP_LANGUAGE_STORAGE_KEY = 'pp-selected-language';
@ -87,12 +87,12 @@ export function I18nProvider({ children }: I18nProviderProps) {
languages: [ languages: [
{ code: 'en', name: 'English' }, { code: 'en', name: 'English' },
{ code: 'de', name: 'Deutsch' }, { code: 'de', name: 'Deutsch' },
// { code: 'sl', name: 'Slovenian' }, { code: 'sl', name: 'Slovenian' },
], ],
translations: { translations: {
en: enFlat, en: enFlat,
de: flattenObject(de as unknown as Record<string, unknown>), de: flattenObject(de as unknown as Record<string, unknown>),
// sl: flattenObject(sl as unknown as Record<string, unknown>), sl: flattenObject(sl as unknown as Record<string, unknown>),
}, },
}); });