Translations for new version detected

This commit is contained in:
yflory 2018-06-11 18:18:39 +02:00
parent 089e0361b6
commit 4dec2cca5c
5 changed files with 11 additions and 4 deletions

View File

@ -39,6 +39,8 @@ define(function () {
'Appuyez sur <em>Échap</em> pour voir le pad ou rechargez la page pour pouvoir le modifier à nouveau.';
out.errorCopy = ' Vous pouvez toujours copier son contenu ailleurs en appuyant sur <em>Échap</em>.<br> Dés que vous aurez quitté la page, il sera impossible de le récupérer.';
out.errorRedirectToHome = 'Appuyez sur <em>Échap</em> pour retourner vers votre CryptDrive.';
out.newVersionError = "Une nouvelle version de CryptPad est disponible.<br>" +
"<a href='#'>Rechargez la page</a> pour utiliser la nouvelle version, ou appuyez sur Échap pour accéder au contenu actuel en <b>mode hors-ligne</b>.";
out.loading = "Chargement...";
out.error = "Erreur";

View File

@ -40,6 +40,8 @@ define(function () {
'Hit <em>Esc</em> to continue to view this pad, or reload to try editing again.';
out.errorCopy = ' You can still copy the content to another location by pressing <em>Esc</em>.<br>Once you leave this page, it will disappear forever!';
out.errorRedirectToHome = 'Press <em>Esc</em> to be redirected to your CryptDrive.';
out.newVersionError = "A new version of CryptPad is available.<br>" +
"<a href='#'>Reload</a> to use the new version, or press escape to access your content in <b>read-only mode</b>.";
out.loading = "Loading...";
out.error = "Error";

View File

@ -626,6 +626,7 @@ define([
h('p.cp-loading-progress-drive'),
h('p.cp-loading-progress-pad')
]);
$(progress).hide();
$loading.find('.cp-loading-container').append(progress);
} else if (config.noProgress) {
$loading.find('.cp-loading-progress').remove();
@ -647,6 +648,7 @@ define([
UI.updateLoadingProgress = function (data, isDrive) {
var $loading = $('#' + LOADING);
if (!$loading.length || loading.error) { return; }
$loading.find('.cp-loading-progress').show();
var $progress;
if (isDrive) {
// Drive state

View File

@ -237,7 +237,6 @@ define([], function () {
};
network.on('disconnect', function (reason) {
console.log('disconnect');
//if (isIntentionallyLeaving) { return; }
if (reason === "network.disconnect() called") { return; }
onDisconnect();

View File

@ -439,9 +439,11 @@ define([
});
ctx.sframeChan.on('EV_NEW_VERSION', function () {
// TODO display new verison stuff
// XXX
UI.errorLoadingScreen("New version detected", true, true);
var $err = $('<div>').append(Messages.newVersionError);
$err.find('a').click(function () {
funcs.gotoURL();
});
UI.errorLoadingScreen($err, true, true);
});
ctx.metadataMgr.onReady(waitFor());