File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed
packages/cli/src/infrastructures Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @vue-storefront/cli " : patch
3
+ ---
4
+
5
+ [ FIXED] Added back missing i18next infrastructure file to fix CLI error.
Original file line number Diff line number Diff line change
1
+ import path from "path" ;
2
+ import i18next from "i18next" ;
3
+ import Backend from "i18next-fs-backend" ;
4
+ import getLocale from "os-locale" ;
5
+
6
+ export const setupI18Next = async ( ) : Promise < void > => {
7
+ await i18next . use ( Backend ) . init ( {
8
+ backend : {
9
+ loadPath : path . resolve ( __dirname , "../../locales/{{lng}}/{{ns}}.json" ) ,
10
+ } ,
11
+ fallbackLng : "en-US" ,
12
+ interpolation : {
13
+ // Escaping is only required to prevent XSS attacks in the front-end
14
+ escapeValue : false ,
15
+ } ,
16
+ lng : await getLocale ( ) ,
17
+ } ) ;
18
+ } ;
You can’t perform that action at this time.
0 commit comments