Allow setting additional aspell param as alternate workaround to Debian #772415
This commit is contained in:
parent
e9e1c6ea6d
commit
d98822856e
2 changed files with 16 additions and 1 deletions
|
@ -268,6 +268,9 @@ bool Aspell::buildDict(Rcl::Db &db, string &reason)
|
||||||
if (!ok())
|
if (!ok())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
string addCreateParam;
|
||||||
|
m_config->getConfParam("aspellAddCreateParam", addCreateParam);
|
||||||
|
|
||||||
// We create the dictionary by executing the aspell command:
|
// We create the dictionary by executing the aspell command:
|
||||||
// aspell --lang=[lang] create master [dictApath]
|
// aspell --lang=[lang] create master [dictApath]
|
||||||
string cmdstring(m_data->m_exec);
|
string cmdstring(m_data->m_exec);
|
||||||
|
@ -277,6 +280,10 @@ bool Aspell::buildDict(Rcl::Db &db, string &reason)
|
||||||
cmdstring += string(" ") + string("--lang=") + m_lang;
|
cmdstring += string(" ") + string("--lang=") + m_lang;
|
||||||
args.push_back("--encoding=utf-8");
|
args.push_back("--encoding=utf-8");
|
||||||
cmdstring += string(" ") + "--encoding=utf-8";
|
cmdstring += string(" ") + "--encoding=utf-8";
|
||||||
|
if (!addCreateParam.empty()) {
|
||||||
|
args.push_back(addCreateParam);
|
||||||
|
cmdstring += string(" ") + addCreateParam;
|
||||||
|
}
|
||||||
args.push_back("create");
|
args.push_back("create");
|
||||||
cmdstring += string(" ") + "create";
|
cmdstring += string(" ") + "create";
|
||||||
args.push_back("master");
|
args.push_back("master");
|
||||||
|
|
|
@ -266,11 +266,19 @@ filtermaxmbytes = 2000
|
||||||
|
|
||||||
# Language definitions to use when creating the aspell dictionary.
|
# Language definitions to use when creating the aspell dictionary.
|
||||||
# The value must match a set of aspell language definition files.
|
# 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
|
# The default if this is not set is to use the NLS environment to guess the
|
||||||
# value
|
# value
|
||||||
# aspellLanguage = en
|
# 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,
|
# Disabling aspell use. The aspell dictionary generation takes some time,
|
||||||
# and some combinations of aspell version, language, and local terms,
|
# and some combinations of aspell version, language, and local terms,
|
||||||
# result in aspell dumping core each time. You can disable the aspell
|
# result in aspell dumping core each time. You can disable the aspell
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue