Grammalecte  Changes On Branch eb74ef2889179d3e

Changes In Branch webext2_fix Through [eb74ef2889] Excluding Merge-Ins

This is equivalent to a diff from fd7a9b5ca3 to eb74ef2889

2017-08-08
17:31
[core] add isInit in object conj, phonet, mfsp to prevent loading data twice check-in: 5dd4693a8f user: IllusionPerdu tags: core, webext2_fix
17:25
[fx] conjugueur: panneau et onglet check-in: 1f91810c3d user: olr tags: fx, webext2
17:07
[core] move require helper at the top of conj.js (following the same logic everywhere) check-in: eb74ef2889 user: IllusionPerdu tags: core, webext2_fix
16:49
[core][fr] change typeof(exports) before the require block check-in: 6c8ee6edcf user: IllusionPerdu tags: core, webext2_fix
16:39
[fx] merge webext2 check-in: 1eac03608e user: IllusionPerdu tags: fx, webext2_fix
13:08
[fx] attempt for the lexicographer (can’t work that way, it seems) check-in: fd7a9b5ca3 user: olr tags: fx, webext2
2017-08-07
15:09
[fx] tests with context menus check-in: f7b29b571c user: olr tags: fx, webext2

Modified gc_core/js/text.js from [46a1749c2b] to [2699625d4c].

1
2
3
4
5
6

7
8
9
10
11
12
13
1
2
3
4
5

6
7
8
9
10
11
12
13





-
+







// JavaScript

"use strict";


if (typeof(exports) !== 'undefined') {
if (typeof(require) !== 'undefined') {
    var helpers = require("resource://grammalecte/helpers.js");
}


var text = {
    getParagraph: function* (sText) {
        // generator: returns paragraphs of text

Modified gc_core/js/tokenizer.js from [fcd058bf6a] to [c0e5d0e035].

1
2
3
4
5
6
7

8
9
10
11
12
13
14
1
2
3
4
5
6

7
8
9
10
11
12
13
14






-
+







// JavaScript
// Very simple tokenizer

"use strict";


if (typeof(exports) !== 'undefined') {
if (typeof(require) !== 'undefined') {
    var helpers = require("resource://grammalecte/helpers.js");
}


const aTkzPatterns = {
    // All regexps must start with ^.
    "default":

Modified gc_lang/fr/modules-js/conj.js from [abb72eabf4] to [9eed7b965b].

1
2
3
4
5
6
7




8
9
10
11
12
13
14
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18







+
+
+
+







// Grammalecte - Conjugueur
// License: GPL 3

"use strict";

${map}


if (typeof(require) !== 'undefined') {
    var helpers = require("resource://grammalecte/helpers.js");
}

var conj = {
    _lVtyp: [],
    _lTags: [],
    _dPatternConj: {},
    _dVerb: {},

479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
483
484
485
486
487
488
489

490
491
492
493
494
495
496







-








// Initialization
if (typeof(browser) !== 'undefined') {
    // WebExtension (but not in Worker)
    conj.init(helpers.loadFile(browser.extension.getURL("grammalecte/fr/conj_data.json")));
} else if (typeof(require) !== 'undefined') {
    // Add-on SDK and Thunderbird
    let helpers = require("resource://grammalecte/helpers.js");
    conj.init(helpers.loadFile("resource://grammalecte/fr/conj_data.json"));
} else if (typeof(self) !== 'undefined' && typeof(self.port) !== 'undefined' && typeof(self.port.on) !== "undefined") {
    // used within Firefox content script (conjugation panel).
    // can’t load JSON from here, so we do it in ui.js and send it here.
    self.port.on("provideConjData", function (sJSONData) {
        conj.init(sJSONData);
    });    

Modified gc_lang/fr/modules-js/gce_suggestions.js from [db0ba9f8a1] to [b1d136482e].

1
2
3

4
5
6
7
8
9
10
1
2

3
4
5
6
7
8
9
10


-
+







//// GRAMMAR CHECKING ENGINE PLUGIN: Suggestion mechanisms

if (typeof(exports) !== 'undefined') {
if (typeof(require) !== 'undefined') {
    var conj = require("resource://grammalecte/fr/conj.js");
    var mfsp = require("resource://grammalecte/fr/mfsp.js");
    var phonet = require("resource://grammalecte/fr/phonet.js");
}


//// verbs

Modified gc_lang/fr/modules-js/lexicographe.js from [a348883011] to [9672629a43].

1
2
3
4
5
6
7
8
9
10

11
12
13
14
15
16
17
1
2
3
4
5
6
7
8
9

10
11
12
13
14
15
16
17









-
+







// Grammalecte - Lexicographe
// License: MPL 2

"use strict";

${string}
${map}


if (typeof(exports) !== 'undefined') {
if (typeof(require) !== 'undefined') {
    var helpers = require("resource://grammalecte/helpers.js");
}

const _dTAGS = new Map ([
    [':G', "[mot grammatical]"],
    [':N', " nom,"],
    [':A', " adjectif,"],