From 2ad4cea967df0d35acf226cce6cd74f6ab765bd6 Mon Sep 17 00:00:00 2001
From: jervfors
\n";
- $error .= _("Is PEAR installed, and is the include path set correctly to find DB.php?") . "
\n";
+ $error .= sprintf(_("Is PEAR installed, and is the include path set correctly to find %s?"),
+ 'DB.php') . "
\n";
$error .= _("Please contact your system administrator and report this error.");
error_box($error, $color);
exit;
diff --git a/functions/db_prefs.php b/functions/db_prefs.php
index 12b26d94..065080f3 100644
--- a/functions/db_prefs.php
+++ b/functions/db_prefs.php
@@ -41,7 +41,8 @@ if (!include_once('DB.php')) {
// same error also in abook_database.php
require_once(SM_PATH . 'functions/display_messages.php');
$error = _("Could not include PEAR database functions required for the database backend.") . "
\n";
- $error .= _("Is PEAR installed, and is the include path set correctly to find DB.php?") . "
\n";
+ $error .= sprintf(_("Is PEAR installed, and is the include path set correctly to find %s?"),
+ 'DB.php') . "
\n";
$error .= _("Please contact your system administrator and report this error.");
error_box($error, $color);
exit;
diff --git a/plugins/squirrelspell/modules/crypto.mod b/plugins/squirrelspell/modules/crypto.mod
index f06ab049..c840aa6a 100644
--- a/plugins/squirrelspell/modules/crypto.mod
+++ b/plugins/squirrelspell/modules/crypto.mod
@@ -1,6 +1,6 @@
'
- . _("Your personal dictionary has been encrypted and is now stored in an encrypted format.")
- . '
' - . _("Your personal dictionary has been decrypted and is now stored as clear text.") - . '
'; - break; - - case "": - /** - * Wait, this shouldn't happen! :) - */ - $msg = "No action requested.
"; - break; + case 'encrypt': + /** + * Let's encrypt the file and save it in an encrypted format. + */ + $words=sqspell_getWords(); + /** + * Flip the flag so the sqspell_writeWords function knows to encrypt + * the message before writing it to the disk. + */ + $SQSPELL_CRYPTO=true; + /** + * Call the function that does the actual encryption_decryption. + */ + sqspell_writeWords($words); + $msg='' + . _("Your personal dictionary has been encrypted and is now stored in an encrypted format.") + . '
'; + break; + case 'decrypt': + /** + * Let's decrypt the file and save it as plain text. + */ + $words=sqspell_getWords(); + /** + * Flip the flag and tell the sqspell_writeWords() function that we + * want to save it plaintext. + */ + $SQSPELL_CRYPTO=false; + sqspell_writeWords($words); + $msg='' + . _("Your personal dictionary has been decrypted and is now stored as plain text."), + . '
'; + break; + case '': + /** + * Wait, this shouldn't happen! :) + */ + $msg = 'No action requested.
'; + break; } sqspell_makePage( _("Personal Dictionary Crypto Settings"), null, $msg); diff --git a/plugins/squirrelspell/modules/enc_setup.mod b/plugins/squirrelspell/modules/enc_setup.mod index 0feb3067..9b76cf76 100644 --- a/plugins/squirrelspell/modules/enc_setup.mod +++ b/plugins/squirrelspell/modules/enc_setup.mod @@ -21,15 +21,15 @@ global $SQSPELL_CRYPTO; /** * Set up some i18n'able wrappers for javascript. */ -$msg = ""; +$msg = '"; $words=sqspell_getWords(); /** @@ -38,40 +38,54 @@ $words=sqspell_getWords(); * in plain text. */ if ($SQSPELL_CRYPTO){ - /** - * Current format is encrypted. - * Unfortunately, the following text needs to be all on one line, - * unless someone fixes xgettext. ;( - */ - $msg .= - _("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.
") - . ''; + /** + * Current format is encrypted. + * Unfortunately, the following text needs to be all on one line, + * unless someone fixes xgettext. ;( + */ + $msg .= + '' + . _("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.")
+ . '
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.") - . ''; + /** + * Current format is clear text. + * Unfortunately, the following text needs to be all on one line, + * unless someone fixes xgettext. ;( + */ + $msg .= + '' + . _("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.")
+ . '
' . "\n" . '