Due to the lack of deinflection support in StarDict, users might want to
be able to create a list of possible deinflections and search each one
to see if there is a dictionary entry for that deinflection.
Being able to do this in one sdcv invocation is far more preferable to
calling sdcv once for each candidate due to the performance cost of
doing so. The most obvious language that would benefit from this is
Japanese, but I'm sure other folks would prefer this.
In order to make this use-case better supported -- try to look up every
word in the provided list of words before existing with an error if any
one of the words failed to be looked up.
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
the previous approachonly works as long as locales are actually sane
(i.e., the test only passes if you *actually* have the ru_RU.KOI8-R
locale built, which the CI doesn't).
sdcv uses g_get_home_dir function to find home directory. That function uses passwd entry and this in turn breaks expectations of users and automatic tests inside sandbox where access behind some directory is not allowed (and thus tests are not allowed to write into /root/.stardict/dic...) The patch in attachment fixes this basically by using code from gnome manual:
http://library.gnome.org/devel/glib/stable/glib-Miscellaneous-Utility-Functions.html#g-get-home-dir
const char *homedir = g_getenv ("HOME");
if (!homedir)
homedir = g_get_home_dir ();