--===============1728039701671783516== Content-Type: multipart/alternative; boundary="===============1956496750129149885==" --===============1956496750129149885== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/106244/ ----------------------------------------------------------- Review request for Plasma. Description ------- Krunner's spellcheck plugin has been pretty broken since bd291d21f096a714a1= 71e7af3a534ba345ca5659 (about two years ago) because it called Sonnet::Spel= ler::setLanguage every time the spellchecker was invoked, which was (very m= uch) not thread-safe. = Review 106242 fixes the segfaults, this commit fixes the feature, which I u= nderstand to be, basically, the = ability to type 'spell french bonjour' and have it check the spelling. The current code simply calls setLanguage on the second term in the search = query, and then checks whether the resulting dictionary object is valid. Un= fortunately, the response of the spell-checker to being fed an invalid lang= uage was to crash on the next query (this is fixed in 106242). Furthermore,= the spell-checker expected languages like 'fr_FR' or 'French (France)' whi= ch the user was vanishingly unlikely to type in correctly. = So what this does is to only call setLanguage when necessary (just in case = I missed something in 106242), = and then only after we have turned the query we are fed into a valid spell-= checker language. = This is a little bit tricky, because in particular "spell english" is going= to mean different things to different people. = My approach was to try and find the main language of the group: so 'french'= gets you fr_FR. This works ok for most things, but not really for english.= For that I default to US english, unless UK english is installed. Probably= one should special case other english variants as well, but I haven't beca= use I am unsure what spellings are in common use in practice. = I have not tested this spelling an asian language as I don't speak one. I have not implemented 'spell canadian french' or similar. If you want a sp= ecific sublanguage you have to type in the language code directly. Diffs ----- runners/spellchecker/spellcheck.cpp 672732d = Diff: http://git.reviewboard.kde.org/r/106244/diff/ Testing ------- Compiled, installed, ran for a week and spell-checked a bunch of things in = European languages. Thanks, Simeon Bird --===============1956496750129149885== Content-Type: text/html; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable
This is an automatically generated e-mail. To reply, visit: http://git.revie= wboard.kde.org/r/106244/

Review request for Plasma.
By Simeon Bird.

Descripti= on

Krunner's spellcheck plugin has been pretty broken since=
 bd291d21f096a714a171e7af3a534ba345ca5659 (about two years ago) because it =
called Sonnet::Speller::setLanguage every time the spellchecker was invoked=
, which was (very much) not thread-safe. =

Review 106242 fixes the segfaults, this commit fixes the feature, which I u=
nderstand to be, basically, the =

ability to type 'spell french bonjour' and have it check the spelli=
ng.

The current code simply calls setLanguage on the second term in the search =
query, and then checks whether the resulting dictionary object is valid. Un=
fortunately, the response of the spell-checker to being fed an invalid lang=
uage was to crash on the next query (this is fixed in 106242). Furthermore,=
 the spell-checker expected languages like 'fr_FR' or 'French (=
France)' which the user was vanishingly unlikely to type in correctly. =


So what this does is to only call setLanguage when necessary (just in case =
I missed something in 106242), =

and then only after we have turned the query we are fed into a valid spell-=
checker language. =

This is a little bit tricky, because in particular "spell english"=
; is going to mean different things to different people. =


My approach was to try and find the main language of the group: so 'fre=
nch' gets you fr_FR. This works ok for most things, but not really for =
english. For that I default to US english, unless UK english is installed. =
Probably one should special case other english variants as well, but I have=
n't because I am unsure what spellings are in common use in practice. =


I have not tested this spelling an asian language as I don't speak one.

I have not implemented 'spell canadian french' or similar. If you w=
ant a specific sublanguage you have to type in the language code directly.

Testing <= /h1>
Compiled, installed, ran for a week and spell-checked a bunc=
h of things in European languages.

Diffs=

  • runners/spellchecker/spellcheck.cpp (67273= 2d)

View Diff

--===============1956496750129149885==-- --===============1728039701671783516== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel --===============1728039701671783516==--