File tree Expand file tree Collapse file tree 1 file changed +0
-6
lines changed Expand file tree Collapse file tree 1 file changed +0
-6
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ export class TranslatorError extends Error {
11
11
constructor ( msg ) {
12
12
super ( 'Translator: ' + msg ) ;
13
13
this . name = 'TranslatorError' ;
14
-
15
14
}
16
15
}
17
16
@@ -34,11 +33,9 @@ class Translator extends Class {
34
33
* @example setLang('zh-CN')
35
34
*/
36
35
setLang ( lang ) {
37
-
38
36
const newLanguageNodes = this . languages [ lang ] ;
39
37
if ( ! newLanguageNodes ) throw new TranslatorError ( 'Setted Lang does not exist' ) ;
40
38
this . nodes = newLanguageNodes ;
41
-
42
39
}
43
40
44
41
_validateNestedProps ( nestedProps ) {
@@ -76,14 +73,11 @@ class Translator extends Class {
76
73
} catch ( err ) {
77
74
throw new TranslatorError ( 'Unable to find the text translated in lang json' + err . message ) ;
78
75
}
79
-
80
76
} else {
81
77
translatedText = this . nodes [ textNode ] ;
82
78
return translatedText ;
83
79
}
84
-
85
80
} else {
86
- // what to do if textnode has no dot on string
87
81
throw new TranslatorError ( 'Param passed has to be a String' ) ;
88
82
}
89
83
}
You can’t perform that action at this time.
0 commit comments