Bug 502035 - With en_GB as the selected language, 'add to dictionary' with hunspell backend adds the word to en_AG as well
Summary: With en_GB as the selected language, 'add to dictionary' with hunspell backen...
Status: REPORTED
Alias: None
Product: frameworks-sonnet
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 6.12.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Martin Sandsmark
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-26 16:49 UTC by Kishore Gopalakrishnan
Modified: 2025-03-26 16:49 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kishore Gopalakrishnan 2025-03-26 16:49:33 UTC
SUMMARY
With British English selected and the hunspell backend used, selecting 'add to dictionary' on an unknown word in Kate adds the word to both ~/.hunspell_en_AG and ~/.hunspell_en_GB

STEPS TO REPRODUCE
1. Make sure aspell support for English is not installed (on Arch, uninstall the aspell-en package)
2. Install the British English language pack for hunspell (on Arch, install the hunspell-en_gb package)
3. In 'System Settings > Spell check', set default language to 'British English'
4. Open a new document in Kate and type a nonsense word like asdfasdfasdfadsf
5. If the word is not underlined as misspelled, press Ctrl+Shift+O to enable spell-checking
6. Right-click on the misspelled word and go to 'Spelling > Add to Dictionary'
7. Check the content of ~/.hunspell_en_AG and ~/.hunspell_en_GB

OBSERVED RESULT
The newly added word has been added for both en_AG and en_GB

EXPECTED RESULT
Should only be added to the dictionary for the enabled language variant, en_GB

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.3.3
KDE Frameworks Version: 6.12.0
Qt Version: 6.8.2

ADDITIONAL INFORMATION
I have the same issue on another system with en_IN as the selected language.