Index: gc_lang/fr/tb/content/lex_editor.js ================================================================== --- gc_lang/fr/tb/content/lex_editor.js +++ gc_lang/fr/tb/content/lex_editor.js @@ -5,13 +5,10 @@ const Cc = Components.classes; const Ci = Components.interfaces; const Cu = Components.utils; const prefs = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefService).getBranch("extensions.grammarchecker."); -var FileUtils = Cu.import("resource://gre/modules/FileUtils.jsm").FileUtils -var NetUtil = Cu.import("resource://gre/modules/NetUtil.jsm").NetUtil; - /* Common functions */ @@ -494,10 +491,12 @@ xFilePicker.open(function (nReturnValue) { if (nReturnValue == Ci.nsIFilePicker.returnOK || nReturnValue == Ci.nsIFilePicker.returnReplace) { // https://developer.mozilla.org/en-US/docs/Mozilla/JavaScript_code_modules/OSFile.jsm OS.File.writeAtomic(xFilePicker.file.path, sJSON, {tmpPath: "file.txt.tmp"}); /* + var FileUtils = Cu.import("resource://gre/modules/FileUtils.jsm").FileUtils + var NetUtil = Cu.import("resource://gre/modules/NetUtil.jsm").NetUtil; // You can also optionally pass a flags parameter here. It defaults to // FileUtils.MODE_WRONLY | FileUtils.MODE_CREATE | FileUtils.MODE_TRUNCATE; let xOutStream = FileUtils.openSafeFileOutputStream(xFilePicker.file); let xConverter = Cc["@mozilla.org/intl/scriptableunicodeconverter"].createInstance(Ci.nsIScriptableUnicodeConverter); xConverter.charset = "UTF-8";