diff --git a/www/assert/main.js b/www/assert/main.js index dc3c2087e..f3b6c6fe2 100644 --- a/www/assert/main.js +++ b/www/assert/main.js @@ -4,7 +4,8 @@ define([ '/bower_components/hyperjson/hyperjson.js', '/bower_components/textpatcher/TextPatcher.amd.js', 'json.sortify', -], function (jQuery, Hyperjson, TextPatcher, Sortify) { + '/common/cryptpad-common.js', +], function (jQuery, Hyperjson, TextPatcher, Sortify, Cryptpad) { var $ = window.jQuery; window.Hyperjson = Hyperjson; window.TextPatcher = TextPatcher; @@ -140,6 +141,19 @@ define([ strungJSON(orig); }); + assert(function () { + var missing = Cryptpad.Messages._checkTranslationState(); + + if (missing.length !== 0) { + missing.forEach(function (msg) { + console.log('* ' + msg); + }); + + return false; + } + return true; + }, "expected all translation keys in default language to be present in all translations. See console for details."); + var swap = function (str, dict) { return str.replace(/\{\{(.*?)\}\}/g, function (all, key) { return typeof dict[key] !== 'undefined'? dict[key] : all;