File tree Expand file tree Collapse file tree 2 files changed +2
-9
lines changed Expand file tree Collapse file tree 2 files changed +2
-9
lines changed Original file line number Diff line number Diff line change 1
1
import fs from 'fs-extra' ;
2
2
import TsconfigPathsPlugin from 'tsconfig-paths-webpack-plugin' ;
3
3
import webpack from 'webpack' ;
4
- import translations from '../src/script/translations.js' ;
5
4
6
5
const BUILD = fs . readJsonSync ( '.build.json' ) ;
7
6
@@ -36,7 +35,6 @@ export default {
36
35
} ,
37
36
plugins : [
38
37
new webpack . DefinePlugin ( { __BUILD__ : JSON . stringify ( BUILD ) } ) ,
39
- new webpack . DefinePlugin ( { __TRANSLATIONS__ : JSON . stringify ( translations ) } ) ,
40
38
] ,
41
39
resolve : {
42
40
extensions : [ '.js' , '.ts' ] ,
Original file line number Diff line number Diff line change 1
1
import i18next , { i18n } from 'i18next' ;
2
+ import translations from '@APF/translations.js' ;
2
3
import { stringArray } from '@APF/lib/helper' ;
3
4
4
- // __TRANSLATIONS__ is injected by webpack from ROOT/src/script/
5
- /* eslint-disable-next-line @typescript-eslint/naming-convention */
6
- declare const __TRANSLATIONS__ : any ;
7
-
8
5
export default class Translation {
9
6
i18next : i18n ;
10
7
11
- static readonly translations = typeof __TRANSLATIONS__ == 'undefined' ? { common : { } } : __TRANSLATIONS__ ;
12
-
13
8
//#region Class reference helpers
14
9
// Can be overridden in children classes
15
10
get Class ( ) { return ( this . constructor as typeof Translation ) ; }
@@ -22,7 +17,7 @@ export default class Translation {
22
17
lng : language ,
23
18
fallbackLng : 'en' ,
24
19
ns : namespaces ,
25
- resources : this . Class . translations ,
20
+ resources : translations
26
21
} ) ;
27
22
}
28
23
You can’t perform that action at this time.
0 commit comments