Grammalecte  Check-in [4cfb006e3a]

Overview
Comment:[fr] lexicographe: useless code (WTF?)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | fr | Lexicographe
Files: files | file ages | folders
SHA3-256: 4cfb006e3a0468dfeabc8b25ecfce5b217bf9bffcce5636b4e57b3ac36523cd3
User & Date: olr on 2017-11-01 10:35:10
Other Links: branch diff | manifest | tags
Context
2017-11-01
11:38
[fr] lexicographe: code cleaning check-in: afcd96f2ab user: olr tags: fr, Lexicographe
10:35
[fr] lexicographe: useless code (WTF?) check-in: 4cfb006e3a user: olr tags: fr, Lexicographe
10:29
[fr][bug] lexicographe: ne pas ajouter l’infinitif si pas nécessaire check-in: 266d287c50 user: olr tags: fr, Lexicographe
Changes

Modified gc_lang/fr/modules-js/lexicographe.js from [8ad217b431] to [5be8f7e98e].

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

    _formatTags (sTags) {
        let sRes = "";
        sTags = sTags.replace(/V([0-3][ea]?)[itpqnmr_eaxz]+/, "V$1");
        let m;
        while ((m = this._zTag.exec(sTags)) !== null) {
            sRes += _dTAGS.get(m[0]);
            if (sRes.length > 100) {
                break;
            }
        }
        if (sRes.startsWith(" verbe") && !sRes.includes("infinitif")) {
            sRes += " [" + sTags.slice(1, sTags.indexOf(" ")) + "]";
        }
        if (!sRes) {
            sRes = "#Erreur. Étiquette inconnue : [" + sTags + "]";
            helpers.echo(sRes);
            return sRes;
        }
        return sRes.gl_trimRight(",");
    }

    _formatTagsLoc (sTags) {
        let sRes = "";
        let oTagsVerb = this._zLocTag.exec(sTags);
        sRes += _dLocTAGS.get(oTagsVerb[1]);
        if (oTagsVerb[4] && oTagsVerb[1] === ':LV'){
            oTagsVerb[4].split(/(?!$)/u).forEach(function(sKey) {
                sRes += _dLocVERB.get(sKey);
            });
        }
        if (oTagsVerb[5]){
            let m;
            while ((m = this._zTag.exec(oTagsVerb[5])) !== null) {
                sRes += _dLocTAGS.get(m[0]);
                if (sRes.length > 100) {
                    break;
                }
            }
        }
        if (!sRes) {
            sRes = "#Erreur. Étiquette inconnue : [" + sTags + "]";
            helpers.echo(sRes);
            return sRes;
        }
        return sRes.gl_trimRight(",");
    }

    _formatSuffix (s) {
        if (s.startsWith("t-")) {







<
<
<






<


















<
<
<




<







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

    _formatTags (sTags) {
        let sRes = "";
        sTags = sTags.replace(/V([0-3][ea]?)[itpqnmr_eaxz]+/, "V$1");
        let m;
        while ((m = this._zTag.exec(sTags)) !== null) {
            sRes += _dTAGS.get(m[0]);



        }
        if (sRes.startsWith(" verbe") && !sRes.includes("infinitif")) {
            sRes += " [" + sTags.slice(1, sTags.indexOf(" ")) + "]";
        }
        if (!sRes) {
            sRes = "#Erreur. Étiquette inconnue : [" + sTags + "]";

            return sRes;
        }
        return sRes.gl_trimRight(",");
    }

    _formatTagsLoc (sTags) {
        let sRes = "";
        let oTagsVerb = this._zLocTag.exec(sTags);
        sRes += _dLocTAGS.get(oTagsVerb[1]);
        if (oTagsVerb[4] && oTagsVerb[1] === ':LV'){
            oTagsVerb[4].split(/(?!$)/u).forEach(function(sKey) {
                sRes += _dLocVERB.get(sKey);
            });
        }
        if (oTagsVerb[5]){
            let m;
            while ((m = this._zTag.exec(oTagsVerb[5])) !== null) {
                sRes += _dLocTAGS.get(m[0]);



            }
        }
        if (!sRes) {
            sRes = "#Erreur. Étiquette inconnue : [" + sTags + "]";

            return sRes;
        }
        return sRes.gl_trimRight(",");
    }

    _formatSuffix (s) {
        if (s.startsWith("t-")) {