Closed Bug 676500 Opened 13 years ago Closed 2 years ago

multi-dictionary spell checking

Categories

(Core :: Spelling checker, defect)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1402822

People

(Reporter: A.Pirard.Papou, Unassigned)

Details

(Keywords: helpwanted, intl)

User Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.18) Gecko/20110628 Ubuntu/10.04 (lucid) Firefox/3.6.18
Build ID: 20110628230241

Steps to reproduce:

spell check a language mix


Actual results:

many false mistakes 


Expected results:

The spelling checker that Thunderbird and Firefox use allows using several dictionaries simultaneously:

hunspell -d fr_FR,en_US,ru_RU

It seems fairly simple for Mozilla to:

1) allow check marking several dictionaries in the drop-down list
2) remember them as option like:  spellchecker.dictionary:   fr_FR,en_US,ru_RU
3) use int add_dic(const char *dpath)  at spell checking time to add each additional dictionary

This would make very happy the people who use several languages for your enjoyment.
They could set *all* their usually written languages once for all in the list.
And we could forget about much much more complicated solutions such as tying a site to a language.
Including this:
https://bugs.launchpad.net/ubuntu/+source/hunspell/+bug/669141
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/662840
https://bugzilla.mozilla.org/show_bug.cgi?id=660506
https://bugzilla.mozilla.org/show_bug.cgi?id=69687
https://bugzilla.mozilla.org/show_bug.cgi?id=338427
https://bugzilla.mozilla.org/show_bug.cgi?id=418781
https://bugzilla.mozilla.org/show_bug.cgi?id=481884
https://bugzilla.mozilla.org/show_bug.cgi?id=616108
https://sourceforge.net/tracker/?func=detail&aid=3364837&group_id=143754&atid=756398
Severity: normal → major
OS: Linux → All
BTW, that is what Evolution does.
Need I clarify that this feature would allow reporting no mistakes while checking the whole of this text, including  Je suis très content  and  Я очень рад.
This feature is the most needed with Thunderbird.

And, need I say, turning off all languages makes the "use spell checking" option unnecessary.

On the other hand, other enhancements shouldn't interfere and change the user's language choice (French, English, Russian in this example).
For example, in a Web page displayed in French and asking to write reports in English, setting the spelling to French when the permanent F-E-R was perfectly appropriate.
It looks like most problems that users report with repeatedly choosing ONE spell checking language would be satisfactorily solved if the user could once for all setup SEVERAL dictionaries to be used SIMULTANEOUSLY for the languages he can write, among those installed on his system.  That is especially needed for e-mail since many people write them in several languages.
The simple, proposed solution is the subject matter of this report.
This is a copy of a post to Bug 338427 because it states that this solution is better.  So, the quotes are from there.

(In reply to era eriksson from comment #81)
> Note that the majority of the non-English sites I come across seem to
> specify English as their language.  Developers are not always aware that
> there is a setting that they need to change, and some tools are hard-coded
> to output a template which specifies English, so that the site owner cannot
> override it even if they wanted to.

Awareness:  I once wrote to a university to alert them that the title page of their rector, administrator and more stated "vacancies" :-)

And we're speaking not only of a single global language setting but of the hope that language attributes will be defined for fields or paragraphs (please fix your page so that I can type in).
Taking Google Translation as an example of knowhow, they try to translate <code> when they certainly shouldn't and I never saw any page adding notranslate to code (except mine ;-) ).

So, we must choose between relying on the above fuzziness  to determine language or of relying on the user's notion of what's the language he's typing.

