Do not load all the translations anymore, only the needed one
This commit is contained in:
@@ -142,16 +142,18 @@ define([
|
||||
});
|
||||
|
||||
assert(function () {
|
||||
var missing = Cryptpad.Messages._checkTranslationState();
|
||||
var todo = function (missing) {
|
||||
if (missing.length !== 0) {
|
||||
missing.forEach(function (msg) {
|
||||
console.log('* ' + msg);
|
||||
});
|
||||
|
||||
if (missing.length !== 0) {
|
||||
missing.forEach(function (msg) {
|
||||
console.log('* ' + msg);
|
||||
});
|
||||
// No, this is crappy, it's going to cause tests to fail basically all of the time.
|
||||
//return false;
|
||||
}
|
||||
};
|
||||
Cryptpad.Messages._checkTranslationState(todo);
|
||||
|
||||
// No, this is crappy, it's going to cause tests to fail basically all of the time.
|
||||
//return false;
|
||||
}
|
||||
return true;
|
||||
}, "expected all translation keys in default language to be present in all translations. See console for details.");
|
||||
|
||||
|
||||
@@ -5,17 +5,19 @@ define([
|
||||
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');
|
||||
}
|
||||
var todo = function (missing) {
|
||||
if (missing.length) {
|
||||
$body.append(pre(missing.map(function (msg) {
|
||||
return '* ' + msg;
|
||||
}).join('\n')));
|
||||
} else {
|
||||
$body.text('All keys are present in all translations');
|
||||
}
|
||||
};
|
||||
Cryptpad.Messages._checkTranslationState(todo);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user