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: Setting severity to high, as this is the only way for us translators to run a spell-check. We might introduce some translation errors due to this feature being buggy.
This appears to be caused by default disabling of spell check by codemirror. From codemirror manual ( http://codemirror.net/1/manual.html ): "disableSpellcheck Should the editor disable spell-checking on browsers that support it (Firefox 2+). Default is true, since for most code spell-checking is useless. Can be changed with the setSpellCheck(on) method."
The link David gave above is for codemirror 1 and unfortunately codemirror 2 won't support spell check. see: http://stackoverflow.com/questions/12343922/codemirror-with-spell-checker seeking alternative solution.
add option to switch between code mirror and plain text area
committed into master and release: https://github.com/zanata/zanata/commit/98ebe7317b85c3fdbe1462ba4678e88db1b6d320 solution is to add an option to switch between code mirror and plain textarea. Unfortunately we cannot have the cake and eat it :(
Shame! :-( Might be worth looking into if and how other online translation editors solved that problem.
Do any of them use syntax highlighting editors?
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
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)
Raised new bug https://bugzilla.redhat.com/show_bug.cgi?id=875965 for permanent solution
Tested with Zanata version 2.1-SNAPSHOT (20121112-1056) and Zanata version 2.0.3-SNAPSHOT (20121116-0019) Browser: Google Chrome: 22.0.1229.94 Chromium: 21.0.1180.89 Firefox 16.0.2 Firefox ESR: 10.0.10 1. Toggle the "Use CodeMirror Editor" should not clean the unsaved text. 2. On both fire fox, toggle the "Use CodeMirror Editor" cause the whole browser to freeze a couple of seconds. Reassigned.
Just a thought: Please also make sure that the default setting is using the spell-check. Spell-check is way more important than syntax highlighting, I don't want people to miss out on the spell-check because they may not realize they can/need to toggle. Thanks!!
(In reply to comment #11) > Just a thought: Please also make sure that the default setting is using the > spell-check. Spell-check is way more important than syntax highlighting, I > don't want people to miss out on the spell-check because they may not > realize they can/need to toggle. Thanks!! This won't be the default value, as languages which do not rely on spell checking (such as CJK) will still prefer to set Code Mirror as default. However, once Bug 874374 is verified, what you set in editor options will be kept and will be apply on the next time you sign in.
I still think this should be the default. People in languages that don't rely on spell-check won't have it enabled in the browser in the first place. If a user has a spell-check installed and enabled in the browser, that user obviously wants the spell-check to work. I urgently recommend making active spell-check the default.
> 2. On both fire fox, toggle the "Use CodeMirror Editor" cause the whole > browser to freeze a couple of seconds. This seems working when firefox in safe mode (firefox -safe-mode).
(In reply to comment #13) > I still think this should be the default. People in languages that don't > rely on spell-check won't have it enabled in the browser in the first place. > If a user has a spell-check installed and enabled in the browser, that user > obviously wants the spell-check to work. > > I urgently recommend making active spell-check the default. Perhaps I should change the summary to "Editor option to toggle the usage of CodeMirror" to reflect the fix what Patrick has done so far. Hedda, your need is addressed in Bug 875965. For that, yes, we definitely need to enable the spell check as default.
Committed into release and master: https://github.com/zanata/zanata/commit/f1f38a2bfbd9bf0db95fb9fa82f04b4068c31a2b
Bug 875965 is about implementing our own spell check, which is a long way off. It may never happen. I think Hedda is right, and we should make sure spell check works by default. For most text, correct spelling will be more important than XML/HTML syntax highlighting, especially considering we have validators for XML and HTML tags. But we should make it a persistent option. If a user chooses to do without spell checking to get the highlighter, that's fine.
As discussed in scrum, default option will remain codemirror in 2.0.x but in 2.1 it's text area
Just to clarify - does that mean no spell-check in 2.0.x? Or does that mean there will be spell-check in 2.0.x, but it wont be set as the default yet?
(In reply to comment #19) > Just to clarify - does that mean no spell-check in 2.0.x? Or does that mean > there will be spell-check in 2.0.x, but it wont be set as the default yet? Hi Hedda, The switch option will be there in next release(so you can choose between spellcheck and syntax highlight). But code mirror editor will still be set as default. The reason is we have tested more thoroughly on code mirror editor but not the other. Once we fully test the plain textarea editor, we will put it as default.
Great, thanks Patrick.
Verified in Zanata version 2.0.3-SNAPSHOT (20121119-0019)