Bug 130695 - EDITING: in custom dictionary, let abbreviations have trailing periods, and recognize the bad abbreviations without the dot
Summary: EDITING: in custom dictionary, let abbreviations have trailing periods, and r...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Linguistic (show other bugs)
Version:
(earliest affected)
6.3.4.2 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:26.8.0 target:26.2.0.2
Keywords:
Depends on:
Blocks: Spell-Checking
  Show dependency treegraph
 
Reported: 2020-02-15 21:11 UTC by Nick Levinson
Modified: 2025-12-31 03:56 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
screenshot of the extended context menu of the bad words with a dot (30.48 KB, image/png)
2025-12-31 03:56 UTC, László Németh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Levinson 2020-02-15 21:11:21 UTC
Description:
The user-defined dictionary fails to add a trailing period for an abbreviation that has it in the ODT document from which the dictionary is being compiled.

Steps to Reproduce:
1. In Writer, have a document with text open. Include some abbreviations that have periods and that are not in LO's dictionaries. Examples (relevant to English (USA)):
M.D.
F.A.C.S.

2. Press F7, for Spelling.

3. When spell-check encounters one of these abbreviations and you can specify how to handle it, click Add to Dictionary.

4. Click the Options... button.

5. For the user-defined dictionaries, leave as preselected Standard [All] and click the Edit... button.

6. Examine entries for abbreviations you added.

7. If the trailing period is missing, you may want to select each one and then click Delete. Examples:
M.D
F.A.C.S

Actual Results:
Even though the string under consideration because it's not already in the dictionary and you have a choice of how to handle it is red when the surrounding text is black and the red string includes the trailing period, the trailing period is not being copied into the user-defined dictionary.

Expected Results:
Inclusion of the entire red string, including a trailing period. An alternative expectation is that the trailing period would not be red, but would be black, but periods are small and so that would be a subtle and counterintuitive signal to the user, easily missed.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Apparently, entries can have periods in the middle but not trailing.

In a few cases, abbreviations properly have periods in the middle but not trailing, but that's unusual.

The period that ends a sentence when the sentence ends with an unknown abbreviation that uses periods can confuse the dialog, by making the sentence-ending period red even though the period won't be accepted for the custom dictionary.

The problem persists in version 6.3.4.2.0+ (build ID 6.3.4.2-2.fc31). I'm not prepared to install a newer or unstable verion.

I don't have an OpenGL setting.
Comment 1 Dieter 2020-03-11 17:30:04 UTC
I confirm it with

Version: 6.3.5.2 (x64)
Build-ID: dd0751754f11728f69b42ee2af66670068624673
CPU-Threads: 4; BS: Windows 10.0; UI-Render: Standard; VCL: win; 
Gebietsschema: de-DE (de_DE); UI-Sprache: de-DE
Calc: threaded

and user-defined dictionary
Comment 2 QA Administrators 2022-03-12 03:37:57 UTC Comment hidden (obsolete)
Comment 3 Nick Levinson 2022-03-19 19:23:37 UTC
The bug was still recently present, including in Safe Mode.

The only difference in applying STR to this test is that the desired user dictionary was not preselected, and that's only because I had created an additional dictionary, which was preselected, so I selected the desired dictionary and found the new entries that lacked trailing periods.

Before the latest update per Fedora Linux: LO: From Help > About:
Version: 7.2.5.2.0+
Build ID: 20(Build:2)
CPU threads: 2; OS: Linux 5.16; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

I'm not prepared to install another LO version.
Comment 4 QA Administrators 2024-03-19 03:12:48 UTC Comment hidden (obsolete, spam)
Comment 5 Justin L 2025-09-28 00:42:21 UTC
Clearly NOTABUG.

Your mind is too much focused on abbreviations.  Try this line:
    Spell check uses red colooour.

Notice that the "red string" includes the trailing fullstop.  Clearly we would not want to include this fullstop in a custom dictionary if this word was added.
Comment 6 Commit Notification 2025-12-28 22:49:08 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/80dcb39edbffbe53d6833160afb7ad11cc51409d

tdf#130695 sw linguistic: fix custom abbreviations

It will be available in 26.8.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.
Comment 7 László Németh 2025-12-28 22:57:41 UTC
Normal dictionaries supported spell checking of the missing dot of the abbreviations, but not the custom dictionaries previously: it was possible to add abbreviations with terminating dot by direct editing of the custom dictionary, but the abbreviations were accepted without the dot, too. Now the custom dictionaries allow the same, as the Hunspell dictionaries, i.e. accepting the abbreviations only with the mandatory terminating dot.

Also the following user-friendly options were implemented for the
abbreviations:

– spell checking dialog: words with multiple dots
  – e.g. F.A.C.S. –, are always added to the custom dictionary
  with the terminating dot to reject the bad abbreviations:
  "e.g", "F.A.C.S" etc.;

– context menu: add optional menu items to the context menu
  of the abbreviations to put the word with the terminating
  dot into the custom dictionaries, e.g. for the word "Corp.":

  * standard.dic (Corp)
  * standard.dic (Corp.)

  as menu items of the the Add to Dictionary submenu.
Comment 8 László Németh 2025-12-28 23:18:53 UTC
(In reply to Justin L from comment #5)
> Clearly NOTABUG.
> 
> Your mind is too much focused on abbreviations.  Try this line:
>     Spell check uses red colooour.
> 
> Notice that the "red string" includes the trailing fullstop.  Clearly we
> would not want to include this fullstop in a custom dictionary if this word
> was added.

I agree, that we need to handle this carefully. Most of the words with terminating dot are last word of the sentences with the terminating period, so it's still the best to remove them automatically. The biggest bug was that the custom dictionaries did not support the spell checking of the abbreviations without the mandatory dot. After fixing this, I added only two special exceptions for the default dot stripping: the words with multiple dots in the (faster) spell checking dialog window, and the extra ~"Add with the terminating dot" option in the context menu of the words with terminating dots. Maybe it's worth to add the extra option to the spell checking dialog in the future, too, unifying the context menu and the spell checking dialog window, maybe not. It is much better to add the common abbreviations to the Hunspell dictionaries and to the abbreviation list of the extras/ module to get better sentence breaking in Writer, and to avoid of custom abbreviating.
Comment 9 Commit Notification 2025-12-29 16:25:46 UTC
László Németh committed a patch related to this issue.
It has been pushed to "libreoffice-26-2":

https://git.libreoffice.org/core/commit/54b14742892638e1602bcbe5712a3d48163d4c9e

tdf#130695 sw linguistic: fix custom abbreviations

It will be available in 26.2.0.2.

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.
Comment 10 László Németh 2025-12-31 03:56:17 UTC
Created attachment 204872 [details]
screenshot of the extended context menu of the bad words with a dot