/* @desc Word checker Tests the JavaScript-side i18n translation arrays for completeness and generates an empty template containing all the keys for new translations. Is included by output-words.html. @author Pekka Gaiser @package Part of the ASKBOT project @license Published with NO WARRANTY WHATSOEVER under the same license as the Askbot project. @version First release, May 7th 2010 */ function output() { document.write("

Translation check

"); var allKeys = new Array(); for (var key in i18n) { if(!i18n.hasOwnProperty(key)) continue; for (var word in i18n[key]) { if(!i18n[key].hasOwnProperty(word)) continue; if (jQuery.inArray(word, allKeys) == -1) allKeys.push(word); } } // Output all keys for (var key in allKeys.sort()) { document.write(""); else document.write(""); escape(i18n[language][key]) } document.write(""); } document.write("
"); document.write(allKeys[key]); document.write(""); // Check word in all languages for (var language in i18n) { if(!i18n.hasOwnProperty(language)) continue; if ((!i18n[language][allKeys[key]]) || (i18n[language][allKeys[key]] == "")) document.write(""+language+""+language+"
"); // Translation template document.write("

Template for new translation

"); document.write(""); document.write("
"); }