Add explanations for more disconnect scenarios

pull/1929/head
Marcel Klehr 2013-10-10 21:11:15 +02:00
parent de50efc71a
commit 7f10b9a42f
5 changed files with 56 additions and 10 deletions

View File

@ -1,6 +1,7 @@
{
"index.newPad": "New Pad",
"index.createOpenPad": "or create/open a Pad with the name:",
"pad.toolbar.bold.title": "Bold (Ctrl-B)",
"pad.toolbar.italic.title": "Italic (Ctrl-I)",
"pad.toolbar.underline.title": "Underline (Ctrl-U)",
@ -18,12 +19,15 @@
"pad.toolbar.settings.title": "Settings",
"pad.toolbar.embed.title": "Share and Embed this pad",
"pad.toolbar.showusers.title": "Show the users on this pad",
"pad.colorpicker.save": "Save",
"pad.colorpicker.cancel": "Cancel",
"pad.loading": "Loading...",
"pad.passwordRequired": "You need a password to access this pad",
"pad.permissionDenied": "You do not have permission to access this pad",
"pad.wrongPassword": "Your password was wrong",
"pad.settings.padSettings": "Pad Settings",
"pad.settings.myView": "My View",
"pad.settings.stickychat": "Chat always on screen",
@ -35,6 +39,7 @@
"pad.settings.fontType.monospaced": "Monospace",
"pad.settings.globalView": "Global View",
"pad.settings.language": "Language:",
"pad.importExport.import_export": "Import/Export",
"pad.importExport.import": "Upload any text file or document",
"pad.importExport.importSuccessful": "Successful!",
@ -46,28 +51,41 @@
"pad.importExport.exportopen": "ODF (Open Document Format)",
"pad.importExport.exportdokuwiki": "DokuWiki",
"pad.importExport.abiword.innerHTML": "You only can import from plain text or HTML formats. For more advanced import features please <a href=\"https://github.com/ether/etherpad-lite/wiki/How-to-enable-importing-and-exporting-different-file-formats-in-Ubuntu-or-OpenSuse-or-SLES-with-AbiWord\">install abiword</a>.",
"pad.modals.connected": "Connected.",
"pad.modals.reconnecting": "Reconnecting to your pad..",
"pad.modals.forcereconnect": "Force reconnect",
"pad.modals.userdup": "Opened in another window",
"pad.modals.userdup.explanation": "This pad seems to be opened in more than one browser window on this computer.",
"pad.modals.userdup.advice": "Reconnect to use this window instead.",
"pad.modals.unauth": "Not authorized",
"pad.modals.unauth.explanation": "Your permissions have changed while viewing this page. Try to reconnect.",
"pad.modals.looping": "Disconnected.",
"pad.modals.looping.explanation": "There are communication problems with the synchronization server.",
"pad.modals.looping.cause": "Perhaps you connected through an incompatible firewall or proxy.",
"pad.modals.initsocketfail": "Server is unreachable.",
"pad.modals.initsocketfail.explanation": "Couldn't connect to the synchronization server.",
"pad.modals.initsocketfail.cause": "This is probably due to a problem with your browser or your internet connection.",
"pad.modals.slowcommit": "Disconnected.",
"pad.modals.slowcommit.explanation": "The server is not responding.",
"pad.modals.slowcommit.cause": "This could be due to problems with network connectivity.",
"pad.modals.badChangeset.explanation": "An edit you have made was classified illegal by the synchronization server.",
"pad.modals.badChangeset.cause": "This could be due to a wrong server configuration or some other unexpected behaviour. Please contact the service administrator, if you feel this is an error. Try to reconnect in order to continue editing.",
"pad.modals.corruptPad.explanation": "The pad you are trying to access is corrupt.",
"pad.modals.corruptPad.cause": "This may be due to a wrong server configuration or some other unexpected behaviour. Please contact the service administrator.",
"pad.modals.deleted": "Deleted.",
"pad.modals.deleted.explanation": "This pad has been removed.",
"pad.modals.disconnected": "You have been disconnected.",
"pad.modals.disconnected.explanation": "The connection to the server was lost",
"pad.modals.disconnected.cause": "The server may be unavailable. Please notify us if this continues to happen.",
"pad.modals.disconnected.cause": "The server may be unavailable. Please notify the service administrator if this continues to happen.",
"pad.share": "Share this pad",
"pad.share.readonly": "Read only",
"pad.share.link": "Link",
@ -75,6 +93,7 @@
"pad.chat": "Chat",
"pad.chat.title": "Open the chat for this pad.",
"pad.chat.loadmessages": "Load more messages",
"timeslider.pageTitle": "{{appTitle}} Timeslider",
"timeslider.toolbar.returnbutton": "Return to pad",
"timeslider.toolbar.authors": "Authors:",
@ -83,6 +102,7 @@
"timeslider.exportCurrent": "Export current version as:",
"timeslider.version": "Version {{version}}",
"timeslider.saved": "Saved {{month}} {{day}}, {{year}}",
"timeslider.dateformat": "{{month}}/{{day}}/{{year}} {{hours}}:{{minutes}}:{{seconds}}",
"timeslider.month.january": "January",
"timeslider.month.february": "February",
@ -96,6 +116,7 @@
"timeslider.month.october": "October",
"timeslider.month.november": "November",
"timeslider.month.december": "December",
"timeslider.unnamedauthors": "{{num}} unnamed {[plural(num) one: author, other: authors ]}",
"pad.savedrevs.marked": "This revision is now marked as a saved revision",
"pad.userlist.entername": "Enter your name",
@ -104,6 +125,7 @@
"pad.userlist.deny": "Deny",
"pad.userlist.approve": "Approve",
"pad.editbar.clearcolors": "Clear authorship colors on entire document?",
"pad.impexp.importbutton": "Import Now",
"pad.impexp.importing": "Importing...",
"pad.impexp.confirmimport": "Importing a file will overwrite the current text of the pad. Are you sure you want to proceed?",

View File

@ -1011,7 +1011,7 @@ function handleClientReady(client, message)
atext.attribs = attribsForWire.translated;
}catch(e) {
console.error(e.stack || e)
client.json.send({disconnect:"padCorrupted"});// pull the breaks
client.json.send({disconnect:"corruptPad"});// pull the breaks
return callback();
}

