summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2009-05-01 15:57:33 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2009-05-01 15:57:33 +0000
commit1b63545c64026716086f0302c5e81685e9ae101f (patch)
tree106b9955bab8f78cf9a873af0a1a2dd70063dcf3
parent105e9ba3d660fcfc1c40b338e06343d021f2fad4 (diff)
Applied patch for pspell language configuration (#1485822)
git-svn-id: https://svn.roundcube.net/trunk@2437 208e9e7b-5314-0410-a742-e7e81cd9613c
-rw-r--r--roundcubemail/config/main.inc.php.dist3
-rw-r--r--roundcubemail/installer/rcube_install.php8
2 files changed, 6 insertions, 5 deletions
diff --git a/roundcubemail/config/main.inc.php.dist b/roundcubemail/config/main.inc.php.dist
index 8bb68cb9c..e890ef3ba 100644
--- a/roundcubemail/config/main.inc.php.dist
+++ b/roundcubemail/config/main.inc.php.dist
@@ -219,8 +219,7 @@ $rcmail_config['spellcheck_uri'] = '';
// These languages can be selected for spell checking.
// Configure as a PHP style hash array: array('en'=>'English', 'de'=>'Deutsch');
-// Leave empty for default set of Google spell check languages, should be defined
-// when using local Pspell extension
+// Leave empty for default set of available language.
$rcmail_config['spellcheck_languages'] = NULL;
// path to a text file which will be added to each sent message
diff --git a/roundcubemail/installer/rcube_install.php b/roundcubemail/installer/rcube_install.php
index b2b8257f7..14fe5ee47 100644
--- a/roundcubemail/installer/rcube_install.php
+++ b/roundcubemail/installer/rcube_install.php
@@ -244,9 +244,11 @@ class rcube_install
$out['dependencies'][] = array('prop' => 'spellcheck_engine',
'explain' => 'This requires the <tt>pspell</tt> extension which could not be loaded.');
}
- if (empty($this->config['spellcheck_languages'])) {
- $out['dependencies'][] = array('prop' => 'spellcheck_languages',
- 'explain' => 'You should specify the list of languages supported by your local pspell installation.');
+ if (!empty($this->config['spellcheck_languages'])) {
+ foreach ($this->config['spellcheck_languages'] as $lang => $descr)
+ if (!pspell_new($lang))
+ $out['dependencies'][] = array('prop' => 'spellcheck_languages',
+ 'explain' => "You are missing pspell support for language $lang ($descr)");
}
}