[Libreoffice-commits] online.git: loleaflet/src wsd/LOOLWSD.cpp
Jan Holesovsky (via logerrit)
logerrit at kemper.freedesktop.org
Mon Jul 15 18:18:34 UTC 2019
loleaflet/src/errormessages.js | 24 +++++++++++++++++-------
wsd/LOOLWSD.cpp | 4 ++++
2 files changed, 21 insertions(+), 7 deletions(-)
New commits:
commit 397e7236c91d20a37f8b7936826a7d245cfd6525
Author: Jan Holesovsky <kendy at collabora.com>
AuthorDate: Mon Jul 15 20:16:29 2019 +0200
Commit: Jan Holesovsky <kendy at collabora.com>
CommitDate: Mon Jul 15 20:18:09 2019 +0200
android: Issue an error message when the document cannot be loaded.
Instead of keep spinning the spinner, show an error message.
Relevant for iOS too I guess.
Change-Id: I9fb45a1808a12e133bc2548c4cf07c1ba8bb629f
diff --git a/loleaflet/src/errormessages.js b/loleaflet/src/errormessages.js
index 7e790c833..2d72cf4bd 100644
--- a/loleaflet/src/errormessages.js
+++ b/loleaflet/src/errormessages.js
@@ -24,13 +24,23 @@ errorMessages.faileddocloading = _('Failed to load the document. Please ensure t
errorMessages.invalidLink = _('Invalid link: \'%url\'');
errorMessages.leaving = _('You are leaving the editor, are you sure you want to visit %url?');
-errorMessages.storage = {
- loadfailed: _('Failed to read document from storage. Please contact your storage server (%storageserver) administrator.'),
- savediskfull: _('Save failed due to no disk space left on storage server. Document will now be read-only. Please contact the server (%storageserver) administrator to continue editing.'),
- saveunauthorized: _('Document cannot be saved due to expired or invalid access token.'),
- savefailed: _('Document cannot be saved. Check your permissions or contact the storage server administrator.'),
- renamefailed: _('Document cannot be renamed. Check your permissions or contact the storage server administrator.')
-};
+if (window.ThisIsAMobileApp) {
+ errorMessages.storage = {
+ loadfailed: _('Failed to load document.'),
+ savediskfull: _('Save failed due to no disk space left. Document will now be read-only.'),
+ saveunauthorized: _('Document cannot be saved due to expired or invalid access token.'),
+ savefailed: _('Document cannot be saved.'),
+ renamefailed: _('Document cannot be renamed.')
+ };
+} else {
+ errorMessages.storage = {
+ loadfailed: _('Failed to read document from storage. Please contact your storage server (%storageserver) administrator.'),
+ savediskfull: _('Save failed due to no disk space left on storage server. Document will now be read-only. Please contact the server (%storageserver) administrator to continue editing.'),
+ saveunauthorized: _('Document cannot be saved due to expired or invalid access token.'),
+ savefailed: _('Document cannot be saved. Check your permissions or contact the storage server administrator.'),
+ renamefailed: _('Document cannot be renamed. Check your permissions or contact the storage server administrator.')
+ };
+}
if (typeof window !== 'undefined') {
window.errorMessages = errorMessages;
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 420300a79..cbf415280 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -2705,6 +2705,10 @@ private:
catch (const std::exception& exc)
{
LOG_ERR("Error while loading : " << exc.what());
+
+ // Alert user about failed load
+ const std::string msg = "error: cmd=storage kind=loadfailed";
+ clientSession->sendMessage(msg);
}
});
});
More information about the Libreoffice-commits
mailing list