X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=plugins%2Ftranslate%2Fsetup.php;h=1aa616afc3c48bbc5d9558cb20d0cd7c68f6e16a;hp=f33cc19755bf0509fdd692fac26703ddbeb14949;hb=d9c1dcccb1fe3a547f92cc48f4b964a580ec35ee;hpb=849bdf42ed7bd7cca68909d2b46869742dfd210e;ds=sidebyside diff --git a/plugins/translate/setup.php b/plugins/translate/setup.php index f33cc197..1aa616af 100644 --- a/plugins/translate/setup.php +++ b/plugins/translate/setup.php @@ -1,5 +1,14 @@ 'Translation Options', +function translate_optpage_register_block() { + global $optpage_blocks; + $optpage_blocks[] = array( + 'name' => _("Translation Options"), 'url' => '../plugins/translate/options.php', - 'desc' => 'Which translator should be used when you get messages in a different language?', + 'desc' => _("Which translator should be used when you get messages in a different language?"), 'js' => false ); } -function translate_sav() { - global $username,$data_dir; - global $submit_translate, $translate_translate_server; - global $translate_translate_location; - global $translate_translate_show_read; - global $translate_translate_show_send; - global $translate_translate_same_window; - - if ($submit_translate) { - if (isset($translate_translate_server)) { - setPref($data_dir, $username, 'translate_server', $translate_translate_server); - } else { - setPref($data_dir, $username, 'translate_server', 'babelfish'); - } - - if (isset($translate_translate_location)) { - setPref($data_dir, $username, 'translate_location', $translate_translate_location); - } else { - setPref($data_dir, $username, 'translate_location', 'center'); - } - - if (isset($translate_translate_show_read)) { - setPref($data_dir, $username, 'translate_show_read', '1'); - } else { - setPref($data_dir, $username, 'translate_show_read', ''); - } - - if (isset($translate_translate_show_send)) { - setPref($data_dir, $username, 'translate_show_send', '1'); - } else { - setPref($data_dir, $username, 'translate_show_send', ''); - } - - if (isset($translate_translate_same_window)) { - setPref($data_dir, $username, 'translate_same_window', '1'); - } else { - setPref($data_dir, $username, 'translate_same_window', ''); - } - - echo '
Translation options saved.
'; - } -} - - function translate_pref() { global $username, $data_dir; global $translate_server, $translate_location; @@ -209,18 +173,20 @@ function translate_does_it_match_language($test) { function translate_lang_opt($from, $to, $value, $text) { global $translate_dir; - - echo ' \n"; + + $ret .= '>' . $text . "\n"; + + return( $ret ); } @@ -241,7 +207,7 @@ function translate_new_form($action) { if (!$translate_same_window) { echo ' target="_blank"'; } - + echo ">\n"; ?>> @@ -260,22 +226,61 @@ function translate_form_babelfish($message) { - Babelfish: -'. + 'Babelfish: '; + translate_table_end(); } @@ -284,133 +289,201 @@ function translate_form_go($message) { ?> - - Go.com: -'. + "". + 'Go.com: '; + translate_table_end(); } function translate_form_intertran($message) { translate_new_form('http://www.tranexp.com:2000/InterTran'); -?> - - - - to - InterTran: -'. + ''. + ""; + + $left = ''; + + $right = ''; + printf( _("%s to %s"), $left, $right ); + echo 'InterTran: '; + translate_table_end(); } function translate_form_gpltrans($message) { translate_new_form('http://www.translator.cx/cgi-bin/gplTrans'); -?> - - GPLTrans: -'. + "". + 'GPLTrans: '; + translate_table_end(); } function translate_form_dictionary($message) { translate_new_form('http://translate.dictionary.com:8800/systran/cgi'); -?> - - - Dictionary.com: -'. + "". + ''; + translate_table_end(); } ?>