|Summary:||RFE: [WebTrans] enable visible white space in source|
|Product:||[Retired] Zanata||Reporter:||Patrick Huang <pahuang>|
|Component:||Usability||Assignee:||Luke Brooker <lbrooker>|
|Status:||CLOSED CURRENTRELEASE||QA Contact:||Damian Jansen <djansen>|
|Version:||development||CC:||camunoz, damason, dchen, lbrooker, mkim, sflaniga, zanata-bugs|
|Fixed In Version:||3.6.1-SNAPSHOT (git-jenkins-zanata-server-github-pull-requests-3111)||Doc Type:||Bug Fix|
|Doc Text:||Story Points:||1|
|:||880444 (view as bug list)||Environment:|
|Last Closed:||2015-04-20 01:06:33 UTC||Type:||Bug|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
|Bug Depends On:|
Description Patrick Huang 2012-11-12 23:26:13 UTC
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.
Comment 1 Patrick Huang 2012-11-12 23:28:50 UTC
Comment 2 Runa Bhattacharjee 2012-11-26 18:17:47 UTC
Hi, can we try to squeeze this in for the upcoming release? Thanks.
Comment 3 Sean Flanigan 2012-11-27 01:17:49 UTC
Comment 4 Patrick Huang 2012-11-27 01:45:54 UTC
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 :)
Comment 5 Sean Flanigan 2012-11-27 02:14:42 UTC
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.)
Comment 6 Patrick Huang 2012-11-30 01:23:00 UTC
I submitted issues both to Code Mirror and Chrome. Looks like Chrome is doing something differently on elements with attribute "contenteditable=true". Bug 880444 is working in Firefox.
Comment 7 Sean Flanigan 2012-11-30 01:37:58 UTC
Could you please link to the Chrome and CodeMirror bugs here?
Comment 8 Patrick Huang 2012-11-30 01:42:57 UTC
CodeMirror issue raised at: https://bugzilla.redhat.com/show_bug.cgi?id=875965 Chrome issue is raised using Chrome's build in (menu->About Google Chrome->Report an Issue). I don't have any URL.
Comment 9 Patrick Huang 2012-11-30 01:44:41 UTC
(In reply to comment #8) > CodeMirror issue raised at: > https://bugzilla.redhat.com/show_bug.cgi?id=875965 > Chrome issue is raised using Chrome's build in (menu->About Google > Chrome->Report an Issue). I don't have any URL. Wrong url: https://github.com/marijnh/CodeMirror/issues/1017
Comment 10 Sean Flanigan 2012-12-03 05:13:13 UTC
Found a bit more information about the Hunspell situation: According to http://wiki.apache.org/solr/Hunspell the Lucene-Hunspell code was contributed to Solr. Lucene-Hunspell seems to be a bit dead, but it sounds as if the Solr team is maintaining a fork. This seems to be it: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/analysis/common/src/java/org/apache/lucene/analysis/hunspell/ http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22lucene-analyzers-common%22 It looks like it's targeted more at spelling suggestions than spell checking per se, but it may be possible to modify it for spell checking.
Comment 11 Sean Flanigan 2012-12-03 06:27:38 UTC
To modify it for spell checking will probably require re-implementing Hunspell::spell() in Java: http://hunspell.cvs.sourceforge.net/viewvc/hunspell/hunspell/src/hunspell/hunspell.cxx?view=markup
Comment 12 Sean Flanigan 2012-12-07 04:47:34 UTC
Comment 13 Michelle Kim 2015-03-10 05:35:14 UTC
Technical Issue to be discussed. We may take a look at some alternatives.
Comment 14 Patrick Huang 2015-03-11 00:30:26 UTC
Comment 15 Michelle Kim 2015-03-17 00:10:29 UTC
As we discussed with translators, we agreed upon the solutions as follows: 1. Enable codemirror (syntax highlighting) in source , so that translators will be able to view spacing highlight etc 2. Disable codemirror in target by default, so that spellcheck is available. If translator wants, they can use either a shortcut ctrl + alt + h to toggle, or use the editor setting option for consistent change. Long term: New Text Editor with both syntax highlighting and spellcheck enabled.
Comment 16 Sean Flanigan 2015-03-17 04:25:14 UTC
The short term plan sounds fine. Long term, the new text editor probably won't make the problems which Patrick mentioned any easier to solve. There aren't any components out there which solve the problem for us. Ace and CodeMirror do live highlighting, but they don't do spell-check. There are possible solutions, but they all involve a fair bit of engineering (and maintenance), and may amount to re-implementing the browser's multilingual spell-check ourselves. Or convincing the browser makers to expose spellcheck as an API we can call...
Comment 17 Luke Brooker 2015-03-17 04:41:44 UTC
This is not entirely true. There are options to "overlay" highlighting and other enhancements over text areas. I have some browser extensions that do this already. There are also options with contenteditable. Basically, going back to a plain text editor and only implementing the basic features we need, should make it *easier* to maintain and add new features as we don't need to deal with the complexity of codemirror and all it's features we don't use.
Comment 18 Michelle Kim 2015-03-17 06:02:36 UTC
Thanks guys for your input. I will narrow down the scope of this bug to enable syntax highlighting / CodeMirror in source, so that we can meet the short term goals first. For the long term goals, we shall track with new editor RFE.
Comment 19 Michelle Kim 2015-03-18 01:34:41 UTC
Syntax highlighting is already active in Source, so this bug is to make sure white space highlighting is always on in source. - standard copy (Ctrl + C) should not copy the visible white space characters
Comment 20 Alex Eng 2015-03-24 05:19:47 UTC
Pull request for zanata-server: https://github.com/zanata/zanata-server/pull/742
Comment 21 Damian Jansen 2015-03-25 05:51:47 UTC
Verified (release) at 90df3ec5fe4a3e441a8aafe77be5367246ecad1c