Merge branch 'staging' of github.com:xwiki-labs/cryptpad into staging

pull/1/head
yflory 8 years ago
commit 328e5c6f03

@ -234,7 +234,7 @@ define(function () {
"<li>You can import pads which were recently viewed in your browser so you have them in your account.</li>",
"<li>If you are using a shared computer, you need to log out when you are done, closing the tab is not enough.</li>",
"</ul>"
];
].join('');
// Settings
out.settings_title = "Settings";

@ -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);

Loading…
Cancel
Save