Bug 163570 - Inconsistent dictionary name when using '_' in the name (gtk3)
Summary: Inconsistent dictionary name when using '_' in the name (gtk3)
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
6.3.0.4 release
Hardware: All Linux (All)
: medium trivial
Assignee: Caolán McNamara
URL:
Whiteboard: target:25.8.0 target:25.2.2
Keywords: bibisected, bisected, regression
Depends on:
Blocks: GTK3
  Show dependency treegraph
 
Reported: 2024-10-22 13:06 UTC by Jack
Modified: 2025-03-06 13:39 UTC (History)
3 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 Jack 2024-10-22 13:06:07 UTC
Description:
After adding a new user dictionary with any _ character in it, some places remove the _ value while other places keep it. ('testbook.dic' vs 'test_book.dic')
I believe it should be consistent and 'test_book.dic' to keep in line with maintaining other characters like space and non-alphabetic characters.

Please note I don't know every place the dictionary book is displayed so this inconsistency could be in more components than listed here.


Steps to Reproduce:
Steps to reproduce:
1. Write some incorrectly spelt words to your document, just one should suffice.

2. Add a new empty user dictionary for example 'test_book'.

3. In the tools -> spelling -> add to dictionary dropdown note you will see 'testbook.dic' and not 'test_book.dic'

4. For comparison go back to main document and right click red underlined word and in the add to dictionary dropdown there you will see 'test_book.dic'.

Actual Results:
'testbook.dic' displayed in spelling window.

Expected Results:
'test_book.dic' displayed in spelling window dropdown to match right click on word dropdown


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Tested in LO 25.2.0.0-ALPHA (master at time of writing 22/10/24 14:00+UTC0)
   and in LO 7.4.7.2
Debian 12 AMD64


I do apologise if this bug report is incorrect in any way, this is my first after setting up the workflow to contribute locally.

If anyone is able to give up some time, I would actually love to use this as a bit of experience in contributing to this project!
And hopefully won't be big task to accomplish.
Comment 1 Jack 2024-10-22 20:20:25 UTC
Note, I traced it in the source code and the dictionaries are added to the UI list correctly (cui/source/dialogs/SpellDialog.cxx#817) eg 'test_book.dic' so I assume this is a rendering issue?
Comment 2 Buovjaga 2025-03-04 15:31:35 UTC
Only seen with gtk3.

Bibisected with linux-64-6.3 to 243b5b392906042ab03800e0b5765e6f3513372c
weld SpellDialog
Comment 3 Caolán McNamara 2025-03-04 17:40:01 UTC
https://gerrit.libreoffice.org/c/core/+/182497 should solve it
Comment 4 Commit Notification 2025-03-05 08:29:12 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/7ead9ac54676ed62530d1f9181a1a9227d18e6dd

Resolves: tdf#163570 escape dictionary name for ui

It will be available in 25.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 5 Buovjaga 2025-03-05 08:48:43 UTC
Verified, thanks

Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 7ead9ac54676ed62530d1f9181a1a9227d18e6dd
CPU threads: 8; OS: Linux 6.13; UI render: default; VCL: gtk3
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: CL threaded
Comment 6 Commit Notification 2025-03-06 13:39:33 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-25-2":

https://git.libreoffice.org/core/commit/67006b63e827a05106b1da98c9e710070b0eae5c

Resolves: tdf#163570 escape dictionary name for ui

It will be available in 25.2.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.