diff --git a/src/aspell/rclaspell.cpp b/src/aspell/rclaspell.cpp index f5da8aee..1a1f7c1f 100644 --- a/src/aspell/rclaspell.cpp +++ b/src/aspell/rclaspell.cpp @@ -268,6 +268,9 @@ bool Aspell::buildDict(Rcl::Db &db, string &reason) if (!ok()) return false; + string addCreateParam; + m_config->getConfParam("aspellAddCreateParam", addCreateParam); + // We create the dictionary by executing the aspell command: // aspell --lang=[lang] create master [dictApath] string cmdstring(m_data->m_exec); @@ -277,6 +280,10 @@ bool Aspell::buildDict(Rcl::Db &db, string &reason) cmdstring += string(" ") + string("--lang=") + m_lang; args.push_back("--encoding=utf-8"); cmdstring += string(" ") + "--encoding=utf-8"; + if (!addCreateParam.empty()) { + args.push_back(addCreateParam); + cmdstring += string(" ") + addCreateParam; + } args.push_back("create"); cmdstring += string(" ") + "create"; args.push_back("master"); diff --git a/src/sampleconf/recoll.conf.in b/src/sampleconf/recoll.conf.in index ef1d8953..bf0d9bcc 100644 --- a/src/sampleconf/recoll.conf.in +++ b/src/sampleconf/recoll.conf.in @@ -266,11 +266,19 @@ filtermaxmbytes = 2000 # Language definitions to use when creating the aspell dictionary. # The value must match a set of aspell language definition files. -# You can type "aspell config" to see where these are installed. +# You can type "aspell dicts" to see a list # The default if this is not set is to use the NLS environment to guess the # value # aspellLanguage = en +# Somme aspell packages may need an additional option (e.g. on Debian +# Jessie). See Debian bug 772415 +# aspellAddCreateParam = --local-data-dir=/usr/lib/aspell + +# You may also want to set this to have a look at aspell dictionary +# creation errors. But there are always many, so this is mostly for debugging +# aspellKeepStderr = 1 + # Disabling aspell use. The aspell dictionary generation takes some time, # and some combinations of aspell version, language, and local terms, # result in aspell dumping core each time. You can disable the aspell