add page for listing missing translations
This commit is contained in:
21
www/assert/translations/main.js
Normal file
21
www/assert/translations/main.js
Normal file
@@ -0,0 +1,21 @@
|
||||
define([
|
||||
'/bower_components/jquery/dist/jquery.min.js',
|
||||
'/common/cryptpad-common.js',
|
||||
], function (jQuery, Cryptpad) {
|
||||
var $ = window.jQuery;
|
||||
|
||||
var $body = $('body');
|
||||
var missing = Cryptpad.Messages._checkTranslationState();
|
||||
|
||||
var pre = function (text, opt) {
|
||||
return $('<pre>', opt).text(text);
|
||||
};
|
||||
|
||||
if (missing.length) {
|
||||
$body.append(pre(missing.map(function (msg) {
|
||||
return '* ' + msg;
|
||||
}).join('\n')));
|
||||
} else {
|
||||
$body.text('All keys are present in all translations');
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user