Merge branch 'staging' of github.com:xwiki-labs/cryptpad into staging
This commit is contained in:
@@ -141,22 +141,6 @@ define([
|
||||
strungJSON(orig);
|
||||
});
|
||||
|
||||
assert(function () {
|
||||
var todo = function (missing) {
|
||||
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);
|
||||
|
||||
return true;
|
||||
}, "expected all translation keys in default language to be present in all translations. See console for details.");
|
||||
|
||||
var swap = function (str, dict) {
|
||||
return str.replace(/\{\{(.*?)\}\}/g, function (all, key) {
|
||||
return typeof dict[key] !== 'undefined'? dict[key] : all;
|
||||
|
||||
@@ -21,6 +21,7 @@ define([
|
||||
var code = msg[0];
|
||||
var key = msg[1];
|
||||
var needed = msg[2];
|
||||
var value = msg[3] || '""';
|
||||
|
||||
if (str !== code) {
|
||||
if (str !== "")
|
||||
@@ -38,10 +39,11 @@ define([
|
||||
}
|
||||
}
|
||||
|
||||
res += (need ? '' : '// ') + 'out.' + key + ' = "";';
|
||||
if (need)
|
||||
{
|
||||
res += (need ? '' : '// ') + 'out.' + key + ' = ' + value + ';';
|
||||
if (need === 1) {
|
||||
res += ' // ' + JSON.stringify(English[key]);
|
||||
} else if (need === 2) {
|
||||
res += ' // TODO: Key updated --> make sure the updated key "'+ value +'" exists and is translated before that one.';
|
||||
}
|
||||
return res;
|
||||
}).join('\n')));
|
||||
|
||||
Reference in New Issue
Block a user