Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 18 additions & 15 deletions invokeai/frontend/web/src/i18.d.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
import 'i18next';
// TODO: Disabled for IDE performance issues with our translation JSON

import en from '../public/locales/en.json';
// import 'i18next';

declare module 'i18next' {
// Extend CustomTypeOptions
interface CustomTypeOptions {
// Setting Default Namespace As English
defaultNS: 'en';
// Custom Types For Resources
resources: {
en: typeof en;
};
// Never Return Null
returnNull: false;
}
}
// import en from '../public/locales/en.json';

// declare module 'i18next' {
// // Extend CustomTypeOptions
// interface CustomTypeOptions {
// // Setting Default Namespace As English
// defaultNS: 'en';
// // Custom Types For Resources
// resources: {
// en: typeof en;
// };
// // Never Return Null
// returnNull: false;
// }
// }
export default {};
2 changes: 2 additions & 0 deletions invokeai/frontend/web/src/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import LanguageDetector from 'i18next-browser-languagedetector';
import Backend from 'i18next-http-backend';
import { initReactI18next } from 'react-i18next';

// TODO: Disabled for IDE performance issues with our translation JSON
// @ts-ignore
import translationEN from '../public/locales/en.json';
import { LOCALSTORAGE_PREFIX } from 'app/store/constants';

Expand Down
3 changes: 2 additions & 1 deletion invokeai/frontend/web/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"forceConsistentCasingInFileNames": true,
"module": "ESNext",
"moduleResolution": "Node",
"resolveJsonModule": true,
// TODO: Disabled for IDE performance issues with our translation JSON
// "resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx",
Expand Down