From ea5260243f2769243166232a615e071025e6d4d7 Mon Sep 17 00:00:00 2001 From: tokul Date: Sat, 27 Dec 2003 12:06:26 +0000 Subject: [PATCH] translation engine updates. Disabled non functional "when composing" prefs git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@6331 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- plugins/translate/README | 1 + plugins/translate/options.php | 28 +- plugins/translate/setup.php | 687 +++++++++++++++------------------- 3 files changed, 326 insertions(+), 390 deletions(-) diff --git a/plugins/translate/README b/plugins/translate/README index 2654ecf2..0fc6e7c7 100644 --- a/plugins/translate/README +++ b/plugins/translate/README @@ -45,6 +45,7 @@ InterTran = tranexp.com GPLTrans = www.translator.cx OteNet = systran.otenet.gr Promt = www.translate.ru +Google Translate = www.google.com/translate Installation ============ diff --git a/plugins/translate/options.php b/plugins/translate/options.php index 72503ec4..1f4add85 100644 --- a/plugins/translate/options.php +++ b/plugins/translate/options.php @@ -111,34 +111,34 @@ require_once(SM_PATH . 'include/load_prefs.php'); ".sprintf(_("Number of supported language pairs: %s"),"19")." " , + "
".sprintf(_("Number of supported language pairs: %s"),"19")." " , 'http://babelfish.altavista.com/' ); // ShowTrad( 'Translator.Go.com', // _("10 language pairs, maximum of 25 kilobytes translated, powered by Systran"), // 'http://translator.go.com/' ); ShowTrad( 'Dictionary.com', _("No known limits, powered by Systran"). - "
".sprintf(_("Number of supported language pairs: %s"),"12")." " , + "
".sprintf(_("Number of supported language pairs: %s"),"24")." " , 'http://www.dictionary.com/translate' ); ShowTrad( 'Google Translate', _("No known limits, powered by Systran"). - "
".sprintf(_("Number of supported language pairs: %s"),"12")." " , + "
".sprintf(_("Number of supported language pairs: %s"),"12")." " , 'http://www.google.com/translate' ); ShowTrad( 'GPLTrans', _("No known limits, powered by GPLTrans (free, open source)"). - "
".sprintf(_("Number of supported language pairs: %s"),"8")." " , + "
".sprintf(_("Number of supported language pairs: %s"),"16")." " , 'http://www.translator.cx/' ); ShowTrad( 'InterTran', _("No known limits, powered by Translation Experts's InterTran"). - "
".sprintf(_("Number of supported languages: %s"),"28")." " , + "
".sprintf(_("Number of supported languages: %s"),"29")." " , 'http://www.tranexp.com/' ); ShowTrad( 'OTEnet', _("Hellenic translations, no known limits, powered by Systran"). - "
".sprintf(_("Number of supported language pairs: %s"),"20")." " , + "
".sprintf(_("Number of supported language pairs: %s"),"20")." " , 'http://systran.otenet.gr/' ); ShowTrad( 'PROMT', _("Russian translations, maximum of 500 characters translated"). - "
".sprintf(_("Number of supported language pairs: %s"),"12")." " , + "
".sprintf(_("Number of supported language pairs: %s"),"13")." " , 'http://www.translate.ru/' ); ?> @@ -176,14 +176,18 @@ require_once(SM_PATH . 'include/load_prefs.php'); if ($translate_same_window) echo " CHECKED"; echo '> - ' . _("Translate inside the SquirrelMail frames"). - ''. - ''.html_tag('td',_("When composing:"),'right','','nowrap'). + "\n"; + +$disable_compose_translate=true; +if (!$disable_compose_translate) { + echo ''.html_tag('td',_("When composing:"),'right','','nowrap'). ' - ' . _("Not yet functional, currently does nothing") . - ''. - ''. + "\n"; +} + echo ''. ''. ''. ''. diff --git a/plugins/translate/setup.php b/plugins/translate/setup.php index ccabd482..53308984 100644 --- a/plugins/translate/setup.php +++ b/plugins/translate/setup.php @@ -1,5 +1,4 @@ @@ -106,7 +96,10 @@ function translate_table_end() { @@ -244,133 +258,80 @@ function translate_form_babelfish($message) { '; translate_table_end(); } +/** + * go.com translation engine (disabled) + * + * @param string $message text that has to be translated + */ function translate_form_go($message) { translate_new_form('http://translator.go.com/cb/trans_entry'); ?> ". 'Go.com: '; @@ -378,6 +339,11 @@ function translate_form_go($message) { translate_table_end(); } +/** + * intertran translation engine + * + * @param string $message text that has to be translated + */ function translate_form_intertran($message) { translate_new_form('http://www.tranexp.com:2000/InterTran'); echo ''. @@ -386,64 +352,66 @@ function translate_form_intertran($message) { $left = ''; $right = ''; printf( _("%s to %s"), $left, $right ); echo 'InterTran: '; @@ -451,17 +419,22 @@ function translate_form_intertran($message) { translate_table_end(); } +/** + * gpltrans translation engine + * + * @param string $message text that has to be translated + */ function translate_form_gpltrans($message) { translate_new_form('http://www.translator.cx/cgi-bin/gplTrans'); echo ''; echo '". - "". + echo "". + "". ''. 'Dictionary.com: '; translate_table_end(); } +/** + * otenet translation engine + * + * @param string $message text that has to be translated + */ function translate_form_otenet($message) { translate_new_form('http://systran.otenet.gr/cgi-bin/systran.cgi'); ?> @@ -540,93 +523,58 @@ function translate_form_otenet($message) { '; translate_table_end(); } +/** + * promt translation engine + * + * @param string $message text that has to be translated + */ function translate_form_promt($message) { translate_new_form('http://www.translate.ru/text.asp#tr_form'); echo ''; @@ -641,54 +589,32 @@ function translate_form_promt($message) { echo "
\n"; echo _("Translation direction")." : "; echo '
\n"; echo "\n"; echo 'PROMT: '; @@ -696,6 +622,11 @@ function translate_form_promt($message) { translate_table_end(); } +/** + * google translation engine + * + * @param string $message text that has to be translated + */ function translate_form_google($message) { translate_new_form('http://www.google.com/translate_t'); ?> -- 2.25.1