[zanata-bugs] [Bug 880444] New: RFE: [WebTrans] enable spell check in code mirror editor for Firefox

bugzilla at redhat.com bugzilla at redhat.com
Tue Nov 27 02:18:18 UTC 2012


Product: Zanata
https://bugzilla.redhat.com/show_bug.cgi?id=880444

            Bug ID: 880444
           Summary: RFE: [WebTrans] enable spell check in code mirror
                    editor for Firefox
           Product: Zanata
           Version: development
         Component: Usability
          Severity: medium
          Priority: unspecified
          Reporter: pahuang at redhat.com

+++ This bug was initially created as a clone of Bug #875965 +++

Description of problem:
With the newly released Zanata version 2.0 Firefox's spell check does not seem
to work anymore. I experienced this on FF 3.6, Leticia confirmed this for her
FF 10.0.6. The spell-check used to work on both versions with Zanata 1.7.x

Version-Release number of selected component (if applicable):
2.0

Additional info:
Original bug is 872384. We introduced an option to switch between Code mirror
editor and plain textarea editor as short term solution.
This bug is for permanently enable spell check in code mirror editor.

--- Additional comment from Patrick Huang on 2012-11-12 18:28:50 EST ---

Comment copied from bug 872384:
Patrick Huang 2012-11-08 23:12:13 EST
did some research and below options seems promising:

library: http://code.google.com/p/google-api-spelling-java/ 
description: This is a simple Java API that makes it very easy to call Google's
spell checker service from Java applications.
pros: simple and easy to use
cons: calling google api means external network traffic

library: https://github.com/dren-dk/HunspellJNA
description: Hunspell is the spell checker of LibreOffice, OpenOffice.org,
Mozilla Firefox 3 & Thunderbird, Google Chrome.
pros: lots of dictionaries
cons: written in c++ and required a JNA binding

library: http://jazzy.sourceforge.net/
description: pure java based spellchecker and based on most of the algorithms
that aspell has
pros: pure java implementation
cons: no update since 2005 and sourceforge only have English dictionary


[reply] [-] Comment 8 Sean Flanigan 2012-11-09 02:22:43 EST
Hmm, Hunspell sounds good, but deploying Zanata could become a real nightmare
if we start using JNA.

I still think a toggle is the only option that makes sense for a short-term
solution, but just for completeness, I did spot these quick and dirty Hunspell
ports too:

Javascript: http://code.google.com/p/bjspell/

Java: http://code.google.com/p/lucene-hunspell/ (tied to Lucene for some
reason)

--- Additional comment from Runa Bhattacharjee on 2012-11-26 13:17:47 EST ---

Hi, can we try to squeeze this in for the upcoming release? Thanks.

--- Additional comment from Sean Flanigan on 2012-11-26 20:17:49 EST ---

This (ie syntax highlighting editor with spell-checking) isn't the sort of
thing we can squeeze in, if we want to implement it properly, and test it
properly.  It's far too big.  

If we want to cover a decent number of languages in our own spell-checker, we
pretty much have to have Hunspell, but there only seems to be one Java port of
Hunspell, but it is designed for a different use case, and it is only a
prototype.  From what I can tell, it's quite a mess, and doesn't even have a
build file.

Even if we get Hunspell working, we'll have a fair bit of UI work to integrate
a spell-checker into CodeMirror.  Especially if we want a pop-up suggestions
features?


Alternatively, we could look for an alternative to CodeMirror.  According to
http://en.wikipedia.org/wiki/Comparison_of_JavaScript-based_source_code_editors
these support browser-based spell-checking:

http://codepress.sourceforge.net/
http://www.cdolivet.com/editarea/

But they could turn out to have show-stopping problems (eg focus/event
problems) when integrated into Zanata.  Or cross-platform bugs.  And I can't
get spell-checking to work in Chrome for either of them so far...

--- Additional comment from Patrick Huang on 2012-11-26 20:45:54 EST ---

I've got spell check working in codemirror in firefox only. It's NOT cross
platform (uses firefox only attributes) and doesn't (seems to) support pop up
suggestion/add to dictionary etc. BUT it highlights the word in red and it uses
firefox build-in spell check facility.

We can definitely squeeze this in :)

--- Additional comment from Sean Flanigan on 2012-11-26 21:14:42 EST ---

Okay, that's good.  I suggest creating another bz for the Firefox-only
implementation.  We should provide a user option to turn it off.  (Partly so
that the user can turn off spell-check, and partly in case of unexpected
problems.)

-- 
You are receiving this mail because:
You are on the CC list for the bug.




More information about the zanata-bugs mailing list