You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
600 B
JavaScript
28 lines
600 B
JavaScript
4 years ago
|
var EN = require("../www/common/translations/messages.json");
|
||
|
|
||
|
var simpleTags = [
|
||
|
'<br>',
|
||
|
'<br />',
|
||
|
];
|
||
|
|
||
|
['a', 'b', 'em', 'p'].forEach(function (tag) {
|
||
|
simpleTags.push('<' + tag + '>');
|
||
|
simpleTags.push('</' + tag + '>');
|
||
|
});
|
||
|
|
||
|
Object.keys(EN).forEach(function (k) {
|
||
|
var s = EN[k];
|
||
|
if (typeof(s) !== 'string') { return; }
|
||
|
var usesHTML;
|
||
|
|
||
|
s.replace(/<.*?>/g, function (html) {
|
||
|
if (simpleTags.indexOf(html) !== -1) { return; }
|
||
|
usesHTML = true;
|
||
|
console.log("{%s}", html);
|
||
|
});
|
||
|
|
||
|
if (usesHTML) {
|
||
|
console.log("[%s] %s\n", k, s);
|
||
|
}
|
||
|
});
|