Grammalecte  Check-in [fb8117df84]

Overview
Comment:[core][js] fix variable name
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | core
Files: files | file ages | folders
SHA3-256: fb8117df841e0be4c7b6bf62bb4babf807e80d584615d87697e9e213b586bb63
User & Date: olr on 2021-01-07 18:36:19
Other Links: manifest | tags
Context
2021-01-07
18:38
[core][js] useless code check-in: 42afb9bb85 user: olr tags: trunk, core
18:36
[core][js] fix variable name check-in: fb8117df84 user: olr tags: trunk, core
18:22
[build][core] new function: suggAgree() [fr] ajustements et nouvelles règles check-in: 101d54de7e user: olr tags: trunk, fr, core, build
Changes

Modified gc_lang/fr/modules-js/gce_suggestions.js from [8fe9942358] to [fdfbc8fa0e].

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
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







-
-
+
+







-
+


-
+

-
+



-
+


-
+

-
+



-
+


-
+

-
+







    aSugg.delete("");
    if (aSugg.size > 0) {
        return Array.from(aSugg).join("|");
    }
    return "";
}

function g_suggAgree (dTokenDst, dTokenSrc) {
    // returns suggestions for <dTokenDst> that matches agreement with <dTokenSrc>
function g_suggAgree (oTokenDst, oTokenSrc) {
    // returns suggestions for <oTokenDst> that matches agreement with <oTokenSrc>
    let lMorphSrc = oTokenSrc.hasOwnProperty("lMorph") ? oTokenSrc["lMorph"] : gc_engine.oSpellChecker.getMorph(oTokenSrc["sValue"]);
    if (lMorphSrc.length === 0) {
        return "";
    }
    let [sGender, sNumber] = cregex.getGenderNumber(lMorphSrc);
    if (sGender == ":m") {
        if (sNumber == ":s") {
            return suggMasSing(dTokenDst["sValue"]);
            return suggMasSing(oTokenDst["sValue"]);
        }
        else if (sNumber == ":p") {
            return suggMasPlur(dTokenDst["sValue"]);
            return suggMasPlur(oTokenDst["sValue"]);
        }
        return suggMasSing(dTokenDst["sValue"]);
        return suggMasSing(oTokenDst["sValue"]);
    }
    else if (sGender == ":f") {
        if (sNumber == ":s") {
            return suggFemSing(dTokenDst["sValue"]);
            return suggFemSing(oTokenDst["sValue"]);
        }
        else if (sNumber == ":p") {
            return suggFemPlur(dTokenDst["sValue"]);
            return suggFemPlur(oTokenDst["sValue"]);
        }
        return suggFemSing(dTokenDst["sValue"]);
        return suggFemSing(oTokenDst["sValue"]);
    }
    else if (sGender == ":e") {
        if (sNumber == ":s") {
            return suggSing(dTokenDst["sValue"]);
            return suggSing(oTokenDst["sValue"]);
        }
        else if (sNumber == ":p") {
            return suggPlur(dTokenDst["sValue"]);
            return suggPlur(oTokenDst["sValue"]);
        }
        return dTokenDst["sValue"];
        return oTokenDst["sValue"];
    }
    return "";
}

function hasFemForm (sFlex) {
    for (let sStem of gc_engine.oSpellChecker.getLemma(sFlex)) {
        if (mfsp.isMasForm(sStem) || conj.hasConj(sStem, ":PQ", ":Q3")) {