From 158d478fc402930feda2161a829a7c71ac3b71b8 Mon Sep 17 00:00:00 2001 From: philippe_mingo Date: Sun, 11 Nov 2001 12:34:39 +0000 Subject: [PATCH] Internationalization almost finished. Only check_me.js left. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1724 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- .../squirrelspell/modules/check_me.mod.php | 229 ++++++++++-------- plugins/squirrelspell/modules/init.mod.php | 20 +- plugins/squirrelspell/sqspell_config.php | 2 +- 3 files changed, 141 insertions(+), 110 deletions(-) diff --git a/plugins/squirrelspell/modules/check_me.mod.php b/plugins/squirrelspell/modules/check_me.mod.php index c700240f..1e2945e0 100644 --- a/plugins/squirrelspell/modules/check_me.mod.php +++ b/plugins/squirrelspell/modules/check_me.mod.php @@ -12,9 +12,17 @@ ** $Id$ **/ +function SpellLink( $cod, $tit, $ln ) { + + echo "$ln". + ''; + +} + // Declaring globals for E_ALL. 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) @@ -24,10 +32,10 @@ global $sqspell_text, $SQSPELL_APP, $sqspell_use_app, $attachment_dir, // ispell/aspell don't treat these as command characters. $sqspell_raw_lines = explode("\n", $sqspell_text); for ($i=0; $i - - - SquirrelSpell Results - - - - ', $color[4], $color[8], $color[7], $color[7], $color[7]); - ?> - - + } + // Why isn't there a booger fairy? + echo "//-->\n". + "\n". + "\n". + "\n"; + + echo "\n". + '
Found errors
'. + "
"; + printf( _("Found %s errors"), $errors ); +?>

@@ -167,40 +178,53 @@ global $sqspell_text, $SQSPELL_APP, $sqspell_use_app, $attachment_dir, @@ -208,36 +232,45 @@ global $sqspell_text, $SQSPELL_APP, $sqspell_use_app, $attachment_dir, -
- ' . _("Line with an error:"); ?>
+"; + echo $sptag . _("Line with an error:") . ''; +?> +
- Error: +'; +?> - Suggestions: +'; +?>
- Change to: +'; +?> - Occurs times: +'; +?> - +
- - - - - - +"; + + 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") ); +?>
- Change - - Change All - - Ignore - - Ignore All - - Add to Dic -

- - +" . + ''. + ' '; +?>
@@ -249,7 +282,7 @@ global $sqspell_text, $SQSPELL_APP, $sqspell_use_app, $attachment_dir,
"; - sqspell_makeWindow(null, "No errors found", null, $msg); + $msg="
"; + sqspell_makeWindow(null, _("No errors found"), null, $msg); } ?> diff --git a/plugins/squirrelspell/modules/init.mod.php b/plugins/squirrelspell/modules/init.mod.php index ade9c788..79dc574b 100644 --- a/plugins/squirrelspell/modules/init.mod.php +++ b/plugins/squirrelspell/modules/init.mod.php @@ -16,29 +16,27 @@ // only one dictionary defined by the users. Submit the form // automatically. $onload="sqspell_init(true)"; - $msg .= "Please wait, communicating with the server...

- - "; + $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:

-

- '; for ($i=0; $i

"; } $msg .="\n"; - sqspell_makeWindow($onload, "SquirrelSpell Initiating", "init.js", $msg); -?> + sqspell_makeWindow($onload, _("SquirrelSpell Initiating"), "init.js", $msg); +?> diff --git a/plugins/squirrelspell/sqspell_config.php b/plugins/squirrelspell/sqspell_config.php index a34a856f..f6e023c6 100644 --- a/plugins/squirrelspell/sqspell_config.php +++ b/plugins/squirrelspell/sqspell_config.php @@ -15,7 +15,7 @@ global $username, $data_dir; - $SQSPELL_APP = array( 'English' => 'ispell -a' ); + $SQSPELL_APP = array( 'English' => 'ispell -d spanish -a' ); $SQSPELL_APP_DEFAULT = 'English'; $SQSPELL_WORDS_FILE = "$data_dir/$username.words"; $SQSPELL_EREG = 'ereg'; -- 2.25.1