From 397d322788c0bf4d0159ed3237a461ce7beadd66 Mon Sep 17 00:00:00 2001 From: lxsang Date: Thu, 13 Sep 2018 22:37:41 +0200 Subject: [PATCH] image insert --- OpenPage/build/debug/main.js | 8 ++++---- OpenPage/coffees/main.coffee | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/OpenPage/build/debug/main.js b/OpenPage/build/debug/main.js index cc87a8b..f21837b 100644 --- a/OpenPage/build/debug/main.js +++ b/OpenPage/build/debug/main.js @@ -382,7 +382,7 @@ // close the session return this.session.close(function(e) { if (e) { - return me.error("Cannot close session " + e); + return me.error(__("Cannot close session {0}", e)); } me.editorSession.sessionController.getMetadataController().unsubscribe(gui.MetadataController.signalMetadataChanged, me.metaChanged); me.editorSession.sessionController.getUndoManager().unsubscribe(gui.UndoManager.signalDocumentModifiedChanged, me.documentChanged); @@ -391,17 +391,17 @@ // destry editorSession return me.editorSession.destroy(function(e) { if (e) { - return me.error("Cannot destroy editor session " + e); + return me.error(__("Cannot destroy editor session {0}", e)); } me.editorSession = void 0; // destroy session return me.session.destroy(function(e) { if (e) { - return me.error("Cannot destroy document session " + e); + return me.error(__("Cannot destroy document session {0}", e)); } core.Async.destroyAll([me.canvas.destroy], function(e) { if (e) { - return me.error("Cannot destroy canvas" + e); + return me.error(__("Cannot destroy canvas {0}", e)); } return me.notify("Document closed"); }); diff --git a/OpenPage/coffees/main.coffee b/OpenPage/coffees/main.coffee index 010fcd0..70cbf75 100644 --- a/OpenPage/coffees/main.coffee +++ b/OpenPage/coffees/main.coffee @@ -274,20 +274,20 @@ class OpenPage extends this.OS.GUI.BaseApplication @session.enqueue [op] # close the session @session.close (e) -> - return (me.error "Cannot close session " + e) if e + return me.error __("Cannot close session {0}", e) if e me.editorSession.sessionController.getMetadataController().unsubscribe gui.MetadataController.signalMetadataChanged, me.metaChanged me.editorSession.sessionController.getUndoManager().unsubscribe gui.UndoManager.signalDocumentModifiedChanged, me.documentChanged me.directFormattingCtl.unsubscribe gui.DirectFormattingController.textStylingChanged, me.textStylingChanged me.directFormattingCtl.unsubscribe gui.DirectFormattingController.paragraphStylingChanged, me.textStylingChanged # destry editorSession me.editorSession.destroy (e) -> - return (me.error "Cannot destroy editor session " + e) if e + return me.error __("Cannot destroy editor session {0}", e) if e me.editorSession = undefined # destroy session me.session.destroy (e) -> - return (me.error "Cannot destroy document session " + e) if e + return me.error __("Cannot destroy document session {0}", e) if e core.Async.destroyAll [me.canvas.destroy], (e) -> - return me.error "Cannot destroy canvas" + e if e + return me.error __("Cannot destroy canvas {0}", e) if e me.notify "Document closed" me.session = undefined me.directFormattingCtl = undefined