Skip to content

Commit 48e4efe

Browse files
authored
Cleanup translator.js
wrong sectioned comments
1 parent 453e7b3 commit 48e4efe

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

src/lang/translator.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ export class TranslatorError extends Error {
1111
constructor(msg) {
1212
super('Translator: ' + msg);
1313
this.name = 'TranslatorError';
14-
1514
}
1615
}
1716

@@ -34,11 +33,9 @@ class Translator extends Class {
3433
* @example setLang('zh-CN')
3534
*/
3635
setLang(lang) {
37-
3836
const newLanguageNodes = this.languages[lang];
3937
if (!newLanguageNodes) throw new TranslatorError('Setted Lang does not exist');
4038
this.nodes = newLanguageNodes;
41-
4239
}
4340

4441
_validateNestedProps(nestedProps) {
@@ -76,14 +73,11 @@ class Translator extends Class {
7673
} catch (err) {
7774
throw new TranslatorError('Unable to find the text translated in lang json' + err.message);
7875
}
79-
8076
} else {
8177
translatedText = this.nodes[textNode];
8278
return translatedText;
8379
}
84-
8580
} else {
86-
// what to do if textnode has no dot on string
8781
throw new TranslatorError('Param passed has to be a String');
8882
}
8983
}

0 commit comments

Comments
 (0)