mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-06-13 19:11:01 +00:00
Fix frontend: resolve imports, add missing functions, configure Vite properly
This commit is contained in:
+14
-9
@@ -7,12 +7,12 @@
|
||||
export { translations as comprehensiveTranslations, supportedLocales } from './translations';
|
||||
|
||||
// Import all translation JSON files for i18next compatibility
|
||||
import en from './locales/en.json';
|
||||
import tr from './locales/tr.json';
|
||||
import kmr from './locales/kmr.json';
|
||||
import ckb from './locales/ckb.json';
|
||||
import ar from './locales/ar.json';
|
||||
import fa from './locales/fa.json';
|
||||
import en from './locales/en.json?url';
|
||||
import tr from './locales/tr.json?url';
|
||||
import kmr from './locales/kmr.json?url';
|
||||
import ckb from './locales/ckb.json?url';
|
||||
import ar from './locales/ar.json?url';
|
||||
import fa from './locales/fa.json?url';
|
||||
|
||||
/**
|
||||
* Language configuration with RTL support
|
||||
@@ -47,9 +47,9 @@ export const DEFAULT_LANGUAGE = 'en';
|
||||
export const LANGUAGE_STORAGE_KEY = '@pezkuwi_language';
|
||||
|
||||
/**
|
||||
* Translation resources (JSON format for i18next)
|
||||
* Translation resources (JSON URLs for dynamic loading)
|
||||
*/
|
||||
export const translations = {
|
||||
export const translationUrls = {
|
||||
en,
|
||||
tr,
|
||||
kmr,
|
||||
@@ -58,6 +58,11 @@ export const translations = {
|
||||
fa,
|
||||
};
|
||||
|
||||
/**
|
||||
* Translation resources (empty - load dynamically)
|
||||
*/
|
||||
export const translations = {};
|
||||
|
||||
/**
|
||||
* Check if a language is RTL
|
||||
* @param languageCode - Language code (e.g., 'ar', 'ckb', 'fa')
|
||||
@@ -75,4 +80,4 @@ export function isRTL(languageCode: string): boolean {
|
||||
*/
|
||||
export function getLanguageConfig(languageCode: string): LanguageConfig | undefined {
|
||||
return LANGUAGES.find(l => l.code === languageCode);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user