From 2b5a715784c5414a95c4eba8b20e3dd47f45131b Mon Sep 17 00:00:00 2001
From: philippe_mingo
Your personal dictionary was erased. Please close this window and - click \"Check Spelling\" button again to start your spellcheck over.
- "; - sqspell_makeWindow(null, "Dictionary Erased", null, $msg); - } - exit; - } - if ($old_key){ - // User provided another key to try and decrypt the dictionary. - // call sqspell_getWords. If this key fails, the function will - // handle it. - $words=sqspell_getWords(); - // It worked! Pinky, you're a genius! - // Write it back this time encrypted with a new key. - sqspell_writeWords($words); - // See where we are and call a necessary GUI-wrapper. - if (strstr($SCRIPT_NAME, "sqspell_options")){ - $msg="Your personal dictionary was re-encrypted successfully. Now - return to the "SpellChecker options" menu and make your selection - again.
"; - sqspell_makePage("Successful Re-encryption", null, $msg); - } else { - $msg = "Your personal dictionary was re-encrypted successfully. Please - close this window and click \"Check Spelling\" button again to start your - spellcheck over.
- "; - sqspell_makeWindow(null, "Dictionary re-encrypted", null, $msg); - } - exit; - } -?> + /** + ** CRYPTO_BADKEY.MOD.PHP -- Squirrelspell module + ** + ** Copyright (c) 1999-2001 The SquirrelMail development team + ** Licensed under the GNU GPL. For full terms see the file COPYING. + ** + ** This module tries to decrypt the user dictionary with a newly provided + ** old password, or erases the file if everything else fails. :( + ** + ** $Id$ + **/ + + // Just for fidian! :) + global $delete_words, $SCRIPT_NAME, $old_key; + if ($delete_words=='ON'){ + // All attemts to decrypt the file were futile. Erase the bastard and + // hope this never happens again. + sqspell_deleteWords(); + // See where we were called from -- pop-up window or options page + // and call whichever wrapper is appropriate. + if (strstr($SCRIPT_NAME, 'sqspell_options')){ + $msg='' . _("Your personal dictionary was erased.") . '
'; + sqspell_makePage(_("Dictionary Erased"), null, $msg); + } else { + $msg = '' . ("Your personal dictionary was erased. Please close this window and click \"Check Spelling\" button again to start your spellcheck over." ) . + '
'. + ''; + sqspell_makeWindow(null, _("Dictionary Erased"), null, $msg); + } + exit; + } + + if ($old_key){ + // User provided another key to try and decrypt the dictionary. + // call sqspell_getWords. If this key fails, the function will + // handle it. + $words=sqspell_getWords(); + // It worked! Pinky, you're a genius! + // Write it back this time encrypted with a new key. + sqspell_writeWords($words); + // See where we are and call a necessary GUI-wrapper. + if (strstr($SCRIPT_NAME, 'sqspell_options')){ + $msg = '' . + _("Your personal dictionary was re-encrypted successfully. Now " + "return to the "SpellChecker options" menu and make your selection " + "again." ) . '
'; + sqspell_makePage(_("Successful Re-encryption"), null, $msg); + } else { + $msg = ''. + _("Your personal dictionary was re-encrypted successfully. Please " + "close this window and click \"Check Spelling\" button again to start your " + "spellcheck over.") . '
' . + ''; + sqspell_makeWindow(null, _("Dictionary re-encrypted"), null, $msg); + } + exit; + } + +?> \ No newline at end of file diff --git a/plugins/squirrelspell/modules/edit_dic.mod.php b/plugins/squirrelspell/modules/edit_dic.mod.php index 2bb16ff6..f430e674 100644 --- a/plugins/squirrelspell/modules/edit_dic.mod.php +++ b/plugins/squirrelspell/modules/edit_dic.mod.php @@ -1,57 +1,68 @@ No words in your personal dictionary."); - } else { - // We're loaded with booty. - $pre_msg = "Please check any words you wish to delete from your dictionary.
\n"; - $pre_msg .= "$langs[$i] dictionary | -
---|
- |
ATTENTION: If you forget your password, your personal dictionary - will become unaccessible, since it can no longer be decrypted. - If you change your mailbox password, SquirrelSpell will recognize it and prompt you for - your old password in order to re-encrypt the dictionary with a new key.
-Please decrypt my personal - dictionary and store it in a clear-text format.
- -Your personal dictionary is currently not encrypted. - You may wish to encrypt your personal dictionary to protect your privacy in case - the webmail system gets compromized and your personal dictionary file gets stolen. - When encrypted, the file's contents look garbled and are hard to decrypt without - knowing the correct key (which is your mailbox password).
- ATTENTION: If you decide to encrypt your personal dictionary, - you must remember that it gets "hashed" with your mailbox password. If - you forget your mailbox password and the administrator changes it to a new value, - your personal dictionary will become useless and will have to be created anew. - However, if you or your system administrator change your mailbox password but you - still have the old password at hand, you will be able to enter the old key to - re-encrypt the dictionary with the new value. -Please encrypt my personal - dictionary and store it in an encrypted format.
- -Your personal dictionary is currently encrypted. This " + "helps protect your privacy in case the web-mail system gets compromized and your " + "personal dictionary ends up stolen. It is currently encrypted with the password " + "you use to access your mailbox, making it hard for anyone to see what is stored " + "in your personal dictionary.
" + "ATTENTION: If you forget your password, your personal dictionary " + "will become unaccessible, since it can no longer be decrypted. " + "If you change your mailbox password, SquirrelSpell will recognize it and prompt you for " + "your old password in order to re-encrypt the dictionary with a new key.
") . + ''. + _("Please decrypt my personal dictionary and store it in a clear-text format." ) . + '
'. + ''. + 'Your personal dictionary is currently not encrypted. " + "You may wish to encrypt your personal dictionary to protect your privacy in case " + "the webmail system gets compromized and your personal dictionary file gets stolen. " + "When encrypted, the file's contents look garbled and are hard to decrypt without " + "knowing the correct key (which is your mailbox password).
" + "ATTENTION: If you decide to encrypt your personal dictionary, " + "you must remember that it gets "hashed" with your mailbox password. If " + "you forget your mailbox password and the administrator changes it to a new value, " + "your personal dictionary will become useless and will have to be created anew. " + "However, if you or your system administrator change your mailbox password but you " + "still have the old password at hand, you will be able to enter the old key to " + "re-encrypt the dictionary with the new value."). + ''. + _("Please encrypt my personal dictionary and store it in an encrypted format.") . + '
'. + ''. + ''. + sprintf( _("Deleting the following entries from %s dictionary:", $sqspell_use_app ) . + '
'. + "' . _("No changes requested.") . '
'); + } + +?> \ No newline at end of file diff --git a/plugins/squirrelspell/modules/forget_me_not.mod.php b/plugins/squirrelspell/modules/forget_me_not.mod.php index f52a867f..b021b2d3 100644 --- a/plugins/squirrelspell/modules/forget_me_not.mod.php +++ b/plugins/squirrelspell/modules/forget_me_not.mod.php @@ -1,43 +1,53 @@ "; - sqspell_makeWindow($onload, _("Personal Dictionary Updated"), null, $msg); -?> + /** + ** FORGET_ME_NOT.MOD.PHP -- Squirrelspell module + ** + ** Copyright (c) 1999-2001 The SquirrelMail development team + ** Licensed under the GNU GPL. For full terms see the file COPYING. + ** + ** This module saves the added words into the user dictionary. Called + ** after CHECK_ME module. + ** + ** $Id$ + **/ + + // For our friends with E_ALL. + global $words, $SQSPELL_VERSION, $SQSPELL_APP_DEFFAULT, $sqspell_use_app; + + $new_words = ereg_replace("%", "\n", $words); + + // Load the user dictionary. + $words=sqspell_getWords(); + + if (!$words){ + // First time. + $words_dic="# SquirrelSpell User Dictionary $SQSPELL_VERSION\n# Last Revision: " . date("Y-m-d") . "\n# LANG: $SQSPELL_APP_DEFAULT\n# $SQSPELL_APP_DEFAULT\n"; + $words_dic .= $new_words . "# End\n"; + } else { + // Do some fancy stuff in order to save the dictionary and not mangle the + // rest. + $langs=sqspell_getSettings($words); + $words_dic = "# SquirrelSpell User Dictionary $SQSPELL_VERSION\n# Last Revision: " . date("Y-m-d") . "\n# LANG: " . join(", ", $langs) . "\n"; + for ($i=0; $i"; - if (sizeof($langs)==1){ - // only one dictionary defined by the users. Submit the form - // automatically. - $onload="sqspell_init(true)"; - $msg .= _("Please wait, communicating with the server...") . - '
'. - ""; - } else { - // more than one dictionary. Let the user choose the dictionary first - // then manually submit the form. - $onload="sqspell_init(false)"; - $msg .= _("Please choose which dictionary you would like to use to spellcheck this message:"). - '' . - '
- "; - } - $msg .="\n"; - sqspell_makeWindow($onload, _("SquirrelSpell Initiating"), "init.js", $msg); -?> + // See if we need to give user the option of choosing which dictionary + // he wants to use to spellcheck his message. + $langs=sqspell_getSettings(null); + $msg = ''; + if (sizeof($langs)==1){ + // only one dictionary defined by the users. Submit the form + // automatically. + $onload="sqspell_init(true)"; + $msg .= _("Please wait, communicating with the server...") . + '
'. + ""; + } else { + // more than one dictionary. Let the user choose the dictionary first + // then manually submit the form. + $onload="sqspell_init(false)"; + $msg .= _("Please choose which dictionary you would like to use to spellcheck this message:"). + '' . + ''. + ''. + '
'; + } + $msg .="'. + sprintf( _("Settings adjusted to: %s with %s as default dictionary."), $dsp_string, _($lang_default) ) . + '
'; } else { - // Yes, he is dumb. - $lang_string = join(", ", $use_langs); + // No dictionaries selected. Use system default. + $msg = ''. + sprintf( _("Using %s dictionary (system default) for spellcheck." ), $SQSPELL_APP_DEFAULT ) . + '
'; + $lang_string = $SQSPELL_APP_DEFAULT; } - } else { - // No need to juggle the order -- preferred is already first. - $lang_string = join(", ", $use_langs); - } - } else { - // Just one dictionary, please. - $lang_string = $use_langs[0]; - } - $msg = "Settings adjusted to: $lang_string with - $lang_default as default dictionary.
"; - } else { - // No dictionaries selected. Use system default. - $msg = "Using $SQSPELL_APP_DEFAULT dictionary (system default) - for spellcheck.
"; - $lang_string = $SQSPELL_APP_DEFAULT; - } - $old_lang_string = join(", ", $langs); - $words = str_replace("# LANG: $old_lang_string", "# LANG: $lang_string", $words); - // write it down where the sun don't shine. - sqspell_writeWords($words); - sqspell_makePage("International Dictionaries Preferences Updated", null, $msg); -?> + $old_lang_string = join(", ", $langs); + $words = str_replace("# LANG: $old_lang_string", "# LANG: $lang_string", $words); + // write it down where the sun don't shine. + sqspell_writeWords($words); + sqspell_makePage(_("International Dictionaries Preferences Updated"), null, $msg); + +?> \ No newline at end of file diff --git a/plugins/squirrelspell/modules/lang_setup.mod.php b/plugins/squirrelspell/modules/lang_setup.mod.php index 634db6e5..0b84bfdf 100644 --- a/plugins/squirrelspell/modules/lang_setup.mod.php +++ b/plugins/squirrelspell/modules/lang_setup.mod.php @@ -1,30 +1,44 @@ '. + _("Please check any available international dictionaries which you would like to use when spellchecking:"). + ''. + '"; + sqspell_makePage(_("Add International Dictionaries"), null, $msg); - $msg = "'; + $langs = sqspell_getSettings(null); + $add = '
'. + _("Make this dictionary my default selection:") . + "
\n" . $add . "\n"; + $msg .= "
Please check any available international dictionaries which you would like - to use when spellchecking:
-"; - sqspell_makePage("Add International Dictionaries", null, $msg); -?> +?> \ No newline at end of file diff --git a/plugins/squirrelspell/modules/options_main.mod.php b/plugins/squirrelspell/modules/options_main.mod.php index 9ad26b04..5e8e8ddf 100644 --- a/plugins/squirrelspell/modules/options_main.mod.php +++ b/plugins/squirrelspell/modules/options_main.mod.php @@ -1,27 +1,45 @@ Please choose which options you wish to set up: -- "; - $langs = sqspell_getSettings(null); - $add = "
Make this dictionary my default selection:
' . + _("Please choose which options you wish to set up:") . + '
'. + ''.
'' . _("ATTENTION:") . '
' .
_("SquirrelSpell was unable to decrypt your personal dictionary. This is most likely due to the fact that you have changed your mailbox password. In order to proceed, you will have to supply your old password so that SquirrelSpell can decrypt your personal dictionary. It will be re-encrypted with your new password after this.
If you haven't encrypted your dictionary, then it got mangled and is no longer valid. You will have to delete it and start anew. This is also true if you don't remember your old password -- without it, the encrypted data is no longer accessible.").
- "
-- -- - " . _("Delete my dictionary and start a new one") . '
-
'. - _("Decrypt my dictionary with my old password:") . "
'. + ''. + ''. + ''; // See if this happened in the pop-up window or when accessing // the SpellChecker options page. global $SCRIPT_NAME; -- 2.25.1'. + ''. + ' ' . + _("Delete my dictionary and start a new one") . '
'. + '
'. + _("Decrypt my dictionary with my old password:") . + '