diff --git a/customize.dist/translations/messages.js b/customize.dist/translations/messages.js
index 9ba0402ac..6a339a033 100644
--- a/customize.dist/translations/messages.js
+++ b/customize.dist/translations/messages.js
@@ -234,7 +234,7 @@ define(function () {
"
You can import pads which were recently viewed in your browser so you have them in your account.",
"If you are using a shared computer, you need to log out when you are done, closing the tab is not enough.",
""
- ];
+ ].join('');
// Settings
out.settings_title = "Settings";
diff --git a/www/assert/translations/main.js b/www/assert/translations/main.js
index 0324e55f2..1b1683afe 100644
--- a/www/assert/translations/main.js
+++ b/www/assert/translations/main.js
@@ -1,7 +1,8 @@
define([
'/bower_components/jquery/dist/jquery.min.js',
'/common/cryptpad-common.js',
-], function (jQuery, Cryptpad) {
+ '/customize/translations/messages.js',
+], function (jQuery, Cryptpad, English) {
var $ = window.jQuery;
var $body = $('body');
@@ -11,12 +12,41 @@ define([
};
var todo = function (missing) {
+ var str = "";
+ var need = 1;
+
if (missing.length) {
$body.append(pre(missing.map(function (msg) {
- return '* ' + msg;
+ var res = "";
+ var code = msg[0];
+ var key = msg[1];
+ var needed = msg[2];
+
+ if (str !== code) {
+ if (str !== "")
+ {
+ res += '\n';
+ }
+ str = code;
+ res += '/*\n *\n * ' + code + '\n *\n */\n\n';
+ }
+ if (need !== needed) {
+ need = needed;
+ if (need === 0)
+ {
+ res += '\n// TODO: These keys are not needed anymore and should be removed ('+ code + ')\n\n';
+ }
+ }
+
+ res += (need ? '' : '// ') + 'out.' + key + ' = "";';
+ if (need)
+ {
+ res += ' // ' + JSON.stringify(English[key]);
+ }
+ return res;
}).join('\n')));
} else {
- $body.text('All keys are present in all translations');
+ $body.text('// All keys are present in all translations');
}
};
Cryptpad.Messages._checkTranslationState(todo);