Bug Hunting Session
Bug 121779 - Autocorrect: an option to avoid auto-capitalization of some words
Summary: Autocorrect: an option to avoid auto-capitalization of some words
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Mike Kaganski
URL:
Whiteboard: target:6.3.0
Keywords:
Depends on:
Blocks: AutoCorrect-Complete
  Show dependency treegraph
 
Reported: 2018-11-29 06:39 UTC by Mike Kaganski
Modified: 2019-09-19 15:55 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2018-11-29 06:39:33 UTC
As per https://ask.libreoffice.org/en/question/174175:

There are some words, that explicitly must start with a lowercase character, and may have some or all other characters uppercase: mRNA, tRNA, iPhone, fMRI. They may get auto-capitalized as the result of applying either "Capitalize first letter of every sentence", or "Correct accidental use of cAPS LOCK key". There is no exception rule for such cases (currently only "Abbreviations (no Subsequent Capital)" and "Words With TWo INitial CApitals" exist, that don't fit to the case).

The proposal is to add such an exclusion rule; it might be either the third list in addition to the two existing, or an option to ignore words from dictionary which start with a lowercase, but contain uppercase characters in the middle.
Comment 1 Jim 2018-11-29 08:30:20 UTC
Bug confirmed.

Version: 6.3.0.0.alpha0+ (x64)
Build ID: 0f25a3c36f27fd51453b9a9115f236b83c143684
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master
Locale: zh-TW (zh_TW); UI-Language: en-US
Calc: threaded

Bug confirmed on this version.
Comment 2 Chiang Han 2018-11-29 08:33:11 UTC Comment hidden (no-value)
Comment 3 Heiko Tietze 2018-11-30 10:21:35 UTC
Can we merge the two lists and have only one with exceptions for all autoformatting? Three lists sounds like a suboptimal solution, even worse than the two current.
Comment 4 Cor Nouws 2018-12-04 19:52:17 UTC
(In reply to Heiko Tietze from comment #3)
> Can we merge the two lists and have only one with exceptions for all
> autoformatting? Three lists sounds like a suboptimal solution, even worse
> than the two current.

I think so - unless it give trouble to some languages/language teams?
Comment 5 tommy27 2018-12-05 09:48:31 UTC
makes sense. valid enhancement request.

in the meantime a workaround is to put some specific autocorrect items such as "IPhone -> iPhone" and "FMRI -> fMRI" etc. etc.
Comment 6 Heiko Tietze 2018-12-06 13:52:08 UTC
Having only one list that blocks auto correction sounds like the KISS solution. needsDevAdvice for feasibility
Comment 7 tommy27 2018-12-07 05:21:57 UTC
do you mean a "never autocorrect these words" list? sounds nice.
Comment 8 Mike Kaganski 2018-12-07 06:24:13 UTC
The advise should be from developers familiar with linguistics, so that they could see if it's possible to use such a single list, or it would make some scenarios for some languages difficult/wrong.
Comment 9 László Németh 2018-12-07 08:06:43 UTC
Mike, Heiko: Indeed, the list "Words With TWo INitial CApitals" seems perfect for this extension: Words With TWo INitial CApitals or sMALL iNITIAL
Comment 10 Mike Kaganski 2018-12-07 10:18:45 UTC
https://gerrit.libreoffice.org/64759

@Heiko: could you please check if UI is corrected properly and sufficiently. Thanks!
Comment 11 Heiko Tietze 2018-12-07 12:47:31 UTC
(In reply to László Németh from comment #9)
> Mike, Heiko: Indeed, the list "Words With TWo INitial CApitals" seems
> perfect for this extension: Words With TWo INitial CApitals or sMALL iNITIAL

Would have been nicer to have one list of exceptions but this works too.

(In reply to Mike Kaganski from comment #10)
> @Heiko: could you please check if UI is corrected properly and sufficiently.

Like a charm, as always. We should add a few examples to the list like iPhone and fMRI.
Comment 12 Commit Notification 2018-12-07 12:58:05 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/7bf6d0d9d8e3e2e07726ca6df246619ee1ead3a3%5E%21

tdf#121779: extend TWo CApitals list to also ignore sMALL iNITIALS

It will be available in 6.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.