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);
|
||||
});
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
define([
|
||||
'/common/cryptpad-common.js',
|
||||
'/customize/languageSelector.js',
|
||||
'/common/login.js',
|
||||
'/bower_components/jquery/dist/jquery.min.js',
|
||||
], function (Cryptpad, LS, Login) {
|
||||
], function (Cryptpad, Login) {
|
||||
var $ = window.$;
|
||||
|
||||
var APP = window.APP = {
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
<script>
|
||||
require.config({
|
||||
waitSeconds: 60,
|
||||
urlArgs: "bust=1.0.0",
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
|
||||
Reference in New Issue
Block a user