Changes In Branch webext2 Through [b8ce0aa31d] Excluding Merge-Ins
This is equivalent to a diff from 6af1e457f4 to b8ce0aa31d
2017-08-29
| ||
16:08 | [fx] open URL from tooltip check-in: 9be9daf794 user: olr tags: fx, webext2 | |
12:33 | [fx] main panel: help section check-in: b8ce0aa31d user: olr tags: fx, webext2 | |
09:49 | [fx] default gc options check-in: 6524138639 user: olr tags: fx, webext2 | |
2017-08-01
| ||
09:50 | [core][py] variable renaming check-in: 1b98af1338 user: olr tags: trunk, core | |
2017-07-31
| ||
15:31 | [core][js] helpers as object check-in: 1140b979f8 user: olr tags: core, webext2 | |
07:52 | [core][js] text: remove useless functions check-in: 6af1e457f4 user: olr tags: trunk, core | |
07:44 | [core][js][fr] JavaScript sucks: avoid weird and unpredictable behavior, infinite loop and similar crazyness -> stable number of groups in regex check-in: 20ec5b88a4 user: olr tags: trunk, core, warning | |
Modified compile_rules.py from [c1af58c8e6] to [579060f9e8].
︙ | |||
515 516 517 518 519 520 521 522 523 524 525 526 527 528 | 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 | + | lFinal.append([sOption, lTemp]) return lFinal def prepareOptions (lOptionLines): "returns a dictionary with data about options" sLang = "" sDefaultUILang = "" lStructOpt = [] lOpt = [] dOptLabel = {} dOptPriority = {} for sLine in lOptionLines: sLine = sLine.strip() if sLine.startswith("OPTGROUP/"): |
︙ | |||
537 538 539 540 541 542 543 544 545 546 547 548 549 550 | 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 | + + + - + | elif sLine.startswith("OPTPRIORITY/"): m = re.match("OPTPRIORITY/([a-z0-9]+): *([0-9])$", sLine) dOptPriority[m.group(1)] = int(m.group(2)) elif sLine.startswith("OPTLANG/"): m = re.match("OPTLANG/([a-z][a-z](?:_[A-Z][A-Z]|)):(.+)$", sLine) sLang = m.group(1)[:2] dOptLabel[sLang] = { "__optiontitle__": m.group(2).strip() } elif sLine.startswith("OPTDEFAULTUILANG:"): m = re.match("OPTDEFAULTUILANG: *([a-z][a-z](?:_[A-Z][A-Z]|))$", sLine) sDefaultUILang = m.group(1)[:2] elif sLine.startswith("OPTLABEL/"): m = re.match("OPTLABEL/([a-z0-9]+):(.+)$", sLine) dOptLabel[sLang][m.group(1)] = list(map(str.strip, m.group(2).split("|"))) if "|" in m.group(2) else [m.group(2).strip(), ""] else: print("# Error. Wrong option line in:\n ") print(sLine) print(" options defined for: " + ", ".join([ t[0] for t in lOpt ])) |
︙ | |||
583 584 585 586 587 588 589 | 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 | - + | else: print("Error in definition: ", end="") print(sLine.strip()) elif sLine.startswith("TEST:"): lTest.append("{:<8}".format(i) + " " + sLine[5:].strip()) elif sLine.startswith("TODO:"): pass |
︙ |
Modified gc_core/js/helpers.js from [da0905c944] to [7c62a39694].
1 2 3 4 5 6 7 8 9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | + + + + - - - + + + - - - - - - - - + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - + + + + + + + + - - - - + + + + - - - - - + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + - - - - - - - + + + + + + + + - - - - - - - + + + + + + + | // HELPERS /*jslint esversion: 6*/ /*global console,require,exports,XMLHttpRequest*/ "use strict"; // In Firefox, there is no console.log in PromiseWorker, but there is worker.log. // In Thunderbird, you can’t access to console directly. So it’s required to pass a log function. let funcOutput = null; var helpers = { |
Modified gc_core/js/ibdawg.js from [e748c8288e] to [4cc6e3ad82].
1 2 3 4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | + + + + - - + + + - + + - + - - - + - + - + | //// IBDAWG /*jslint esversion: 6*/ /*global console,require,exports*/ "use strict"; if (typeof(require) !== 'undefined') { |
︙ | |||
70 71 72 73 74 75 76 | 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | - + - + - + | break; default: throw ValueError("# Error: unknown code: " + this.nVersion); } //console.log(this.getInfo()); this.bOptNumSigle = true; this.bOptNumAtLast = false; |
︙ | |||
121 122 123 124 125 126 127 | 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 | - + - + - + - + - + | } return !!this.lookup(sWord.slice(0, 1).toLowerCase() + sWord.slice(1)); } else { return !!this.lookup(sWord.toLowerCase()); } } return false; |
︙ | |||
203 204 205 206 207 208 209 | 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 | - + | } } iAddr = iEndArcAddr + this.nBytesNodeAddress; } return l; } return []; |
︙ | |||
233 234 235 236 237 238 239 | 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 | - + - + - + - + - + - + - + - + | l.push(this.funcStemming(sWord, this.lArcVal[nArc])); } iAddr = iEndArcAddr + this.nBytesNodeAddress; } return l; } return []; |
Modified gc_core/js/jsex_map.js from [985754ee9e] to [3dc39be41a].
1 2 3 4 5 6 7 8 9 10 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | + - + - + - + - + - + - + | // Map /*jslint esversion: 6*/ if (Map.prototype.grammalecte === undefined) { Map.prototype.gl_shallowCopy = function () { let oNewMap = new Map(); for (let [key, val] of this.entries()) { oNewMap.set(key, val); } return oNewMap; |
Modified gc_core/js/jsex_regex.js from [b8b02d05dd] to [0c1a934c00].
1 2 3 4 5 6 7 8 9 | 1 2 3 4 5 6 7 8 9 10 | + | // regex /*jslint esversion: 6*/ if (RegExp.prototype.grammalecte === undefined) { RegExp.prototype.gl_exec2 = function (sText, aGroupsPos, aNegLookBefore=null) { let m; while ((m = this.exec(sText)) !== null) { // we have to iterate over sText here too // because first match doesn’t imply it’s a valid match according to negative lookbefore assertions, |
︙ | |||
38 39 40 41 42 43 44 | 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | - + - + - + - + | m.end.push(m.index + codePos + m[i].length); } else if (codePos === "$") { // at the end of the pattern m.start.push(this.lastIndex - m[i].length); m.end.push(this.lastIndex); } else if (codePos === "w") { // word in the middle of the pattern |
︙ | |||
79 80 81 82 83 84 85 | 80 81 82 83 84 85 86 87 88 89 90 | - + | if (typeof(helpers) !== "undefined") { helpers.logerror(e); } else { console.error(e); } } return m; |
Modified gc_core/js/jsex_string.js from [1e9c89a872] to [34840fe9fe].
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 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | + - + - + - + - + - + - + - + - + - + - + | // String /*jslint esversion: 6*/ if (String.prototype.grammalecte === undefined) { String.prototype.gl_count = function (sSearch, bOverlapping) { // http://jsperf.com/string-ocurrence-split-vs-match/8 if (sSearch.length <= 0) { return this.length + 1; } let nOccur = 0; let iPos = 0; let nStep = (bOverlapping) ? 1 : sSearch.length; while ((iPos = this.indexOf(sSearch, iPos)) >= 0) { nOccur++; iPos += nStep; } return nOccur; |
Modified gc_core/js/lang_core/gc_engine.js from [ce3013cd59] to [a71cf52ea3].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 | + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + - - - - - - - - + - - + + + + + + + + + + + + - + - - - - - - - - + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + - - - + + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - + + + + + + + + + + + + + + + - + - - - - + + + + - - - + + + + - - - - + - - - + + + - - - + + + - - - + + + - - + + - - - + - - + - + - + - + - + - + - + - + - + - + - + - + - + - + | // Grammar checker engine /*jslint esversion: 6*/ /*global console,require,exports*/ "use strict"; ${string} ${regex} ${map} if (typeof(require) !== 'undefined') { var helpers = require("resource://grammalecte/helpers.js"); var gc_options = require("resource://grammalecte/${lang}/gc_options.js"); var gc_rules = require("resource://grammalecte/${lang}/gc_rules.js"); var cregex = require("resource://grammalecte/${lang}/cregex.js"); var text = require("resource://grammalecte/text.js"); var echo = helpers.echo; } else if (typeof(console) !== "undefined") { var echo = function (o) { console.log(o); return true; }; } else { var echo = function () { return true; } } function capitalizeArray (aArray) { // can’t map on user defined function?? let aNew = []; for (let i = 0; i < aArray.length; i = i + 1) { aNew[i] = aArray[i].gl_toCapitalize(); } return aNew; } |
︙ | |||
447 448 449 450 451 452 453 | 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 | - + - + - + - + - - - + - + + + - - - - | // returns a list of sWord's stems if (!sWord) { return []; } if (!_dAnalyses.has(sWord) && !_storeMorphFromFSA(sWord)) { return []; } |
︙ | |||
547 548 549 550 551 552 553 | 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 | - - + - | } if (dDA.has(nPos)) { return true; } if (!_dAnalyses.has(sWord) && !_storeMorphFromFSA(sWord)) { return true; } |
︙ | |||
576 577 578 579 580 581 582 | 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 | - + - + - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - | } if (!_dAnalyses.has(sWord) && !_storeMorphFromFSA(sWord)) { return true; } if (_dAnalyses.get(sWord).length === 1) { return true; } |
Modified gc_core/js/lang_core/gc_options.js from [6e45d077d4] to [f47ea826e5].
1 2 3 4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | + + + + - - - - - - + + + + + + - + - - - - - + + + + + - - + + + - - - + + + + | // Options for Grammalecte /*jslint esversion: 6*/ /*global exports*/ ${map} var gc_options = { |
Modified gc_core/js/lang_core/gc_rules.js from [03bc540fb7] to [cdb121423e].
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | + + + + - + - + + - - + + | // Grammar checker rules /*jslint esversion: 6*/ /*global exports*/ "use strict"; ${string} ${regex} var gc_rules = { |
Modified gc_core/js/str_transform.js from [0fafeda9a5] to [6745507121].
1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - + - - - - - - - - + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - + + | //// STRING TRANSFORMATION |
Modified gc_core/js/tests.js from [f2f737b523] to [4504bb3576].
1 2 3 4 5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | + + + - + + - + + - + + - + - - - + + | // JavaScript /*jslint esversion: 6*/ /*global console,require,exports*/ "use strict"; if (typeof(require) !== 'undefined') { |
︙ | |||
57 58 59 60 61 62 63 | 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | - + - + - + | if (sExpectedErrors !== sFoundErrors) { yield "\n" + i.toString() + "\n# Line num: " + sLineNum + "\n> to check: " + sTextToCheck + "\n expected: " + sExpectedErrors + "\n found: " + sFoundErrors + "\n errors: \n" + sListErr; |
︙ | |||
114 115 116 117 118 119 120 | 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 | - + - + - + - + | } return sRes; } catch (e) { helpers.logerror(e); } return " ".repeat(sLine.length); |
Modified gc_core/js/text.js from [beffb97d58] to [9bf91b3594].
1 2 3 4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | + + + + - - + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - + + + | // JavaScript /*jslint esversion: 6*/ /*global require,exports*/ "use strict"; if (typeof(require) !== 'undefined') { |
Modified gc_core/js/tokenizer.js from [a6594366c3] to [81088a0177].
1 2 3 4 5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | + + + + - - - + + + + + | // JavaScript // Very simple tokenizer /*jslint esversion: 6*/ /*global require,exports*/ "use strict"; if (typeof(require) !== 'undefined') { |
︙ | |||
31 32 33 34 35 36 37 | 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | - + - + - + - + | [/^&\w+;(?:\w+;|)/, 'HTMLENTITY'], [/^(?:l|d|n|m|t|s|j|c|ç|lorsqu|puisqu|jusqu|quoiqu|qu)['’`]/i, 'ELPFX'], [/^\d\d?[hm]\d\d\b/, 'HOUR'], [/^\d+(?:er|nd|e|de|ième|ème|eme)s?\b/, 'ORDINAL'], [/^-?\d+(?:[.,]\d+|)/, 'NUM'], [/^[a-zA-Zà-öÀ-Ö0-9ø-ÿØ-ßĀ-ʯfi-st]+(?:[’'`-][a-zA-Zà-öÀ-Ö0-9ø-ÿØ-ßĀ-ʯfi-st]+)*/, 'WORD'] ] |
︙ | |||
70 71 72 73 74 75 76 | 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | - + | catch (e) { helpers.logerror(e); } } i += nCut; sText = sText.slice(nCut); } |
︙ |
Modified gc_core/py/lang_core/gc_engine.py from [4742310603] to [27a1e1120d].
︙ | |||
470 471 472 473 474 475 476 | 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 | - + - + - + | ## functions to get text outside pattern scope # warning: check compile_rules.py to understand how it works def nextword (s, iStart, n): "get the nth word of the input string or empty string" |
︙ |
Modified gc_core/py/text.py from [e964ece40d] to [72d4931466].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | + | #!python3 import textwrap from itertools import chain def getParagraph (sText): "generator: returns paragraphs of text" iStart = 0 sText = sText.replace("\r\n", "\n").replace("\r", "\n") iEnd = sText.find("\n", iStart) while iEnd != -1: yield sText[iStart:iEnd] iStart = iEnd + 1 iEnd = sText.find("\n", iStart) yield sText[iStart:] |
︙ |
Modified gc_lang/fr/build.py from [94ac224191] to [677a5b04fd].
︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | + + + + + + + + + + + + + + | def createWebExtension (sLang, dVars): "create Web-extension" print("Building WebExtension") helpers.createCleanFolder("_build/webext/"+sLang) dir_util.copy_tree("gc_lang/"+sLang+"/webext/", "_build/webext/"+sLang) dir_util.copy_tree("grammalecte-js", "_build/webext/"+sLang+"/grammalecte") dVars['webextOptionsHTML'] = _createOptionsForWebExtension(dVars) helpers.copyAndFileTemplate("_build/webext/"+sLang+"/panel/main.html", "_build/webext/"+sLang+"/panel/main.html", dVars) with helpers.cd("_build/webext/"+sLang): os.system("web-ext build") def _createOptionsForWebExtension (dVars): sHTML = "" sLang = dVars['sDefaultUILang'] for sSection, lOpt in dVars['lStructOpt']: sHTML += f'\n<div id="subsection_{sSection}" class="opt_subsection">\n <h2 data-l10n-id="option_{sSection}">{dVars["dOptLabel"][sLang][sSection][0]}</h2>\n' for lLineOpt in lOpt: for sOpt in lLineOpt: sHTML += f' <p><input type="checkbox" id="option_{sOpt}" data-option="{sOpt}"/><label id="option_label_{sOpt}" for="option_{sOpt}" data-l10n-id="option_{sOpt}">{dVars["dOptLabel"][sLang][sOpt][0]}</label></p>\n' sHTML += '</div>\n' return sHTML def createFirefoxExtension (sLang, dVars): "create extension for Firefox" print("Building extension for Firefox") helpers.createCleanFolder("_build/xpi/"+sLang) dir_util.copy_tree("gc_lang/"+sLang+"/xpi/", "_build/xpi/"+sLang) dir_util.copy_tree("grammalecte-js", "_build/xpi/"+sLang+"/grammalecte") |
︙ | |||
50 51 52 53 54 55 56 | 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | - + | for lLineOpt in lOpt: for sOpt in lLineOpt: sHTML += ' <p><input type="checkbox" id="option_'+sOpt+'" /><label id="option_label_'+sOpt+'" for="option_'+sOpt+'" data-l10n-id="option_'+sOpt+'"></label></p>\n' sHTML += '</div>\n' # Creating translation data dProperties = {} for sLang in dVars['dOptLabel'].keys(): |
︙ |
Modified gc_lang/fr/config.ini from [68082dbc1d] to [00a2e90fec].
1 2 3 4 5 6 7 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | - + | [args] lang = fr lang_name = French locales = fr_FR fr_BE fr_CA fr_CH fr_LU fr_MC fr_BF fr_CI fr_SN fr_ML fr_NE fr_TG fr_BJ country_default = FR name = Grammalecte implname = grammalecte |
︙ | |||
27 28 29 30 31 32 33 | 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | - + - - + + + | oxt_version = 6.2 oxt_identifier = French.linguistic.resources.from.Dicollecte.by.OlivierR # Firefox fx_identifier = French-GC@grammalecte.net fx_name = Grammalecte [fr] |
︙ |
Modified gc_lang/fr/modules-js/conj.js from [4856ca7520] to [fdb0ca6eac].
1 2 3 4 5 6 7 8 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 | + + + - - + + - - - - - - + - - - - - - - - - + + + + + - - - - - - - - + + + + + + + + - - - + + + + + + - - + + - - - - - - - + + + + + + + - + - + - - - - + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - + + + + + + - - - - - - - + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - + - - + + - - - - - + + + + + - - - - - - - + + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - + + + + + + - - - + + + - + - + | // Grammalecte - Conjugueur // License: GPL 3 /*jslint esversion: 6*/ /*global console,require,exports,self,browser*/ "use strict"; ${map} if (typeof(require) !== 'undefined') { |
︙ | |||
308 309 310 311 312 313 314 | 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 | - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | if (this._sRawInfo.slice(6,7) == "m") { sInfo = sInfo + " impersonnel"; } if (sInfo === "") { sInfo = "# erreur - code : " + this._sRawInfo; } return sGroup + " · " + sInfo; |
Modified gc_lang/fr/modules-js/cregex.js from [266ea45a85] to [97d67d03aa].
1 2 3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 | + + - - + + - - - + + + - - + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - - + + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - + + - - - + + + - - - + + + - - - + + + - - - - - + + + + + - + - - - + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - + + - + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - + - - - + + + - - - + + + - - - + + + - - - + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - + + + - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | //// Grammalecte - Compiled regular expressions /*jslint esversion: 6*/ var cregex = { |
Modified gc_lang/fr/modules-js/gce_analyseur.js from [673094989d] to [e2613ddcd2].
1 2 3 4 5 6 7 8 | 1 2 3 4 5 6 7 8 9 | + | //// GRAMMAR CHECKING ENGINE PLUGIN: Parsing functions for French language /*jslint esversion: 6*/ function rewriteSubject (s1, s2) { // s1 is supposed to be prn/patr/npr (M[12P]) if (s2 == "lui") { return "ils"; } if (s2 == "moi") { |
︙ | |||
18 19 20 21 22 23 24 | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | - + - + - + - + - + - + - + - + - + - + - + - + - + | return "vous"; } if (s2 == "eux") { return "ils"; } if (s2 == "elle" || s2 == "elles") { // We don’t check if word exists in _dAnalyses, for it is assumed it has been done before |
︙ |
Modified gc_lang/fr/modules-js/gce_date_verif.js from [de4d3b5e04] to [f30dbe242e].
1 2 3 4 5 6 7 8 | 1 2 3 4 5 6 7 8 9 | + | //// GRAMMAR CHECKING ENGINE PLUGIN /*jslint esversion: 6*/ // Check date validity // WARNING: when creating a Date, month must be between 0 and 11 const _lDay = ["dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"]; |
︙ |
Modified gc_lang/fr/modules-js/gce_suggestions.js from [d46530bfae] to [0d3c06e52f].
1 2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | + + + - - - + + + + - - + + | //// GRAMMAR CHECKING ENGINE PLUGIN: Suggestion mechanisms /*jslint esversion: 6*/ /*global require*/ if (typeof(require) !== 'undefined') { |
︙ | |||
137 138 139 140 141 142 143 | 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 | - + - | if (aSugg.size > 0) { return Array.from(aSugg).join("|"); } return ""; } function suggVerbInfi (sFlex) { |
︙ | |||
193 194 195 196 197 198 199 | 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 | - + | function suggPlur (sFlex, sWordToAgree=null) { // returns plural forms assuming sFlex is singular if (sWordToAgree) { if (!_dAnalyses.has(sWordToAgree) && !_storeMorphFromFSA(sWordToAgree)) { return ""; } |
︙ | |||
259 260 261 262 263 264 265 | 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 | - + - + | let aSugg = new Set(); for (let sMorph of _dAnalyses.gl_get(sFlex, [])) { if (!sMorph.includes(":V")) { // not a verb if (sMorph.includes(":m") || sMorph.includes(":e")) { aSugg.add(suggSing(sFlex)); } else { |
︙ | |||
295 296 297 298 299 300 301 | 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 | - + - + | let aSugg = new Set(); for (let sMorph of _dAnalyses.gl_get(sFlex, [])) { if (!sMorph.includes(":V")) { // not a verb if (sMorph.includes(":m") || sMorph.includes(":e")) { aSugg.add(suggPlur(sFlex)); } else { |
︙ | |||
336 337 338 339 340 341 342 | 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 | - + - + | let aSugg = new Set(); for (let sMorph of _dAnalyses.gl_get(sFlex, [])) { if (!sMorph.includes(":V")) { // not a verb if (sMorph.includes(":f") || sMorph.includes(":e")) { aSugg.add(suggSing(sFlex)); } else { |
︙ | |||
370 371 372 373 374 375 376 | 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 | - + - + | let aSugg = new Set(); for (let sMorph of _dAnalyses.gl_get(sFlex, [])) { if (!sMorph.includes(":V")) { // not a verb if (sMorph.includes(":f") || sMorph.includes(":e")) { aSugg.add(suggPlur(sFlex)); } else { |
︙ |
Modified gc_lang/fr/modules-js/lexicographe.js from [5e8c9037a7] to [fd0872dfca].
1 2 3 4 5 6 7 8 9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | + + + - + - - + | // Grammalecte - Lexicographe // License: MPL 2 /*jslint esversion: 6*/ /*global require,exports*/ "use strict"; ${string} ${map} if (typeof(require) !== 'undefined') { |
︙ | |||
195 196 197 198 199 200 201 | 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 | - + | class Lexicographe { constructor (oDict) { this.oDict = oDict; this._zElidedPrefix = new RegExp ("^([dljmtsncç]|quoiqu|lorsqu|jusqu|puisqu|qu)['’](.+)", "i"); this._zCompoundWord = new RegExp ("([a-zA-Zà-ö0-9À-Öø-ÿØ-ßĀ-ʯ]+)-((?:les?|la)-(?:moi|toi|lui|[nv]ous|leur)|t-(?:il|elle|on)|y|en|[mts][’'](?:y|en)|les?|l[aà]|[mt]oi|leur|lui|je|tu|ils?|elles?|on|[nv]ous)$", "i"); this._zTag = new RegExp ("[:;/][a-zA-Zà-ö0-9À-Öø-ÿØ-ßĀ-ʯ*][^:;/]*", "g"); |
︙ | |||
222 223 224 225 226 227 228 | 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 | - + + + + - + + + + - + - + - + | break; case 'WORD': if (oToken.sValue.gl_count("-") > 4) { return { sType: "COMPLEX", sValue: oToken.sValue, aLabel: ["élément complexe indéterminé"] }; } else if (this.oDict.isValidToken(oToken.sValue)) { let lMorph = this.oDict.getMorph(oToken.sValue); |
Modified gc_lang/fr/modules-js/mfsp.js from [404b1b695d] to [4ade9720c3].
1 2 3 4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | + + + + - + - - - + + + - - - + + + - - + - - - - - - + + + + + + + + + + + + + + + + + + - - - + + + - + - - - - - - - + + + + + + + + + + + - - - - + + + + - - - - - - - + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + + | // Grammalecte /*jslint esversion: 6*/ /*global console,require,exports,browser*/ "use strict"; if (typeof(require) !== 'undefined') { |
Modified gc_lang/fr/modules-js/phonet.js from [1d899a6d9f] to [b4e35b2c18].
1 2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 | + + - - + + + - + + + + + + + + - - - - - + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + | // Grammalecte - Suggestion phonétique /*jslint esversion: 6*/ if (typeof(require) !== 'undefined') { |
Modified gc_lang/fr/modules-js/textformatter.js from [7314bcd9a1] to [1785f80db7].
1 2 3 4 5 6 7 8 | 1 2 3 4 5 6 7 8 9 10 | + + | // Grammalecte - text formatter /*jslint esversion: 6*/ /*global exports*/ "use strict"; ${map} // Latin letters: http://unicode-table.com/fr/ |
︙ | |||
194 195 196 197 198 199 200 | 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 | - + | [/^(qu|lorsqu|puisqu|quoiqu|presqu|jusqu|aujourd|entr|quelqu|prud) /ig, "$1’"] ], "ma_1letter_lowercase": [ [/[ ]([ldjnmtscç]) (?=[aàeéêiîoôuyhAÀEÉÊIÎOÔUYH])/g, "$1’"] ], "ma_1letter_uppercase": [ [/[ ]([LDJNMTSCÇ]) (?=[aàeéêiîoôuyhAÀEÉÊIÎOÔUYH])/g, "$1’"], [/^([LDJNMTSCÇ]) (?=[aàeéêiîoôuyhAÀEÉÊIÎOÔUYH])/g, "$1’"] ] }; |
︙ | |||
247 248 249 250 251 252 253 | 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 | - + - + - + - + - - + + - + | ["etc", true], ["missing_hyphens", true], ["ma_word", true], ["ma_1letter_lowercase", false], ["ma_1letter_uppercase", false] ]); |
Modified gc_lang/fr/modules/gce_suggestions.py from [948c38b1f8] to [e839f7efe5].
︙ | |||
11 12 13 14 15 16 17 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | - + | aSugg = set() for sStem in stem(sFlex): tTags = conj._getTags(sStem) if tTags: # we get the tense aTense = set() for sMorph in _dAnalyses.get(sFlex, []): # we don’t check if word exists in _dAnalyses, for it is assumed it has been done before |
︙ |
Modified gc_lang/fr/rules.grx from [0f44118652] to [d97de02612].
︙ | |||
96 97 98 99 100 101 102 103 104 105 106 107 108 109 | 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | + | OPT/latex: False False False False False False # Priority: from 0 to 9. Default priority is 4. OPTPRIORITY/tu: 6 OPTPRIORITY/conf: 5 OPTPRIORITY/ocr: 3 OPTDEFAULTUILANG: fr_FR # Labels OPTLANG/fr_FR: Grammalecte (Français) OPTLABEL/basic: Typographie OPTLABEL/typo: Signes typographiques OPTLABEL/apos: Apostrophe typographique|Correction des apostrophes droites. Automatisme possible dans le menu Outils > Options d’autocorrection > Options linguistiques > Guillemets simples > Remplacer (à cocher) OPTLABEL/esp: Espaces surnuméraires|Signale les espaces inutiles entre les mots, en début et en fin de ligne. |
︙ |
Modified gc_lang/fr/tb/content/overlay.js from [31d038a91d] to [a6d0f601cc].
︙ | |||
908 909 910 911 912 913 914 915 916 917 918 919 920 921 | 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 | + | oTextFormatter.resetProgressBar(); } }, false); window.addEventListener("load", function (xEvent) { oDictIgniter.init(); oGrammarChecker.loadGC(); //oGrammarChecker.fullTests(); }, false); window.addEventListener("compose-window-init", function (xEvent) { oGrammarChecker.loadUI(); oGrammarChecker.closePanel(); oGrammarChecker.clearPreview(); oTextFormatter.init(); |
︙ |
Added gc_lang/fr/webext/3rd/font-awesome-4.7.0/css/font-awesome.css version [4a7506d1d8].