1- import { defaults , debounce , getPath , setPath , pushPath } from './utils.js'
1+ import { defaults , debounce , getPath , setPath , pushPath , interpolate } from './utils.js'
22import { readFile , readFileSync } from './readFile.js'
33import { writeFile , removeFile } from './writeFile.js'
44
@@ -35,7 +35,7 @@ class Backend {
3535 if ( typeof this . options . loadPath === 'function' ) {
3636 loadPath = this . options . loadPath ( language , namespace )
3737 }
38- const filename = this . services . interpolator . interpolate ( loadPath , { lng : language , ns : namespace } )
38+ const filename = interpolate ( loadPath , { lng : language , ns : namespace } )
3939 if ( this . allOptions . initAsync === false || this . allOptions . initImmediate === false ) {
4040 try {
4141 const { data, stat } = readFileSync ( filename , this . options )
@@ -98,7 +98,7 @@ class Backend {
9898 if ( typeof this . options . addPath === 'function' ) {
9999 addPath = this . options . addPath ( language , namespace )
100100 }
101- const filename = this . services . interpolator . interpolate ( addPath , { lng : language , ns : namespace } )
101+ const filename = interpolate ( addPath , { lng : language , ns : namespace } )
102102 removeFile ( filename , this . options )
103103 . then ( ( ) => { } )
104104 . catch ( ( ) => { } )
@@ -124,7 +124,7 @@ class Backend {
124124 addPath = this . options . addPath ( lng , namespace )
125125 }
126126
127- const filename = this . services . interpolator . interpolate ( addPath , { lng, ns : namespace } )
127+ const filename = interpolate ( addPath , { lng, ns : namespace } )
128128
129129 const missings = getPath ( this . queuedWrites , [ lng , namespace ] )
130130 setPath ( this . queuedWrites , [ lng , namespace ] , [ ] )
0 commit comments