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

This commit is contained in:
ansuz
2017-02-24 12:06:17 +01:00
15 changed files with 303 additions and 151 deletions

View File

@@ -50,9 +50,26 @@ define(req, function(Default, Language) {
var langs = arguments;
Object.keys(externalMap).forEach(function (code, i) {
var translation = langs[i];
var updated = {};
Object.keys(Default).forEach(function (k) {
if (/^updated_[0-9]+_/.test(k) && !translation[k]) {
var key = k.split('_').slice(2).join('_');
// Make sure we don't already have an update for that key. It should not happen
// but if it does, keep the latest version
if (updated[key]) {
var ek = updated[key];
if (parseInt(ek.split('_')[1]) > parseInt(k.split('_')[1])) { return; }
}
updated[key] = k;
}
});
Object.keys(Default).forEach(function (k) {
if (/^_/.test(k)) { return; }
if (!translation[k]) {
if (!translation[k] || updated[k]) {
if (updated[k]) {
missing.push([code, k, 2, 'out.' + updated[k]]);
return;
}
missing.push([code, k, 1]);
}
});
@@ -62,10 +79,6 @@ define(req, function(Default, Language) {
missing.push([code, k, 0]);
}
});
/*if (typeof(translation._languageName) !== 'string') {
var warning = 'key [_languageName] is missing from translation [' + code + ']';
missing.push(warning);
}*/
});
cb(missing);
});

View File

@@ -12,7 +12,8 @@ define(function () {
out.type.poll = 'Encuesta';
out.type.slide = 'Presentación';
out.common_connectionLost = "<b>Connexión perdida</b><br>El documento está ahora en modo solo lectura hasta que la conexión vuelva.";
out.updated_0_common_connectionLost = "<b>Connexión perdida</b><br>El documento está ahora en modo solo lectura hasta que la conexión vuelva.";
out.common_connectionLost = out.updated_0_common_connectionLost;
out.disconnected = "Desconectado";
out.synchronizing = "Sincronización";

View File

@@ -16,7 +16,8 @@ define(function () {
out.button_newpoll = 'Nouveau sondage';
out.button_newslide = 'Nouvelle présentation';
out.common_connectionLost = "<b>Connexion au serveur perdue</b><br>Vous êtes désormais en mode lecture seule jusqu'au retour de la connexion.";
out.updated_0_common_connectionLost = "<b>Connexion au serveur perdue</b><br>Vous êtes désormais en mode lecture seule jusqu'au retour de la connexion.";
out.common_connectionLost = out.updated_0_common_connectionLost;
out.websocketError = 'Impossible de se connecter au serveur WebSocket...';
out.typeError = "Ce document temps-réel n'est pas compatible avec l'application sélectionnée";

View File

@@ -18,8 +18,8 @@ define(function () {
// NOTE: We want to update the 'common_connectionLost' key.
// Please do not add a new 'updated_common_connectionLostAndInfo' but change directly the value of 'common_connectionLost'
out.updated_common_connectionLostAndInfo = "<b>Server Connection Lost</b><br>You're now in read-only mode until the connection is back.";
out.common_connectionLost = out.updated_common_connectionLostAndInfo;
out.updated_0_common_connectionLost = "<b>Server Connection Lost</b><br>You're now in read-only mode until the connection is back.";
out.common_connectionLost = out.updated_0_common_connectionLost;
out.websocketError = 'Unable to connect to the websocket server...';
out.typeError = "That realtime document is not compatible with the selected application";