i18n welcome

This commit is contained in:
Matthew Hodgson 2017-05-31 11:02:59 +01:00
parent e16e52915b
commit 17e80d7757
2 changed files with 30 additions and 33 deletions

View file

@ -61,10 +61,7 @@ module.exports = React.createClass({
this.setState({ page: "Couldn't load home page" });
}
// We parse the JSON ourselves rather than use the JSON
// parameter, since this throws a parse error on empty
// which breaks if there's no config.json and we're
// loading from the filesystem (see above).
body.replaceAll(/_t\(['"](.*?)['"]\)/, (match)=>{ return sanitizehtml_t(match[1]) });
this.setState({ page: body });
}
);