Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 05-23-2016, 06:04 PM   #1
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Bug: Spell Check Language

The Problem

If you double click on a word in the Spell Check window, it jumps to all instances of that word, completely ignoring Language.

Example Code:

Code:
<p>This is an example Spanish sentence: <span xml:lang="es">No señora, no estoy borracho</span>.</p>

<p>This is an example English sentence: <span xml:lang="en">No Ma’am, I’m not drunk</span>.</p>
When you double click on the Spanish "No", it leads you to all instances of "No" throughout the book, no matter the language. This becomes a problem when you are working on a large book with differing languages with overlapping words.

Steps to Reproduce

1. Open the Spell Check dialog window.

Click image for larger version

Name:	SpellCheckingLanguageBug.png
Views:	241
Size:	13.8 KB
ID:	148875

2. Double click on the Spanish "No". The cursor will highlight "No señora".

Double click again, the cursor will highlight "No Ma’am".

Expected Functionality

The Spanish "No" should only jump to "No señora", and the English "No" should only jump to "No Ma’am".
Attached Files
File Type: epub Spell Checking Languages - Bug Report.epub (1.8 KB, 172 views)
Tex2002ans is offline   Reply With Quote
Old 05-24-2016, 12:45 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,199
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
It's not really a bug, more a performance optimization, making jumping to words language aware means the the entire document has to be parsed to jump to the word -- which can be slow for large documents and is a price everyone has to pay all the time, for a relatively rare use case.

If you simply click replace, you will find that only the Spanish version is replaced, not the English one, so this only affect jumping to words not actual replacing.
kovidgoyal is offline   Reply With Quote
Advert
Old 05-24-2016, 12:58 AM   #3
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,199
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
On second thoughts, this can actually be made performant by using the syntax highlighting cache that the editor already maintains. https://github.com/kovidgoyal/calibr...acfda92306003f
kovidgoyal is offline   Reply With Quote
Old 05-24-2016, 02:14 AM   #4
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by kovidgoyal View Post
If you simply click replace, you will find that only the Spanish version is replaced, not the English one, so this only affect jumping to words not actual replacing.
I thought of this "potentially related bug" and tested it as well. I was surprised to see the Replace worked perfectly, even if this double clicking didn't!

Quote:
Originally Posted by kovidgoyal View Post
On second thoughts, this can actually be made performant by using the syntax highlighting cache that the editor already maintains. https://github.com/kovidgoyal/calibr...acfda92306003f


This is one of those things I didn't know I needed until I worked on a large book with multiple languages properly marked using XML (English/Latin/French/German/Greek). This should make it much more helpful when words are correct in one language, but wrong in another.

Now, to just get similar functionality added to Sigil's Spell Checker!

Last edited by Tex2002ans; 05-24-2016 at 02:17 AM.
Tex2002ans is offline   Reply With Quote
Old 05-24-2016, 09:22 AM   #5
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,199
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
IIRC Sigil does not support multi-langauge spell checking, at all.
kovidgoyal is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Spell Check not working at all shadowThief Editor 6 06-12-2015 09:04 AM
Spell Check Undo BetterRed Editor 2 06-15-2014 12:35 AM
Spell Check Suggestion Tex2002ans Sigil 19 01-10-2013 08:45 PM
Spell Check GeckoFriend Sigil 5 06-15-2012 03:09 PM
how to use spell check richreads Sigil 2 01-24-2012 10:13 PM


All times are GMT -4. The time now is 12:30 AM.


MobileRead.com is a privately owned, operated and funded community.