Fix some more lint errors

Signed-off-by: Aaron Raimist <aaron@raim.ist>
This commit is contained in:
Aaron Raimist 2018-10-11 22:05:59 -05:00
parent 954d49f22e
commit 752d816780
No known key found for this signature in database
GPG key ID: 37419210002890EF
3 changed files with 8 additions and 11 deletions

View file

@ -97,19 +97,17 @@ export function _t(text, variables, tags) {
// The translation returns text so there's no XSS vector here (no unsafe HTML, no code execution)
const translated = safeCounterpartTranslate(text, args);
let substituted = substitute(translated, variables, tags);
const substituted = substitute(translated, variables, tags);
// For development/testing purposes it is useful to also output the original string
// Don't do that for release versions
if (ANNOTATE_STRINGS) {
if (typeof substituted === 'string') {
return `@@${text}##${substituted}@@`
}
else {
return `@@${text}##${substituted}@@`;
} else {
return <span className='translated-string' data-orig-string={text}>{substituted}</span>;
}
}
else {
} else {
return substituted;
}
}