Closed Bug 660506 Opened 14 years ago Closed 13 years ago

Turn off spell check when on a foreign language web site.

Categories

(Core :: Spelling checker, defect)

x86
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: ilhan, Unassigned)

References

()

Details

User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 Build Identifier: I use the English Firefox. However I spend a lot time on a Turkish and Bulgarian web sites. There is no need for spell check. Even it annoys me. Reproducible: Always Steps to Reproduce: 1. Run the X language version of Firefox. 2. Go to a Y language web site. 3. Start writing to a form Actual Results: Checks for X language spelling in a Y language web site; all words are red under-wave. Expected Results: no under-waves.
That's why you can install multiple dictionaries and I switch between them depending on what language I want to use. Or I switch off the spell checking if I don't have the dictionary and the read lines bother me. There are a few bugs that try to help in switching faster or automatically (bug 338427, bug 69687, bug 360668 & bug 481884), but it's rather hard (often impossible) to determine in advance what language should be used for which website. How would you determine if it's really a Y language website ?
The language is specified as meta in head section or within the first html tag like <html lang="tr" dir="ltr" xmlns="http://www.w3.org/1999/xhtml"> Firefox will look it and then determine what to do; like turning off English spell check if the page is not English. Also, there is no spell check in at least at most of the Altaic languages due to nature of the language, and the ones that have a spell check perform very badly. It will be good to have an option in about:config to turn off spell check for foreign languages.
Then it's dependent on bug 338427. However, this attribute is actually pretty rare - most websites don't bother. Or a website might be in English, even though you comment in a different language (I'm using an English Facebook for instance, but comment in 3 languages). So you still need to get used to switch languages or to switch spell checking manually in the context menu (right-click).
Depends on: 338427
It's really annoying to switch constantly language when writing in different website in different language. Spell check language should be remembered per domain. This would really be handy
I think that most problems that users report with 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 (and that's the way Evolution does it). It seems fairly simple to do, see https://bugzilla.mozilla.org/show_bug.cgi?id=676500 I'm not sure what is being made in these patches, but be sure not to override the user's setting for the spell checker language(s), especially if, one day hopefully, it will be set to several languages like fr_FR,en_US,en_GB,ru_RU. Automatic detection should be done only if the user has set spell check language setting to "automatic". On the other hand: 1) is it because a page is displayed in French that a bug report requested to be in English should be spell checked in French? 2) is text necessarily in a single language? Looking at the e-mails I most often write, the answer is a definite NO. 3) isn't it much easier and sufficient that the user set once for all the set of all the languages he can write? BTW: was all text entered in this thread spell checked ? ;-)
hi i really need firefox to progress on language detection for spell checking. There is no use to do a functionality that allow facebook constantly open on firefox (so facebook site will likely be on native user language, so often non-english). On the other hand, geeks like us fill bug reports in english so in the same browser we really need to have a per page spell checking that correctly check our bad english when filling a bug report and stay calm when we're chatting in our own language with our friends. it's thanks geek like us that firefox grow up from firebird, spread on the web and saved the world ;)
(In reply to André Pirard from comment #7) @7 1/ => html specify a lang attribute for all nodes. If firefox honnor this attribute, then it use will spread. 2/ => well he will do that when installing the spellchecker (i got 3). the best shoud be to have "automatic language detection" with a option to have a fallback spellcheck or none, or overide the language suggested by the html.
Blocks: 481884
Firefox has made progress on this in bug 338427. Isn't this bug the same problem? I am not sure what happens when the page specifies a language for which there is no dictionary installed. If it turns off spell checking then that would be what this bug wants. But that is not what bug 338427 comment 48 implements. So confirming this bug so that the relevant developers can check what was actually implemented.
No longer blocks: 481884
Status: UNCONFIRMED → NEW
Ever confirmed: true
I believe that bug 338427 should fix this, unless those websites do not use the @lang attribute. CCing Arno to see if he can confirm.
(In reply to aceman from comment #10) > Firefox has made progress on this in bug 338427. Isn't this bug the same > problem? > I am not sure what happens when the page specifies a language for which > there is no dictionary installed. If it turns off spell checking then that > would be what this bug wants. But that is not what bug 338427 comment 48 > implements. > So confirming this bug so that the relevant developers can check what was > actually implemented. If a site specifies a lang for which there is no dictionary installed, spell check is turned off. That what I (tried to) explain in bug 338427 comment 48: If no dictionary was found. Either: - if no @lang was set, try to get en-US or any available dictionary. - if some @lang was set, do not set a default dictionary. If a webpage specifies a language, and no dictionary is available: disable spellcheck. If a webpage does not specify a language, use something (look in the prefs, or pick a somewhat-random one) Also note, that if page specifies pt-BR and only pt or only pt-PT is available, we take this one, and consider there is a dictionary available.
Thanks, I must have somehow misinterpreted the comment. So according to that algorithm, the original report would not be fixed. English Firefox on Bulgarian page that does not specify @lang (may be common as most pages do not specify any @lang (bug 338427 comment 10)) will choose English dictionary which is installed. So all words marked. But I am not sure what Firefox can do there (except from disabling spell checking, but that would upset English users on English pages that omit @lang). Reporter, do you have any idea? You didn't specify how Firefox should know those pages are "foreign language". Do they specify lang attribute?
Additionally this might help: if @lang is not specified look at the .com, .bg, .tr If it is .bg consider it as Bulgarian-language. Almost all .bg web sites are Bulgarian. If the website is Bulgarian and .com it is the webmaster's duty to specify @lang=Bulgarian. If the web site is .org, .com, .net .us, .edu, .xxx and the @lang is not specified consider it as English.
I don't think domain name should be used to determine language. Many top level domain are generic (.com, .org etc), and cannot be bound to a language. Many are country dependent, and in the generic case, a country != a language. It's the webmaster duty to specify the @lang
No, absolutely not. You can not determine a language from a TLD. The Bulgarian language is indeed bg (for ISO 639-1 at least, for ISO 639-2 it's bul !), but that's always the case. For example, what language do you assign to a *.uk site ? Uk ? NO! Uk stands for Ukrainian ! And I'm not even talking about the various countries that have multiple languages. Why do people keep thinking that language == country ?
There is almost does not exist English web sites that are on .bg Same for Turkish. I'm not sure about the others but I guess probably it is same with other countries. I'm sure .бг domains will not publish English content. If there is going to be an English content on a .tr domain then webmasters will be forced to specify @lang to handle the spell check problem. For .uk case there can be done a simple table. .uk: english .укр: ukrainian .ua: ukrainian .ch: not specified But! These are in case the @lang is not specified. So, I'm asking what would Firefox do if it cannot find @lang, the Firefox is English, and the user is located in a .tr domain. It is highly likely that the content is Turkish, he is going to write Turkish and thus if he has not Turkish-spell-check the spell check needs to be turned off. It seems like a mess but it is just my idea. Many users like me use English version of Firefox. And all I want is not to see English spell check on Turkish and Bulgarian web sites. (You might ask why you don't install Turkish spell check etc. Turkish spell check sucks; the language is very complicated for a spell check. Also most of the time I use university's computers where I don't have administrative rights)
If I arrive on a site specifying or in any language (eg Chinese), I want my spelling checker to remain checking only the languages I am able to type (not Chinese, I usually communicate with them in English but it could be French, Dutch, German, Russian and but very unlikely Walloon) And that ideally means at the same time all the language I can type, including a possible computer science dictionary, without the need to constantly switch from a single dictionary to another or fight back inappropriate system's decisions. Having a dictionary installed on my multiuser system doesn't mean I can type that language. Yes, we speak 3 languages in my country, plus many immigrants', count one more whenever an Englishman comes in. Yes indeed many ones should do away with "your language" and use "your languages" instead.
I think it needs precision and elaboration. You probably will never have Firefox vs Web administrator determine the language *you* want. If it were straightforward, there wouldn't be so much talk about what is wanted, let alone how to do it. If you can write languages X, Y and Z, install and configure checking X, Y and Z simultaneously. = a feature to be done, but easily, see bug 676500. If you don't like simultaneous language checking, your best bet is asking for a button to rapidly rotate XYZ. "Spell" on the spell button could show that single language. Now if you need to disable spell checking entirely, just add a "no language" to the rotating list. ALL -> X -> Y -> Z -> NONE Else, you will find yourself constantly fighting the automatic decisions. How could an eBay page determine in what language a Swiss will write to a Belgian if there are at least 5 languages spoken in CH and 3 in BE and if those people can change language according to their daily mood. I often write the same message in 2 or even 3 languages and my definite preference is permanent XYZ and peace.
(In reply to Ilhan Y. from comment #17) > There is almost does not exist English web sites that are on .bg Sure there is. Just google for this: site:.bg lang:en The only way that a browser can correctly "guess" the language of a web page is by running a language detection algorithm on it, which is not really feasible performance-wise today. This is why the HTML5 spec recommends websites using the lang attribute. I'm WONTFIXing this bug, as there is nothing on the browser side that we can do to fix the websites which do not set the lang attribute correctly.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WONTFIX
For those who do set lang attribute correctly?
(In reply to Ilhan Y. from comment #21) > For those who do set lang attribute correctly? They should already be handled correctly with bug 338427.
You need to log in before you can comment on or make changes to this bug.