1 | export default function translate(lang, str) { |
||
2 | var trad = Locales |
||
0 ignored issues
–
show
|
|||
3 | if ( |
||
4 | typeof trad[lang] !== 'undefined' && |
||
5 | trad[lang] !== null && |
||
6 | typeof trad[lang][str] !== 'undefined' && |
||
7 | trad[lang][str] !== null |
||
8 | ) { |
||
9 | return trad[lang][str] |
||
10 | } |
||
11 | return str |
||
12 | } |
||
13 |
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.