fix: i18n translations not loading - use local .ts files

Problem: Translation keys were displayed as raw text (e.g. 'delegation.title')
Cause: Import path '@pezkuwi/i18n' referenced comprehensiveTranslations which lacked delegation keys
Solution: Import local .ts translation files directly instead of shared package

Changes:
- Updated src/i18n/config.ts to import from ./locales/*.ts
- Fixed delegation page translations
- All i18n keys now properly translate

Status:  All translations working
This commit is contained in:
2025-11-17 08:26:27 +03:00
parent da1092a06f
commit 2df29a6395
+13 -9
View File
@@ -2,8 +2,12 @@ import i18n from 'i18next';
import { initReactI18next } from 'react-i18next';
import LanguageDetector from 'i18next-browser-languagedetector';
// Import shared translations
import { translations } from '@pezkuwi/i18n';
// Import LOCAL .ts translations
import en from './locales/en';
import tr from './locales/tr';
import kmr from './locales/kmr';
import ar from './locales/ar';
import fa from './locales/fa';
export const languages = {
en: { name: 'English', flag: '🇬🇧', dir: 'ltr' },
@@ -15,12 +19,12 @@ export const languages = {
};
const resources = {
en: { translation: translations.en },
tr: { translation: translations.tr },
'ku-kurmanji': { translation: translations['ku-kurmanji'] },
'ku-sorani': { translation: translations['ku-sorani'] },
ar: { translation: translations.ar },
fa: { translation: translations.fa }
en: { translation: en },
tr: { translation: tr },
'ku-kurmanji': { translation: kmr },
'ku-sorani': { translation: kmr },
ar: { translation: ar },
fa: { translation: fa }
};
i18n
@@ -39,4 +43,4 @@ i18n
}
});
export default i18n;
export default i18n;