From 62df09e48c3fa67e8a03dbe3db3ca3c5267395c0 Mon Sep 17 00:00:00 2001 From: yflory Date: Fri, 26 Feb 2021 14:30:55 +0100 Subject: [PATCH] Fix XXX --- www/common/drive-ui.js | 2 +- www/common/onlyoffice/inner.js | 2 +- www/common/sframe-app-framework.js | 1 - www/teams/inner.js | 6 ++---- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/www/common/drive-ui.js b/www/common/drive-ui.js index 557a3b3aa..7e99dfef9 100644 --- a/www/common/drive-ui.js +++ b/www/common/drive-ui.js @@ -1779,7 +1779,7 @@ define([ // Make sure we can only upload files in the Documents tree var p = ev.path; if (!Array.isArray(p) || !p.length || p[0] !== ROOT) { - return void UI.warn(Messages.error); // XXX new translation key? "~Can"t upload a file here" + return void UI.warn(Messages.fm_cantUploadHere); } APP.FM.onFileDrop(file, ev); diff --git a/www/common/onlyoffice/inner.js b/www/common/onlyoffice/inner.js index 95d5b872e..e9dc03210 100644 --- a/www/common/onlyoffice/inner.js +++ b/www/common/onlyoffice/inner.js @@ -1376,7 +1376,7 @@ define([ varĀ unsaved = APP.unsavedChanges; delete APP.unsavedChanges; rtChannel.sendMsg(unsaved, null, function (err, hash) { - if (err) { return void UI.warn(Messages.error); } // XXX Better error message? + if (err) { return void UI.alert(Messages.oo_lostEdits); } // This is supposed to be a "send" function to tell our OO // to unlock the cell. We use this to know that the patch was // correctly sent so that we can apply it to our OO too. diff --git a/www/common/sframe-app-framework.js b/www/common/sframe-app-framework.js index efe95ff5c..079e77ffc 100644 --- a/www/common/sframe-app-framework.js +++ b/www/common/sframe-app-framework.js @@ -714,7 +714,6 @@ define([ nThen(function (waitFor) { var content = fi(c, f); if (typeof(content) === "undefined") { - Messages.importError = "Failed to import (wrong format)"; // XXX return void UI.warn(Messages.importError); } contentUpdate(content, waitFor); diff --git a/www/teams/inner.js b/www/teams/inner.js index 0b2d6ec85..fcd0e3b3d 100644 --- a/www/teams/inner.js +++ b/www/teams/inner.js @@ -549,7 +549,7 @@ define([ if (obj && obj.error) { $spinner.hide(); state = false; - if (obj.error === "OFFLINE") { return UI.alert(Messages.disconnected); } // XXX + if (obj.error === "OFFLINE") { return UI.warn(Messages.disconnected); } console.error(obj.error); return void UI.warn(Messages.error); } @@ -963,9 +963,7 @@ define([ teamId: APP.team }, function (obj) { if (obj && obj.error) { - if (obj.error === 'OFFLINE') { - return; // XXX show offline message in chat section - } + if (obj.error === 'OFFLINE') { return; } return void UI.alert(Messages.error); } common.setTeamChat(obj.channel);