Fix widget i18n missing locale files and clean up unused locales
- widget/i18n/index.js: only import en.json and zh_CN.json (the only locale files present); remove 40+ imports for missing locale JSONs that caused Vite compile failure and global white screen - dashboard/i18n/index.js: remove unused locale imports for consistency - Remove 62 unused locale JSON files from widget/i18n/locale/ - Minor: update index.html, test helpers, e2e test, languages spec
This commit is contained in:
+2
-2
@@ -2,7 +2,7 @@ import { getLanguageName, getLanguageDirection } from '../languages';
|
||||
|
||||
describe('#getLanguageName', () => {
|
||||
it('Returns correct language name', () => {
|
||||
expect(getLanguageName('es')).toEqual('Spanish');
|
||||
expect(getLanguageName('zh')).toEqual('Chinese');
|
||||
expect(getLanguageName()).toEqual('');
|
||||
expect(getLanguageName('rrr')).toEqual('');
|
||||
expect(getLanguageName('')).toEqual('');
|
||||
@@ -11,7 +11,7 @@ describe('#getLanguageName', () => {
|
||||
|
||||
describe('#getLanguageDirection', () => {
|
||||
it('Returns correct language direction', () => {
|
||||
expect(getLanguageDirection('es')).toEqual(false);
|
||||
expect(getLanguageDirection('en')).toEqual(false);
|
||||
expect(getLanguageDirection('ar')).toEqual(true);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user