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