View File

@ -66,11 +66,11 @@ var padconnectionstatus = (function()
};
var k = String(msg).toLowerCase(); // known reason why
if (!(k == 'userdup' || k == 'deleted' || k == 'looping' || k == 'slowcommit' || k == 'initsocketfail' || k == 'unauth'))
if (!(k == 'userdup' || k == 'deleted' || k == 'looping' || k == 'slowcommit' || k == 'initsocketfail' || k == 'unauth' || k == 'badChangeset' || k == 'corruptPad'))
{
k = 'disconnected';
}
padmodals.showModal(k);
padmodals.showOverlay();
},

View File

@ -317,7 +317,7 @@
<button id="forcereconnect" data-l10n-id="pad.modals.forcereconnect"></button>
</div>
<div class="looping">
<h1 data-l10n-id="pad.modals.looping"></h1>
<h1 data-l10n-id="pad.modals.disconnected"></h1>
<h2 data-l10n-id="pad.modals.looping.explanation"></h2>
<p data-l10n-id="pad.modals.looping.cause"></p>
</div>
@ -327,11 +327,22 @@
<p data-l10n-id="pad.modals.initsocketfail.cause"></p>
</div>
<div class="slowcommit">
<h1 data-l10n-id="pad.modals.slowcommit"></h1>
<h1 data-l10n-id="pad.modals.disconnected"></h1>
<h2 data-l10n-id="pad.modals.slowcommit.explanation"></h2>
<p data-l10n-id="pad.modals.slowcommit.cause"></p>
<button id="forcereconnect" data-l10n-id="pad.modals.forcereconnect"></button>
</div>
<div class="badChangeset">
<h1 data-l10n-id="pad.modals.disconnected"></h1>
<h2 data-l10n-id="pad.modals.badChangeset.explanation"></h2>
<p data-l10n-id="pad.modals.badChangeset.cause"></p>
<button id="forcereconnect" data-l10n-id="pad.modals.forcereconnect"></button>
</div>
<div class="corruptPad">
<h1 data-l10n-id="pad.modals.disconnected"></h1>
<h2 data-l10n-id="pad.modals.corruptPad.explanation"></h2>
<p data-l10n-id="pad.modals.corruptPad.cause"></p>
</div>
<div class="deleted">
<h1 data-l10n-id="pad.modals.deleted"></h1>
<p data-l10n-id="pad.modals.deleted.explanation"></p>

View File

@ -135,7 +135,7 @@
<button id="forcereconnect" data-l10n-id="pad.modals.forcereconnect"></button>
</div>
<div class="looping">
<h1 data-l10n-id="pad.modals.looping"></h1>
<h1 data-l10n-id="pad.modals.disconnected"></h1>
<h2 data-l10n-id="pad.modals.looping.explanation"></h2>
<p data-l10n-id="pad.modals.looping.cause"></p>
</div>
@ -145,20 +145,33 @@
<p data-l10n-id="pad.modals.initsocketfail.cause"></p>
</div>
<div class="slowcommit">
<h1 data-l10n-id="pad.modals.slowcommit"></h1>
<h1 data-l10n-id="pad.modals.disconnected"></h1>
<h2 data-l10n-id="pad.modals.slowcommit.explanation"></h2>
<p data-l10n-id="pad.modals.slowcommit.cause"></p>
<button id="forcereconnect" data-l10n-id="pad.modals.forcereconnect"></button>
</div>
<div class="badChangeset">
<h1 data-l10n-id="pad.modals.disconnected"></h1>
<h2 data-l10n-id="pad.modals.badChangeset.explanation"></h2>
<p data-l10n-id="pad.modals.badChangeset.cause"></p>
<button id="forcereconnect" data-l10n-id="pad.modals.forcereconnect"></button>
</div>
<div class="corruptPad">
<h1 data-l10n-id="pad.modals.disconnected"></h1>
<h2 data-l10n-id="pad.modals.corruptPad.explanation"></h2>
<p data-l10n-id="pad.modals.corruptPad.cause"></p>
</div>
<div class="deleted">
<h1 data-l10n-id="pad.modals.deleted"></h1>
<p data-l10n-id="pad.modals.deleted.explanation"></p>
</div>
<div class="disconnected">
<% e.begin_block("disconnected"); %>
<h1 data-l10n-id="pad.modals.disconnected"></h1>
<h2 data-l10n-id="pad.modals.disconnected.explanation"></h2>
<p data-l10n-id="pad.modals.disconnected.cause"></p>
<button id="forcereconnect" data-l10n-id="pad.modals.forcereconnect"></button>
<% e.end_block(); %>
</div>
<form id="reconnectform" method="post" action="/ep/pad/reconnect" accept-charset="UTF-8" style="display: none;">
<input type="hidden" class="padId" name="padId">