|
|
@ -7,11 +7,18 @@ var simpleTags = [
|
|
|
|
'<a href="/login/">',
|
|
|
|
'<a href="/login/">',
|
|
|
|
'<a href="/register/">',
|
|
|
|
'<a href="/register/">',
|
|
|
|
|
|
|
|
|
|
|
|
// XXX
|
|
|
|
// FIXME
|
|
|
|
"<a href='#'>",
|
|
|
|
"<a href='#'>",
|
|
|
|
'<h3>',
|
|
|
|
'<h3>',
|
|
|
|
'</h3>',
|
|
|
|
'</h3>',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// FIXME register_notes
|
|
|
|
|
|
|
|
'<ul class="cp-notes-list">',
|
|
|
|
|
|
|
|
'</ul>',
|
|
|
|
|
|
|
|
'<li>',
|
|
|
|
|
|
|
|
'</li>',
|
|
|
|
|
|
|
|
'<span class="red">',
|
|
|
|
|
|
|
|
'</span>',
|
|
|
|
];
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
['a', 'b', 'em', 'p', 'i'].forEach(function (tag) {
|
|
|
|
['a', 'b', 'em', 'p', 'i'].forEach(function (tag) {
|
|
|
@ -19,12 +26,11 @@ var simpleTags = [
|
|
|
|
simpleTags.push('</' + tag + '>');
|
|
|
|
simpleTags.push('</' + tag + '>');
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
var PENDING_ENGLISH_KEYS = [];
|
|
|
|
// these keys are known to be problematic
|
|
|
|
|
|
|
|
var KNOWN_ISSUES = [ // FIXME
|
|
|
|
var KNOWN_ISSUES = [ // XXX
|
|
|
|
|
|
|
|
//'newVersion',
|
|
|
|
//'newVersion',
|
|
|
|
'fm_info_anonymous',
|
|
|
|
//'fm_info_anonymous',
|
|
|
|
'register_notes',
|
|
|
|
//'register_notes',
|
|
|
|
];
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
var processLang = function (map, lang, primary) {
|
|
|
|
var processLang = function (map, lang, primary) {
|
|
|
@ -37,7 +43,7 @@ var processLang = function (map, lang, primary) {
|
|
|
|
|
|
|
|
|
|
|
|
Object.keys(map).forEach(function (k) {
|
|
|
|
Object.keys(map).forEach(function (k) {
|
|
|
|
if (!EN[k]) { return; }
|
|
|
|
if (!EN[k]) { return; }
|
|
|
|
if (KNOWN_ISSUES.indexOf(k) !== -1) { return; } // XXX
|
|
|
|
if (KNOWN_ISSUES.indexOf(k) !== -1) { return; }
|
|
|
|
|
|
|
|
|
|
|
|
var s = map[k];
|
|
|
|
var s = map[k];
|
|
|
|
if (typeof(s) !== 'string') { return; }
|
|
|
|
if (typeof(s) !== 'string') { return; }
|
|
|
@ -53,17 +59,9 @@ var processLang = function (map, lang, primary) {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
if (usesHTML) {
|
|
|
|
if (usesHTML) {
|
|
|
|
if (primary) {
|
|
|
|
announce();
|
|
|
|
PENDING_ENGLISH_KEYS.push(k);
|
|
|
|
console.log("%s", s);
|
|
|
|
} else {
|
|
|
|
console.log("[%s]\n", k);
|
|
|
|
// XXX ignore HTML in translations if they are also present in English
|
|
|
|
|
|
|
|
//if (PENDING_ENGLISH_KEYS.indexOf(k) !== -1) { return; }
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (true || !primary) {
|
|
|
|
|
|
|
|
announce();
|
|
|
|
|
|
|
|
console.log("%s", s);
|
|
|
|
|
|
|
|
console.log("[%s]\n", k);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|