Bug 361409

Summary: Support: XDG Base Directory Specification
Product: [Frameworks and Libraries] frameworks-sonnet Reporter: Silvio Frischknecht <silvio.frischi>
Component: generalAssignee: Martin Sandsmark <martin.sandsmark>
Status: RESOLVED FIXED    
Severity: normal CC: kdelibs-bugs
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: suggested patch to search using QStandardPath

Description Silvio Frischknecht 2016-04-05 10:31:38 UTC
Please support "XDG Base Directory Specification" for finding hunspell/myspell directories.
https://specifications.freedesktop.org/basedir-spec/basedir-spec-0.6.html

Look for them in
$XDG_DATA_HOME/myspell/dicts (fallback: ~/.local/share/myspell/dicts)
$XDG_DATA_DIRS/myspell/dicts

or alternatively
$XDG_DATA_HOME/hunspell (fallback: ~/.local/share/hunspell)
$XDG_DATA_DIRS/hunspell

Enchant supports this. Firefox seems to find them there too.

Reproducible: Always
Comment 1 Silvio Frischknecht 2016-06-21 21:13:50 UTC
Created attachment 99652 [details]
suggested patch to search using QStandardPath
Comment 2 Martin Sandsmark 2016-07-09 20:45:22 UTC
Git commit 2aa37a787482a373e363823e8ea13f2863ce249d by Martin T. H. Sandsmark.
Committed on 09/07/2016 at 20:45.
Pushed by sandsmark into branch 'master'.

hunspell: Clean up code for searching for dictionaries, add XDG dirs

Part of patch from Silvio Frischknecht.

M  +31   -27   src/plugins/hunspell/hunspellclient.cpp
M  +4    -0    src/plugins/hunspell/hunspellclient.h
M  +14   -32   src/plugins/hunspell/hunspelldict.cpp
M  +1    -1    src/plugins/hunspell/hunspelldict.h

http://commits.kde.org/sonnet/2aa37a787482a373e363823e8ea13f2863ce249d