Bug 361409 - Support: XDG Base Directory Specification
Summary: Support: XDG Base Directory Specification
Status: RESOLVED FIXED
Alias: None
Product: frameworks-sonnet
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Martin Sandsmark
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-05 10:31 UTC by Silvio Frischknecht
Modified: 2016-07-09 20:45 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
suggested patch to search using QStandardPath (2.19 KB, patch)
2016-06-21 21:13 UTC, Silvio Frischknecht
Details

Note You need to log in before you can comment on or make changes to this bug.
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