Index: gc_lang/fr/tb/content/file_handler.js
==================================================================
--- gc_lang/fr/tb/content/file_handler.js
+++ gc_lang/fr/tb/content/file_handler.js
@@ -2,12 +2,13 @@
"use strict";
// Assuming that Cc, Ci and Cu are already loaded
-const {TextDecoder, TextEncoder, OS} = Components.utils.import("resource://gre/modules/osfile.jsm", {});
+//const {OS} = ChromeUtils.import("resource://gre/modules/osfile.jsm", {});
+ChromeUtils.import("resource://gre/modules/osfile.jsm")
const oFileHandler = {
// https://developer.mozilla.org/fr/docs/Mozilla/JavaScript_code_modules/OSFile.jsm/OS.File_for_the_main_thread
xDataFolder: null,
@@ -33,12 +34,12 @@
loadFile: async function (sFilename) {
if (!this.xDataFolder) {
this.prepareDataFolder();
}
try {
- let xDecoder = new TextDecoder();
let array = await OS.File.read(this.createPathFileName(sFilename));
+ let xDecoder = new TextDecoder();
return xDecoder.decode(array);
}
catch (e) {
console.error(e);
return null;
@@ -51,12 +52,12 @@
xFilePicker.appendFilters(Ci.nsIFilePicker.filterAll | Ci.nsIFilePicker.filterText);
xFilePicker.open(async function (nReturnValue) {
if (nReturnValue == Ci.nsIFilePicker.returnOK || nReturnValue == Ci.nsIFilePicker.returnReplace) {
console.log(xFilePicker.file.path);
try {
- let xDecoder = new TextDecoder();
let array = await OS.File.read(xFilePicker.file.path);
+ let xDecoder = new TextDecoder();
callback(xDecoder.decode(array));
}
catch (e) {
console.error(e);
callback(null);
Index: gc_lang/fr/tb/content/overlay.js
==================================================================
--- gc_lang/fr/tb/content/overlay.js
+++ gc_lang/fr/tb/content/overlay.js
@@ -54,11 +54,10 @@
},
function (aReason) { console.log('Promise rejected - ', aReason); }
).catch(
function (aCaught) { console.log('Promise Error - ', aCaught); }
);
-
}
},
fullTests: function () {
console.log('Performing tests... Wait...');
let xPromise = this.xGCEWorker.post('fullTests', ['{"nbsp":true, "esp":true, "unit":true, "num":true}']);
@@ -585,11 +584,11 @@
//console.log(sOptName + ":" + oOptions[sOptName]);
if (document.getElementById(sOptName) !== null) {
document.getElementById(sOptName).checked = oOptions[sOptName];
if (sOptName.startsWith("o_group_")) {
this.switchGroup(sOptName);
- }
+ }
if (document.getElementById("res_"+sOptName) !== null) {
document.getElementById("res_"+sOptName).textContent = "";
}
}
}
@@ -658,11 +657,11 @@
const t0 = Date.now();
//window.setCursor("wait"); // change pointer
document.getElementById('progressbar').value = 0;
document.getElementById('progressbar').max = 6;
let n1 = 0, n2 = 0, n3 = 0, n4 = 0, n5 = 0, n6 = 0, n7 = 0;
-
+
// espaces surnuméraires
if (document.getElementById("o_group_ssp").checked) {
if (document.getElementById("o_end_of_paragraph").checked) {
[sText, n1] = this.formatText(sText, "end_of_paragraph");
document.getElementById('res_o_end_of_paragraph').textContent = n1;
Index: gc_lang/fr/tb/content/overlay.xul
==================================================================
--- gc_lang/fr/tb/content/overlay.xul
+++ gc_lang/fr/tb/content/overlay.xul
@@ -17,12 +17,12 @@
-