Grammalecte  Check-in [fb259535c8]

Overview
Comment:[fx][bug] no empty suggestions.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | fx
Files: files | file ages | folders
SHA3-256: fb259535c868213615a3aaef455cbde69ecd6e3ead92331bf5d84dbdd4e53eee
User & Date: olr on 2017-08-15 19:50:10
Other Links: manifest | tags
Context
2017-08-16
21:31
[fr] j’adorerai check-in: e21d7d8b7b user: olr tags: fr, trunk
2017-08-15
19:50
[fx][bug] no empty suggestions. check-in: fb259535c8 user: olr tags: fx, trunk
19:21
[fr] faux positif: ça a été check-in: 3b752e1bc9 user: olr tags: fr, trunk
Changes

Modified gc_lang/fr/xpi/data/gc_panel.js from [2be91c50eb] to [7f04c6a383].

   320    320               } else {
   321    321                   document.getElementById("gc_url").style.display = "none";
   322    322               }
   323    323               document.getElementById("gc_ignore").dataset.error_id = xNodeErr.dataset.error_id;
   324    324               let iSugg = 0;
   325    325               let xGCSugg = document.getElementById("gc_sugg_block");
   326    326               xGCSugg.textContent = "";
   327         -            for (let sSugg of xNodeErr.dataset.suggestions.split("|")) {
   328         -                xGCSugg.appendChild(_createSuggestion(xNodeErr.dataset.error_id, iSugg, sSugg));
   329         -                xGCSugg.appendChild(document.createTextNode(" "));
   330         -                iSugg += 1;
          327  +            if (xNodeErr.dataset.suggestions.length > 0) {
          328  +                for (let sSugg of xNodeErr.dataset.suggestions.split("|")) {
          329  +                    xGCSugg.appendChild(_createSuggestion(xNodeErr.dataset.error_id, iSugg, sSugg));
          330  +                    xGCSugg.appendChild(document.createTextNode(" "));
          331  +                    iSugg += 1;
          332  +                }
          333  +            } else {
          334  +                xGCSugg.textContent = "Aucune.";
   331    335               }
   332    336           }
   333    337           xNodeTooltipArrow.style.display = "block";
   334    338           xNodeTooltip.style.display = "block";
   335    339           if (xNodeErr.dataset.error_type === "spelling") {
   336    340               // spelling mistake
   337    341               document.getElementById("sc_ignore").dataset.error_id = xNodeErr.dataset.error_id;