(In reply to era eriksson from comment #82)
> Or bug 676500 should be fixed instead of this one, or as well.  +1 for the
> other bug as the preferred solution.

Yes, I think that bug 676500 seems simple enough to implemented first. Then we can post a message in the 30 or so (including duplicates) bugs describing an issue with choosing the language to ask if a problem remains.

I have used multi-language spell checking with Eudora for many years and I can testify it's delightful. The only drawback could be that some words exist in one language that can allow a mistake in another. But, having used the French+English pair for which the risk is much higher than generally, I can tell it's a smaller nuisance that is by far counterbalanced by the advantage of being able to use foreign (English) terms or phrases in a French text.
Is it better to use heuristics to have words determine a dictionary to be used to check those words?

Bug 676500 is primarily targeted at e-mail, but that's the same spelling checker, issues and reply, isn't it.

The other improvement to speed up spell checking is to determine what is not a word (all-uppercase? long strings, esp with digits and special characters, <code>, fixed width? etc...).
Obviously, the dictionary used to compose a message should presently be remembered on a per message basis and not global basis, else it often gets wrong when you resume composing a message.

Obviously too, that issue will become less important if the user keeps using the same set of dictionaries all the time.

Doesn't it appear that, the more you think of it, the more this solution looks like THE solution?
Have you ever seen another product spell check using multiple languages?  This is a very hard problem to solve...

1. How should a word that is valid in language A and invalid in language B be handled?
2. If we find a misspelling, how should we generate a spelling correction suggestion list?

This bug, in its current form, cannot be fixed, I'm afraid.  Feel free to reopen if you have concrete solutions to both of these problems.
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → WONTFIX
(In reply to Ehsan Akhgari [:ehsan] from comment #6)
> Have you ever seen another product spell check using multiple languages?

Yes, hunspell as you can read in this bug's description.
And Evolution as you can read in comment 1.
And Eudora as you can read it in comment 4.

> This is a very hard problem to solve...

Not at all and it's a most requested feature from a spelling checker to use several dictionaries.
I suppose that you know that a dictionary is not necessarily a language.
How do you think the specialized dictionaries, e.g. medical, could be used without the base one.

> 1. How should a word that is valid in language A and invalid in language B
> be handled?

It must be accepted, of course.
Obviously, the word must be valid in one OR the other language, not both.

In fact, you don't have to care about that because hunspell does all the work already.

> 2. If we find a misspelling, how should we generate a spelling correction
> suggestion list?

Simply by merging the two suggestion lists.
But usually there's little merging because the mistyped word looks like the correct spelling and unless you really really goofed you won't get a Russian suggestion for an English word.

In fact, you don't have to care about that because hunspell does all the work already.

> This bug, in its current form, cannot be fixed, I'm afraid.  Feel free to
> reopen if you have concrete solutions to both of these problems.

I am VERY HIGHLY surprised by your reaction.
Have you really read the bug description?
How did you understand "The spelling checker that Thunderbird and Firefox use allows using several dictionaries simultaneously"?"
What problem do you see in just using what has already done?

What is the difficulty in passing several dictionnary names as in:   hunspell -d fr_FR,en_US,ru_RU
It's just a matter of allowing to configure multiple dictionaries as explained in the bug's description.

Did you type that command?  It answers your questions.

Have you had a look at how Evolution does that?

Are you claiming that Thunderbird should prevent a doctor using the medical dictionary he has installed, or an engineer the engineering one?

How can you explain that other people have found this to be the most simple and brilliant solution to many spell checking problems?

I'm astounded.
The problems you claim do not exist at all and, of course, I reopen the bug as you say.
(In reply to Ehsan Akhgari [:ehsan] from comment #6)
> Feel free to reopen if you have concrete solutions to both of these problems.

And on top of that, I find no way in this page to reopen the bug.

Please do it.
Status: RESOLVED → VERIFIED
(In reply to André Pirard from comment #7)
> (In reply to Ehsan Akhgari [:ehsan] from comment #6)
> > Have you ever seen another product spell check using multiple languages?
> 
> Yes, hunspell as you can read in this bug's description.
> And Evolution as you can read in comment 1.
> And Eudora as you can read it in comment 4.

OK, interesting.  I wonder how each of these products handles the cases below.

> > This is a very hard problem to solve...
> 
> Not at all and it's a most requested feature from a spelling checker to use
> several dictionaries.
> I suppose that you know that a dictionary is not necessarily a language.
> How do you think the specialized dictionaries, e.g. medical, could be used
> without the base one.

Yes, sure.  But we can't differentiate between a dictionary for a human language and one for a specific topic, such as a medical dictionary...

> > 1. How should a word that is valid in language A and invalid in language B
> > be handled?
> 
> It must be accepted, of course.
> Obviously, the word must be valid in one OR the other language, not both.

Hmm, so, are you saying that if I use the work "ouch" in the middle of a text written in Dutch for example (where I probably meant "auch"), it should be accepted if the user has both the English and Dutch dictionaries installed?  I think that's less than ideal.

> In fact, you don't have to care about that because hunspell does all the
> work already.

Well, it's true that hunspell supports it, but that doesn't necessarily mean that it's something that Firefox should support.

> > 2. If we find a misspelling, how should we generate a spelling correction
> > suggestion list?
> 
> Simply by merging the two suggestion lists.
> But usually there's little merging because the mistyped word looks like the
> correct spelling and unless you really really goofed you won't get a Russian
> suggestion for an English word.

Are you asserting that for every misspelled word across any combination of existing languages?

> > This bug, in its current form, cannot be fixed, I'm afraid.  Feel free to
> > reopen if you have concrete solutions to both of these problems.
> 
> I am VERY HIGHLY surprised by your reaction.
> Have you really read the bug description?
> How did you understand "The spelling checker that Thunderbird and Firefox
> use allows using several dictionaries simultaneously"?"
> What problem do you see in just using what has already done?

The problems that I mentioned above.

> What is the difficulty in passing several dictionnary names as in:  
> hunspell -d fr_FR,en_US,ru_RU
> It's just a matter of allowing to configure multiple dictionaries as
> explained in the bug's description.
> 
> Did you type that command?  It answers your questions.

I never said that this is something that hunspell doesn't support.  Whether or not hunspell supports it doesn't mean that we should enable this feature in Firefox.

> Are you claiming that Thunderbird should prevent a doctor using the medical
> dictionary he has installed, or an engineer the engineering one?

No, I'm saying that Thunderbird should probably prevent a person who speaks both Dutch and English to misspell "auch".  There are lots of other examples like that.

> How can you explain that other people have found this to be the most simple
> and brilliant solution to many spell checking problems?

There are lots of other products which have found the solution that we implement today to be the right one.


I'd really like feedback from somebody in the UX team on whether they consider this to be an acceptable feature from a UX perspective or not.
Keywords: uiwanted
Summary: simultaneous multilingual spell checking → multi-dictionary spell checking
NB wontfixing this is the same as wontfixing the heavily requested Bug 69687 (Spellchecker: Multiple language design), an this bug is a duplicate, strictly speaking.  (plus the others noted in comment 0.  So users in bug 69687 will obviously care about exploring the fate of this issue.

It seems like the main questions are a) how badly wanted/needed it is for Firefox (what are the biggest use cases, things like gmail?), and Thunderbird (approx 17 of 26 dups to 69687 were filed as Thunderbird/mail users, and 69687 was failed as a mail bug), and b) whether it's worth the development cost. 

We need Thunderbird perspective, so cc: Thunderbird UX lead, as a starting point.
Status: VERIFIED → RESOLVED
Closed: 13 years ago13 years ago
Keywords: intl
Hardware: x86 → All
OK, I think I might have given the wrong impression by WONTFIXing this.  I'm not saying that this is not an issue, and we should not address it.  What I wanted to convey is that I don't think the presented solution is a good once, unless UX thinks otherwise.  And my "no" here is not a strong one, since I don't think that there is a very good solution to this problem anyways.
Status: RESOLVED → REOPENED
Ever confirmed: true
Resolution: WONTFIX → ---
So as a person who uses both French and English almost equally, and who also happens to spellcheck both (esp. for comfortable vs. confortable, dependent vs. dependant, etc.), I think merging the two dictionaries is actually a good thing when the two are checked in the UI. Here's our various options:
- do something elaborate, like try to detect per-sentence or per-paragraph which language we're in, and spellcheck accordingly: this is going to be really involved in terms of code changes, and also this moves us into some land we don't want to tread, like "how do we detect the end of a sentence";
- do something mildly elaborate, like spell-checking the whole message, and if that yields say, more than 50% spelling mistakes, try to find another language that yields a lower number of spelling mistakes: that assumes people actually know how to write, which might be a bad assumption ;-);
- do something not elaborate, and merge the two dictionaries: this is straightforward, and the criterion is "if a word spell checks in none of the languages checked, then mark it as a spelling mistake" — this will fail to detect some spelling mistakes such as my examples above, but at least, this might be better than having no option at all.

On a personal note, I find myself switching dictionaries all the time, and I think we've had a lot of grief regarding that issue, so going with the third option would allow us to cheaply alleviate the most pressing issue, while giving us the ability to improve the situation later. Also, Evolution does that, as well as the N900, so that wouldn't be an extremely exotic behavior...
(In reply to Ehsan Akhgari [:ehsan] from comment #9)
> (In reply to André Pirard from comment #7)
 
> OK, interesting.  I wonder how each of these products handles the cases
> below ...

So, are you explaining the world is that László Németh is a stupid person because he made a multiple dictionary spell checker?

Are you explaining us is that Evolution are out of their mind because they're using that feature?

Are you explaining us is that the other persons who propose that solution on bugzilla are stupid?

Are you explaining us that I was mad using that feature with Eudora to my best satisfaction?

Are you explaining us that those who discover the feature and love it should go and use Evolution instead?

Are you explaining us that Mozilla should stand in the shoes of the French academy and forbid people to use bold the old and new version of their language or specialized dictionaries, same for other languages ...

Are you explaining us that professional dictionaries shouldn't be used?

If Mozilla is the police of what people can type, why don't you suppress the personal dictionary?

Are you telling us that it's a user punishment to have to constantly switch their dictionary?

> OK, interesting. I wonder how each of these products handles the cases below.

It's good to see you discover and start wondering. But not after having closed the case.

> Hmm, so, are you saying that if I use the work "ouch" in the middle of a text
> written in Dutch for example (where I probably meant "auch"), it should be
> accepted if the user has both the English and Dutch dictionaries installed? I
> think that's less than ideal.

Please understand that it is not a matter of "installing" a dictionary as you say but of configuring (using) it and hence that anyone can disable the feature if they don't like it.
Anyone should be free to use the feature or not and in a democratic world no one should stand as a policeman to prevent others doing multi-dictionary spell checking.

Have you experimented it?   I did;  for more that 10 years.
I can tell you that for a multilingual person using a worst case French-English mix, the cases you present -- and of which I already spoke -- make a very tiny percentage or errors.  The other very high percentage is, beside correcting mistakes of course, accepting a lot of correct words that the checker would boringly flag as mistakes otherwise.  The net result is a very, very pleasing benefit.
What you say is perfectly correct but it's possible to make much more undetected mistakes with a French dictionary alone than by adding an English dictionary.

sceau seau saut sot


Are you explaining us that a person writing in العربية, Беларуская, Български, বাঙ্গালী, Ελληνικά, فارسی, ગુજરાતી, हिंदी, Հայերեն, 日本語, ქართული ენა, ಕನ್ನಡ, 한국어, Pyccĸий, Српски, தமிழ், తెలుగు, ภาษาไทย, Українська or 中国  will mistakenly type their language switching sequences to and fro, type a valid English word in between and that it all will be mistakenly taken as their correct language?

Are you explaining us that you asked for example a few Russian programmers and that they replied that it's not an interesting feature to mix Russian and English painlessly?

Have you experimented it?   I did;  for more that 10 years.
I can tell you that for a multilingual person using a worst case French-English mix, the cases you present -- and of which I already spoke -- make a very tiny percentage or errors.  The other very high percentage is, beside correcting mistakes of course, accepting a lot of correct words that the checker would boringly flag as mistakes otherwise.  The net result is a very, very pleasing benefit.

Please, if you're multilingual, experiment the feature with Evolution before criticizing.
And BTW you will notice that those stupid guys have lost their time splitting spelling suggestions by dictionary to ease usage of the forbidden fruit from the Tree of Knowledge of Good and Evil.

> Well, it's true that hunspell supports it, but that doesn't necessarily mean
> that it's something that Firefox should support.

Well it's true that somebody invented the wheel but that doesn't necessarily mean that it's something we should use.  But having seen at least Mrs Eudora and Mr Evolution build a car with it and the others hitch-hike on the roadside, it might well be an interesting invention.

You may leave Firefox alone if you like.  This feature is mainly for Thunderbird.
As the Web is designed to have users type text in 2×6 cm windows (and make believe it's e-mail), they type it with Thunderbird and paste it in Firefox anyway.

> I never said that this is something that hunspell doesn't support. Whether or
> not hunspell supports it doesn't mean that we should enable this feature in
> Firefox.

Indeed.  You asked what products support it.
Thinking that hunspell did not spend their time on that on a whim is thinking twice too.

>> Are you claiming that Thunderbird should prevent a doctor using the medical
>> dictionary he has installed, or an engineer the engineering one?
>
> No, I'm saying that Thunderbird should probably prevent a person who speaks
> both Dutch and English to misspell "auch". There are lots of other examples
> like that.

Then if you say that you don't reject multi-dictionary, why are you closing a case that's proposing it?

The criteria is not the number of "examples like that" but the number of actual errors that it provokes and my testimony is that they are few compared to the other very high comfort.

It's not a question of "persons speaking..." but of "persons checking".
No one is compelled to use multi-dictionary.
It's a question of personal decision and not of big brother watching (thanks anyway).

>> How can you explain that other people have found this to be the most simple
>> and brilliant solution to many spell checking problems?
>
> There are lots of other products which have found the solution that we
> implement today to be the right one.

Can you please show us some quotes that products have rejected multi-dictionary spell checking?
The opinion I have personally read several times is that it is a key feature.
What I think is that the lot of other products didn't notice it is possible, just like it appears that you're discovering it along while writing, same with your UX as the next sentence means.

> I'd really like feedback from somebody in the UX team on whether they consider
> this to be an acceptable feature from a UX perspective or not.

That's a very good idea to ask several persons' opinion before closing a bug.
It's a good idea to especially ask the opinion of multilingual people: those always writing in the same language have, of course, no opinion at all about that.
It's a very good idea to ask them to read what has been written about it and even better, to try it.
At least carefully what has been written in this thread.

In the meantime, could you please remove this one person's opinion WONTFIX, thank you.
Thanks ehsan and protz for pointing out the issues.  (André, they are not the enemy)

Potentially impacts:
- Bug 467523 - Multilingual signature cannot be correctly checked by spell-checker
- Bug 491055 - Usability: switching spellcheck language slow - button too small
Perhaps there are others.

keyboard was also mentioned somewhere, on IRC I think, so I'll point out
Bug 338469 - Turn off spell checker when doesn't match language of active keyboard
OK, I had my reply written since 2 days and I posted it before seeing your replies.
Sorry for my being late and out of sync. In the 2-days meantime,
I polled 5 persons (French) and they all agreed that my request is a VERY interesting feature.
(and they were very upset, just to use another expression)

Thank you for reopening this case.
I think that the best move is to poll users, get their opinion and then present it to UX if needed.
But don't forget that it's an OPTIONAL feature and please poll guys like Russian developers too.

As to concurrence with bug 69687 (and others), I hate those "I was first" situations.
That other bug is in fact VERY VERY different, and OVER 10 YEARS, evolved on tracks for some of which this bug is another solution.  But its proposed patch is certainly not a solution for this.

Also, this proposition has also been found as a solution for other Firefox bugs by guys over there.
I want to stress that this bug has been opened for Thunderbird.
But the spelling checker is partly common to both.
I DO NOT WANT to interfere with the work of those who work for Firefox.
Those guys can have, from the Web page contents, hints as to which language spell.
It's up to Firefox development to decide if they use those hints ans how, as long as they don't interfere with the user's choice to use several dictionaries.

Also, I badly presented the problem as a language one.
It is a multi-dictionary one with a very interesting bonus as a multi-language solution.

So, I advise to keep all those bugs separate, with good sisters' relations.

To the benefit of Thunderbird !!!

Thanks and public apologies again for the out of sync (but more reasons were fed in).
(In reply to comment #12)
> - do something elaborate, like try to detect per-sentence or per-paragraph
> which language we're in, and spellcheck accordingly: this is going to be really
> involved in terms of code changes, and also this moves us into some land we
> don't want to tread, like "how do we detect the end of a sentence";
> - do something mildly elaborate, like spell-checking the whole message, and if
> that yields say, more than 50% spelling mistakes, try to find another language
> that yields a lower number of spelling mistakes: that assumes people actually
> know how to write, which might be a bad assumption ;-);

One thing to note here is that spellchecking in general is an expensive operation (at least, the way it's currently implemented in Gecko), so if possible, I'd like to avoid doing extra spellchecking rounds...
(In reply to comment #15)
> OK, I had my reply written since 2 days and I posted it before seeing your
> replies.

Good to know.  I'd like to keep the conversation here productive, so I'm not going to directly reply to comment 13 (and apologies for that).  If you feel that there is a technical argument that I missed in that comment, please let me know. :-)

> I think that the best move is to poll users, get their opinion and then present
> it to UX if needed.

Well, we don't usually decide on these types of features based on a poll.  We try to make the best informed decision possible by considering all sides of the argument.  And feedback is very welcome, especially technical feedback on the drawbacks of this approach, and possible solutions.

> Also, this proposition has also been found as a solution for other Firefox bugs
> by guys over there.
> I want to stress that this bug has been opened for Thunderbird.

It's filed in Core, which mainly talks about the functionality in Gecko.  Once we have this functionality implemented in Gecko, applications such as Firefox and Thunderbird can decide whether they want to expose this in their UI or not.

And as I mentioned on IRC today, as a useful data point here, I'm a bilingual person myself, so I dearly understand the problem at hand here.  :-)
Just to add my 2 cents... I am also constantly writing between French and English, and the only issue I meet is that Firefox don't remember the language for each website (for instance, I want to spell-check in English on Bugzilla and in French on Geckozone). But there is an Add-on which do that quite good.

I never need to spell-check two different languages on a same web-page or into a same mail, so I don't feel very concerned by this issue. 
I wonder if it wouldn't be better addressed by an add-on...
(In reply to caméléon from comment #18)
> Just to add my 2 cents... I am also constantly writing between French and
> English, and the only issue I meet is that Firefox don't remember the
> language for each website (for instance, I want to spell-check in English on
> Bugzilla and in French on Geckozone).

That issue is discussed in other bugs.
This one relates to using multi dictionary spell-checking, and not necessarily multi-language, and principally for e-mail.
Mono-language sites are as natural as multi-language e-mail for some persons.
Various comments show that the goal of this "bug" needs to be clarified.
The bug's description should be modified but it is not allowed.

Typically, writing technical or specialized text like computer science is a matter of enjoying wavy underlines everywhere under specialized terms and of strafing the ignore button when spell checking, the result being skipping real mistakes. To those whom some people call foreigners because they write languages like French, the problem is even worse because many technical terms are plain English words not present in their base dictionary.

Devoted people have devised a feature that is considered a key one: multi-dictionary spell checking.
One simply installs and activates an additional dictionary containing those specialized terms.

Courageous people have implemented multi-dictionary in an evolving spell checker that is presently known as hunspell.  It's a mere matter of adding two files to install a dictionary.  It's a mere matter of passing several dictionary names as arguments to use them.

Of course, this marvelous capability collapses if the applications' UIs disallow selecting multiple dictionaries.
It is the goal of this case that Mozilla should allow it.

The multiple-language aspect is a bonus for those who like it. Some like Russian-English will undoubtedly like it and it's up to the others to decide if they will.

(1) If none exists, it's a nice project to start, for example by asking Dicollecte if they would host it, or simply creating a Wiki page for everyone to fill. Plain language dictionary builders are reluctant to add technical terms because it crowds their dictionary. An interesting feature of some specialized dictionaries like computer science is that they can, at least partly, be the same for all languages.
Status: REOPENED → RESOLVED
Closed: 13 years ago13 years ago
Resolution: --- → WONTFIX
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
Bug 481884. Please note the "no comments there". The more comments, the less likely to get implemented.
Status: REOPENED → RESOLVED
Closed: 13 years ago13 years ago
Resolution: --- → DUPLICATE
1) it is REALLY worth experimenting with Evolution and "draw" from it
2) see http://www.papou.byethost9.com/notes/Ubuntu_spelling.html
3) if you flag this bug as resolved and duplicate of another one that is much more restricted, it will probably never be implemented
Making bug 676500 a duplicate of bug 481884 is unacceptable on the sole grounds that it's older.
Bug 481884 basically presents the same issue but totally overlooks specialized dictionaries.
It is mostly a series of questions from people not understanding or of agreements from others.
bug 676500 discusses practical solutions that, I'm told, have been considered by developers & UX.
Unfortunately, it starts with noisy replies to Ehsan who finally retracted his arguments.
But it finally continued very constructively and the instructions were to wait for development.

Hence, it's unacceptable to simply close it and throw away everybody's work.
That's why I reopen this bug.
The best would be to clean up the noise and to merge what's useful from bug 481884.
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
> Bug 481884 basically presents the same issue but totally overlooks specialized dictionaries.

Specialized directories are not a code issue. They are an argument, and you added that.

Which "work" did happen on this bug?

We don't need 3 bugs for the same thing.
Status: REOPENED → UNCONFIRMED
Ever confirmed: false
If this feature is implemented someday, it should be _OPTIONAL_.

There is several difficulties with multi-language spelling:

1.
== SUGGESTING THE RIGHT SPELLING ==
confusions between languages can be frequent, so suggesting the correct spelling is a major problem. For example, between French and English: language (en) = langage (fr) // example (en) = exemple (fr) // license (en) = licence (fr) // tomb (en) = tombe (fr)

How the spellchecker is supposed to know which word to suggest with so many closed spelling?


2.
== GRAMMAR CHECKING ==
Grammar checkers must know what language rules to check and what Hunspell dictionaries to read to get the correct morphological informations they need to proofread the text. It cannot be several languages at the same times. It’s already enough complicated to deal with one language…

OpenOffice.org used to have a option for multi-dictionaries spellchecking, but this option was removed with the version 3.0, when the developpers created the grammar checker API.

So, if the Mozilla team want to implement a grammar API someday, remember this.


That are the reasons why this cool feature must be _OPTIONAL_. :)
> That are the reasons why this cool feature must be _OPTIONAL_. 

Of course. You'd yourself select the dictionaries that you want to include.

The default is just the dict that matches the language of your application, e.g. only English when you downloaded Thunderbird in English.
> == SUGGESTING THE RIGHT SPELLING ==
May I recall Comment 22 : experimenting with Evolution (and get a feeling of the feature).
Evolution presents the suggestions per language.  So, assuming that the writer knows in what language he wrote (I sometime have to think twice :-)), it's in no way different from the mono-language case.
The remark is however very judicious because, doing so, Evolution seems -- I did not look at the code -- to go beyond the simple use of the multi-dictionary feature of Hunspell that I suggest and that's a choice to make.

> == GRAMMAR CHECKING ==
Good point again, but should Thunderbird do grammar checking (which is by far more complicated that single hunspell use) when there are other problems enough to be solved? (Is it just me, I meet a lot of plain composition problems: e.g. spelling alone, TB would make the last word of a header and the first of the next paragraph a single word to spell).
But, once again, whether the user or the grammar doesn't like it, one can choose a single dictionary (or, according to a current trend at Mozilla, let Firefox choose it in your place), and that's the definition of OPTIONAL.

Some try to do it, but I don't believe much in guessing the language (alone) and that's why I believe more (as an alternative) in simultaneous multi-language which applies nicely to the interspersed case.  I lately wrote in Wikipedia:
Пишет (3rd person: it writes) вам (dative: to you (all)) письмо (letter) семья (family) Дарьи (genitive: of Daria).
I know that simultaneous multi-language passes this with flying colo(u)rs and I need to see language detection at work to build my own opinion.

And -- do you like computers? -- adding a computing or chemistry dictionary is yet another matter.
> The default is just the dict that matches the language of your application, e.g. only English when you downloaded Thunderbird in English.

I (initially or later) configured my Ubuntu system with English, French, Russian, Spanish, German, Dutch and Greek, which is the only thing to do to get all the following working.
I installed Thunderbird in no specified language from my Ubuntu distribution or a ppa.

Several user can choose which of those languages they want their Gnome session to run.
TB's GUI displays the menus according to which of those session languages the user chose.
Or he can launch TB e.g. in German anytime with the command env LANG=de_DE.UTF-8 thunderbird.
Thunderbird can spell any of those language irrespective of the language of the session, the language Thunderbird's GUI displays or the language of the writer, or rather his languages if he's configured with several languages too.
Thunderbird remembers the last language it used for spelling (not per message unfortunately).

The expression "language(s) of ..." must be used with much caution.
I use Ubuntu which recently switched from Evolution to Thunderbird. I miss the multiple spell-check dearly. Thunderbird remembers the spell checker from my last written email, but I use English, French and German. It is so annoying to switch back and fro. The more if using multiple languages in one text!
Can you change the language radio buttons to checkboxes please?
> but I use English, French and German. It is so annoying to switch back and fro. The more if using multiple languages in one text!
Same case for English, Russian and Ukrainian.

Is anything changed in status of this feature request in last half-year?
No.  We need somebody to jump in and help with the code changes needed to do this.
Keywords: helpwanted
Sounds like merging dictionaries for people that use more than one is an acceptable solution.  Marking a word as correct even if incorrect in one active dictionary is fine if it takes care of the main use case without adding the kind of complexity that Jonathan describes in Comment 12.  

In Firefox, I'm guessing the only relevant UI would be in the add-ons manager.  If we're merging dictionaries only, we could treat dictionary add-ons similarly to other extenions: if it's enabled the dictionary is active, and if it's disable the dictionary is not active.

Unless there's anything more needed, I'd be happy to review a patch with this behavior in the add-ons manager.  I'm removing uiwanted now, if input's needed later please feel free to add back.
Keywords: uiwanted
The list of language extensions is not the same as the list of dictionaries (1).
As more languages are configured for Ubuntu, language files are added for all applications, including hunspell dictionaries. This includes global extensions for Thunderbird/Firefox, whose dictionaries in fact point to the installed system files (symbolic links).
But hunspell dictionaries can be installed another way, hence appearing in the dictionary list but not in the extensions.
The present dictionary list has to be changed to multiple-selection list.
Read http://apirard.voila.net/Ubuntu_spelling.html
(1) Ubuntu/Debian/Linux/Unix is a multilingual system using a single system's spelling checker (hunspell) and dictionaries. Windows is monolingual. Each application brings its own languages and spelling checker. You may pay twice for the same one.
(In reply to André Pirard from comment #33)
> Windows is monolingual. Each application brings its own languages and spelling checker.
> You may pay twice for the same one.

I believe it's worth to point out that this might change with Windows 8.
(In reply to Jennifer Morrow [:Boriss] (Firefox UX) from comment #32)
> Sounds like merging dictionaries for people that use more than one is an
> acceptable solution.  Marking a word as correct even if incorrect in one
> active dictionary is fine if it takes care of the main use case without
> adding the kind of complexity that Jonathan describes in Comment 12.  

Thanks, that's what I needed to know!  :-)  Now we need to find somebody who's willing to work on this.  :-)

> In Firefox, I'm guessing the only relevant UI would be in the add-ons
> manager.  If we're merging dictionaries only, we could treat dictionary
> add-ons similarly to other extenions: if it's enabled the dictionary is
> active, and if it's disable the dictionary is not active.
> 
> Unless there's anything more needed, I'd be happy to review a patch with
> this behavior in the add-ons manager.  I'm removing uiwanted now, if input's
> needed later please feel free to add back.

I'd rather the add-on manager UI to go in another bug.  Let's keep this bug about the back-end support.
Status: UNCONFIRMED → NEW
Ever confirmed: true
There is a simple solution to prevent a word from one language to be accepted while the user is writing in the other language : using paragraph context.

It is easy to detect the language of a paragraph and then implicitely switch dictionnary.
In the code of Firefox there is already a very good charset detection library. Once the charset is known it is not very difficult to detect the language of a paragraph

Same applies to TDB.

That's a very much wanted feature, I spend my life switching languages and it's SO boring.

Yes, basically, I (the reporter) find they look like duplicates.
But I don't agree with the principle or erasing the good things that were written in one and just keep the other.
The best of them should be merged, for example, that Evolution does it or that modifying hunspell instead would be more general.
However, what's not in line with the initial report should be disregarded (or made another "bug").
For example, both requests are to mix words of different languages, not paragraphs.
Also, detecting the language based on words that may contain mistakes seems strange and does not apply to mixing words.

I don't understand why this request isn't implemented immediately for languages of different alphabets. It seems that almost all the major challenges would be with languages from the same family. Is it so complicated to automatically switch language when the keyboard switches from English letters to Arabic or Chinese or [enter dozens of other languages] letters and vice versa?

Updating the severity to the current severity levels. Multi-language spellcheck is not yet supported.

Severity: major → S3
Status: NEW → RESOLVED
Closed: 13 years ago2 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.