From 11475a41cd265d603fcc74af73195c2d175a06f7 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Tue, 2 Aug 2011 11:39:59 +0000 Subject: [PATCH] * admin: allow to choose which kind of spellchecking you would like to employ when using the CK Editor (Options now: Yes, No, Without SpellCheckAsYouType, WebSpellChecker) --- admin/lang/egw_de.lang | 2 ++ admin/lang/egw_en.lang | 2 ++ admin/templates/default/config.tpl | 2 ++ phpgwapi/inc/class.egw_ckeditor_config.inc.php | 12 +++++++++--- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/admin/lang/egw_de.lang b/admin/lang/egw_de.lang index 07af193536..5669b3a19c 100644 --- a/admin/lang/egw_de.lang +++ b/admin/lang/egw_de.lang @@ -605,6 +605,8 @@ would you like to show each application's upgrade status ? admin de Soll der Upg wrong account type: %1 is no %2 !!! admin de Falscher Konten Typ: %1 ist kein(e) %2 !!! wrong admin-account or -password !!! admin de Falscher Admin-Account oder Passwort !!! xml-rpc admin de XML-RPC +yes, but no scayt admin de Ja, aber keine automatische Rechtschreibüberprüfung +yes, use webspellchecker admin de Ja, benutze nur den WebSpellChecker (online) you can only change the hash, if you set a random password or currently use plaintext passwords! admin de Sie können die Passwort-Verschlüsselung nur ändern, wenn sie ein zufälliges Passwort setzen oder bisher Passworte im Klartext gespeichert haben! you have entered an invalid expiration date admin de Sie haben ein ungültiges Ablaufdatum angegeben you have no email address for your user set !!! admin de Sie haben noch keine E-Mail für den Benutzer vergeben. diff --git a/admin/lang/egw_en.lang b/admin/lang/egw_en.lang index 323e124067..0a899d9ec7 100644 --- a/admin/lang/egw_en.lang +++ b/admin/lang/egw_en.lang @@ -614,6 +614,8 @@ would you like to show each application's upgrade status ? admin en Show each ap wrong account type: %1 is no %2 !!! admin en Wrong account type: %1 is NO %2 ! wrong admin-account or -password !!! admin en Wrong admin account or password! xml-rpc admin en XML-RPC +yes, but no scayt admin en Yes, but no Spell Check As You Type (online) +yes, use webspellchecker admin en Yes, use online WebSpellChecker you can only change the hash, if you set a random password or currently use plaintext passwords! admin en You can change the hash only, if you set a random password or currently use plaintext passwords! you have entered an invalid expiration date admin en You have entered an invalid expiration date! you have no email address for your user set !!! admin en You have no email address set for your user! diff --git a/admin/templates/default/config.tpl b/admin/templates/default/config.tpl index 9a2185b5ad..5dda16f772 100644 --- a/admin/templates/default/config.tpl +++ b/admin/templates/default/config.tpl @@ -132,6 +132,8 @@ diff --git a/phpgwapi/inc/class.egw_ckeditor_config.inc.php b/phpgwapi/inc/class.egw_ckeditor_config.inc.php index 323ee1a8e6..92c900dd1a 100644 --- a/phpgwapi/inc/class.egw_ckeditor_config.inc.php +++ b/phpgwapi/inc/class.egw_ckeditor_config.inc.php @@ -173,17 +173,23 @@ class egw_ckeditor_config */ private static function add_spellchecker_options(&$config, &$spellchecker_button) { + //error_log(__METHOD__.__LINE__.' Spellcheck:'.$GLOBALS['egw_info']['server']['enabled_spellcheck']); if (isset($GLOBALS['egw_info']['server']['enabled_spellcheck'])) { $spellchecker_button = 'SpellChecker'; if (!empty($GLOBALS['egw_info']['server']['aspell_path']) && - is_executable($GLOBALS['egw_info']['server']['aspell_path'])) + is_executable($GLOBALS['egw_info']['server']['aspell_path']) && + !($GLOBALS['egw_info']['server']['enabled_spellcheck']=='YesUseWebSpellCheck') + ) { $spellchecker_button = 'SpellCheck'; $config['extraPlugins'] = "aspell"; } - $config['scayt_autoStartup'] = true; - $config['scayt_sLang'] = self::get_lang().'_'.self::get_country(); + if (!($GLOBALS['egw_info']['server']['enabled_spellcheck']=='YesNoSCAYT')) + { + $config['scayt_autoStartup'] = true; + $config['scayt_sLang'] = self::get_lang().'_'.self::get_country(); + } } else