Issues (697)

cli/cms/templates/handlebars/translate-front.js (1 issue)

Labels
Severity
1
export default function translate(lang, str) {
2
  var trad = Locales
0 ignored issues
show
The variable Locales seems to be never declared. If this is a global, consider adding a /** global: Locales */ comment.

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.

Loading history...
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