X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=plugins%2Fsquirrelspell%2Fmodules%2Fcheck_me.mod;h=d5991fdf83ea7ae43e94fcd5fe4dd04589becd36;hp=f47dfd9e89dfc7c01e0610bb360e4e99429c7f83;hb=d112ed5aeee62953707e7042a1edc8e8c2b6a968;hpb=0397590e2d0620ad93ae22d2c8d33fe1283068f6 diff --git a/plugins/squirrelspell/modules/check_me.mod b/plugins/squirrelspell/modules/check_me.mod index f47dfd9e..d5991fdf 100644 --- a/plugins/squirrelspell/modules/check_me.mod +++ b/plugins/squirrelspell/modules/check_me.mod @@ -1,288 +1,423 @@ $ln". - ''; +/** + * check_me.mod + * ------------- + * Squirrelspell module. + * + * Copyright (c) 1999-2002 The SquirrelMail development team + * Licensed under the GNU GPL. For full terms see the file COPYING. + * + * This module is the main workhorse of SquirrelSpell. It submits + * the message to the spell-checker, parses the output, and loads + * the interface window. + * + * $Id$ + * + * @author Konstantin Riabitsev ($Author$) + * @version $Date$ + */ +/** + * This function makes a javascript-powered link. Not sure why + * Philippe decided to move it outside the main code, but hey. ;) + * I bet for the i18n reasons. + * + * @param $jscode Javascript code to include in the link. + * @param $title A little pop-up title to provide for the links. + * @param $link The content of the link. + * @return void, since this just draws the content. + */ +function SpellLink($jscode, $title, $link) { + echo "$ln" + . ''; } -// Declaring globals for E_ALL. +/** + * Declaring globals for users with E_ALL set. + */ global $sqspell_text, $SQSPELL_APP, $sqspell_use_app, $attachment_dir, - $username, $SQSPELL_EREG, $color; + $username, $SQSPELL_EREG, $color; - // Now we explode the lines for three reasons: - // 1) So we can ignore lines starting with ">" (reply's) - // 2) So we can stop processing when we get to "--" on a single line, - // which means that the signature is starting - // 3) So we can add an extra space at the beginning of each line. This way - // ispell/aspell don't treat these as command characters. - $sqspell_raw_lines = explode("\n", $sqspell_text); - for ($i=0; $i" (reply's) + * 2) So we can stop processing when we get to "--" on a single line, + * which means that the signature is starting + * 3) So we can add an extra space at the beginning of each line. This way + * ispell/aspell don't treat these as command characters. + */ +$sqspell_raw_lines = explode("\n", $sqspell_text); +for ($i=0; $i\n". - "\n". - '' . _("SquirrelSpell Results") . ''; - if ($theme_css != '') { - echo "\n"; - } - // Load the spelling errors into JavaScript arrays - echo "\n". - "\n". - "\n"; + /** + * Add some strings so they can be i18n'd. + */ + echo "var ui_completed = \"" . _("Spellcheck completed. Commit changes?") + . "\";\n"; + echo "var ui_nochange = \"" . _("No changes were made.") . "\";\n"; + echo "var ui_wait = \"" + . _("Now saving your personal dictionary... Please wait.") + . "\";\n"; + - echo "\n". - ''. - " - -
"; - printf( _("Found %s errors"), $errors ); -?>

-
- - - - - - - - - - - - - - - - - - - - - - - + + +
-"; - echo $sptag . _("Line with an error:") . ''; -?> -
- -
-'; -?> - - - -'; -?> - - -
-'; -?> - - - -'; -?> - - -

- -"; - - SpellLink( 'sqspellChange()', - _("Change this word"), - _("Change") ); - SpellLink( 'sqspellChangeAll()', - _("Change ALL occurances of this word"), - _("Change All") ); - SpellLink( 'sqspellIgnore()', - _("Ignore this word"), - _("Ignore") ); - SpellLink( 'sqspellIgnoreAll()', - _("Ignore ALL occurances this word"), - _("Ignore All") ); - SpellLink( 'sqspellRemember()', - _("Add this word to your personal dictionary"), - _("Add to Dic") ); -?> + /** + * Did I mention that I hate dots on the end of contcatenated lines? + * Dots at the beginning make so much more sense! + */ + echo "//-->\n" + . "\n" + . "\n" + . "\n"; + + echo "\n"; + ?> +
+ + + + + + + + - - - -" . - ''. - ' '; -?> - - -
+ + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ "; + echo $sptag . _("Line with an error:") . ''; + ?> +
+ +
+ '; + ?> + + + + '; + ?> + + +
+ '; + ?> + + + + '; + ?> + + +

+ + + + +
+

+ ' + . ' '; + ?> +
-

- -
- - +
"; - sqspell_makeWindow(null, _("No errors found"), null, $msg); - } +} else { + /** + * AREN'T YOU SUCH A KNOW-IT-ALL! + */ + $msg="
" + . "
"; + sqspell_makeWindow(null, _("No errors found"), null, $msg); +} + +/** + * For Emacs weenies: + * Local variables: + * mode: php + * End: + */ ?>