Spell checking for apertium.org?
<selimcan> Web interface certainly needs a spell checker for the source language side
Although some times people have the speller for their own language installed, they typically don't have for all the languages apertium has, and some times there are no packaged spellers, but we might have spellers.
– but how should we do the UI?
We could do something like http://tinymcespellcheck.com/ which makes a rich text area (contenteditable) and uses spans on the spelling errors, in an iframe which contains
<body spellcheck="false" id="tinymce" class="mce-content-body " data-id="mce_0" contenteditable="true"> <p><span data-mce-bogus="1" class="nanospell-typo">Fromm</span> our <span data-mce-bogus="1" class="nanospell-typo">perpsective</span>, the <span data-mce-bogus="1" class="nanospell-typo">ideel</span> user <span data-mce-bogus="1" class="nanospell-typo">experiense</span></p> </body>
It's possible to put contenteditable on a div without an iframe as well (though maybe that doesn't work in older browsers?
One problem with contenteditable though, vs our plaintext textarea, is that we would then enable rich-text pastes full of messed-up html from all kinds of badly made sites. Which can lead to all kinds of headaches.
Another option would be to keep the plaintext textarea, but put an overlay div that contains red bars and catches right clicks. One problem here is syncing them up on scroll and on other changes to the underlying div.
suggest below textarea
Like how http://joukahainen.puimula.org/webvoikko/spell does it. Google Translate gives suggestions for very short sentences, but gives up on spell checking longer documents, and with very long documents it would probably be a bit bad UI-wise, although we could show only the misspellings as *snippets* below the textarea (and perhaps a maximum of 5 such). So if the user has a long document that contains "and the dog jumpd the fence" then we show just that snippet with "jumpd" underlined and responding to clicks (then we just have to search and replace in the original textarea).