mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-06-09 20:11:02 +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);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
export default {
|
||||
"welcome": {
|
||||
"title": "Welcome to Pezkuwi",
|
||||
"subtitle": "Your gateway to decentralized governance",
|
||||
"selectLanguage": "Select Your Language",
|
||||
"continue": "Continue"
|
||||
},
|
||||
"auth": {
|
||||
"signIn": "Sign In",
|
||||
"signUp": "Sign Up",
|
||||
"email": "Email",
|
||||
"password": "Password",
|
||||
"confirmPassword": "Confirm Password",
|
||||
"forgotPassword": "Forgot Password?",
|
||||
"noAccount": "Don't have an account?",
|
||||
"haveAccount": "Already have an account?",
|
||||
"createAccount": "Create Account",
|
||||
"welcomeBack": "Welcome Back!",
|
||||
"getStarted": "Get Started"
|
||||
},
|
||||
"dashboard": {
|
||||
"title": "Dashboard",
|
||||
"wallet": "Wallet",
|
||||
"staking": "Staking",
|
||||
"governance": "Governance",
|
||||
"dex": "Exchange",
|
||||
"history": "History",
|
||||
"settings": "Settings",
|
||||
"balance": "Balance",
|
||||
"totalStaked": "Total Staked",
|
||||
"rewards": "Rewards",
|
||||
"activeProposals": "Active Proposals"
|
||||
},
|
||||
"wallet": {
|
||||
"title": "Wallet",
|
||||
"connect": "Connect Wallet",
|
||||
"disconnect": "Disconnect",
|
||||
"address": "Address",
|
||||
"balance": "Balance",
|
||||
"send": "Send",
|
||||
"receive": "Receive",
|
||||
"transaction": "Transaction",
|
||||
"history": "History"
|
||||
},
|
||||
"settings": {
|
||||
"title": "Settings",
|
||||
"language": "Language",
|
||||
"theme": "Theme",
|
||||
"notifications": "Notifications",
|
||||
"security": "Security",
|
||||
"about": "About",
|
||||
"logout": "Logout"
|
||||
},
|
||||
"common": {
|
||||
"cancel": "Cancel",
|
||||
"confirm": "Confirm",
|
||||
"save": "Save",
|
||||
"loading": "Loading...",
|
||||
"error": "Error",
|
||||
"success": "Success",
|
||||
"retry": "Retry",
|
||||
"close": "Close"
|
||||
}
|
||||
} as const;
|
||||
Reference in New Issue
Block a user