Version: (using KDE 4.4.1) When starting a sentence with "Youre", KWord applies autocorrection and corrects it into "you're" which means that the capital "Y" gets lost. Verified with KWord 2.1.0.
Sounds like something that could be done as a junior-job. The code lives in koffice/plugins/textediting/autocorrection/
Question: Is there a better way to go about letting people know I'm tackling this bug than just posting to the bug tracker? Anyway, advanced autocorrection seems to be the culprit here. Basically anything that's corrected by it gets converted to lower case. Even when the replacement word starts with a capital. For example "Enland" would get replaced by "england" and not "England", "Brittish" by "british", and so on. Something like "Youre" however will get turned into "You're" if the "Convert first letter of a sentence automatically to uppercase" option is on. But I think advanced autocorrection shouldn't need to rely on that when words are already capitalized, so that's how I'm going to proceed. I should have a patch shortly.
Created attachment 41824 [details] Fix advance autocorrection Patch to make sure that things fixed by advanced autocorrection remained capitalized if they're originally capitalized.
Things are perhaps still get screwed up when words like "ENLAND" are typed. It's unclear to me whether or not that should result in "England", or result in "ENGLAND". And perhaps words that end with a punctuation mark aren't behaving right. For sure "1/2." doesn't behave as advertised. I'll investigate further.
advancedAutocorrect() doesn't take punctuation into account.
SVN commit 1108260 by zander: Fixes: autocorrection doesn't take capital letters into account BUG:229328 This patch detects when the user typed a word that had at least one uppercase character and follows that in the replacement. Future enhancement might be to look at more characters, but for now I think this is already a huge advancement. Patch from Glen Kaukola, thank you! :-) M +7 -0 Autocorrect.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1108260
Created attachment 42346 [details] advancedAutocorrect() punctuation handling Patch for the handling of punctuation in advancedAutocorrect().
SVN commit 1108815 by zander: Fix autocorrect punctuation handling BUG:229328 Patch from Glen Kaukola, thanks a lot! :) M +23 -6 Autocorrect.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1108815