X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=plugins%2Ftranslate%2Foptions.php;h=7e18ef2532ea9abb9fa45e356b74bf88e46f6b20;hb=b4df37a525c34a317d5f6ff10baa518f75448703;hp=bed2196e53d15330a00aba07237a73a8eda51fb1;hpb=eaf943d2c7e705838509964fd8b5c2fce9fa33fe;p=squirrelmail.git diff --git a/plugins/translate/options.php b/plugins/translate/options.php index bed2196e..7e18ef25 100644 --- a/plugins/translate/options.php +++ b/plugins/translate/options.php @@ -3,174 +3,79 @@ /** * options.php * - * Copyright (c) 1999-2003 The SquirrelMail Project Team - * Licensed under the GNU GPL. For full terms see the file COPYING. - * * Pick your translator to translate the body of incoming mail messages * - * $Id$ + * @copyright © 1999-2007 The SquirrelMail Project Team + * @license http://opensource.org/licenses/gpl-license.php GNU Public License + * @version $Id$ + * @package plugins + * @subpackage translate */ -/* Path for SquirrelMail required files. */ -define('SM_PATH','../../'); - -/* SquirrelMail required files. */ -require_once(SM_PATH . 'include/validate.php'); -require_once(SM_PATH . 'functions/strings.php'); -require_once(SM_PATH . 'functions/page_header.php'); -require_once(SM_PATH . 'functions/display_messages.php'); -require_once(SM_PATH . 'functions/imap.php'); -require_once(SM_PATH . 'include/load_prefs.php'); - - displayPageHeader($color, 'None'); - - if (isset($_POST['submit_translate']) && $_POST['submit_translate'] ) { - if (isset($_POST['translate_translate_server'])) { - setPref($data_dir, $username, 'translate_server', $_POST['translate_translate_server']); - } else { - setPref($data_dir, $username, 'translate_server', 'babelfish'); - } - - if (isset($_POST['translate_translate_location'])) { - setPref($data_dir, $username, 'translate_location', $_POST['translate_translate_location']); - } else { - setPref($data_dir, $username, 'translate_location', 'center'); - } - - if (isset($_POST['translate_translate_show_read'])) { - setPref($data_dir, $username, 'translate_show_read', '1'); - } else { - setPref($data_dir, $username, 'translate_show_read', ''); - } - - if (isset($_POST['translate_translate_show_send'])) { - setPref($data_dir, $username, 'translate_show_send', '1'); - } else { - setPref($data_dir, $username, 'translate_show_send', ''); - } - - if (isset($_POST['translate_translate_same_window'])) { - setPref($data_dir, $username, 'translate_same_window', '1'); - } else { - setPref($data_dir, $username, 'translate_same_window', ''); - } - } - - $translate_server = getPref($data_dir, $username, 'translate_server'); - if ($translate_server == '') { - $translate_server = 'babelfish'; - } - $translate_location = getPref($data_dir, $username, 'translate_location'); - if ($translate_location == '') { - $translate_location = 'center'; - } - $translate_show_read = getPref($data_dir, $username, 'translate_show_read'); - $translate_show_send = getPref($data_dir, $username, 'translate_show_send'); - $translate_same_window = getPref($data_dir, $username, 'translate_same_window'); - - - function ShowOption($Var, $value, $Desc) - { - $Var = 'translate_' . $Var; - - global $$Var; - - echo '\n"; - } - - function ShowTrad( $tit, $com, $url ) { +/** + * Include the SquirrelMail initialization file. + */ +require('../../include/init.php'); - echo "
  • $tit - ". - $com . - "[ $tit ]
  • "; +/** Plugin functions */ +include_once(SM_PATH . 'plugins/translate/functions.php'); - } +displayPageHeader($color); ?> -
    -
    +
    +
    -

    "._("Saved Translation Options")."

    \n"; - }?> -

    ". - ''. - '\n"; +} ?> + +
    ' . + '
    '. + '' . + '' . + ''. + ''. '' . - ''. - ''. - ''. - '' . + ''.html_tag('td',_("When reading:"),'right','','style="white-space: nowrap;"'). + '\n"; + +if (!$disable_compose_translate) { + echo ''.html_tag('td',_("When composing:"),'right','','style="white-space: nowrap;"'). + ''. - ''. - '
    ' . _("Select your translator:") . '' . - '
    ' . - _("When reading:") . - ' - ' . _("Show translation box") . - '
    '. - ' - ' . _("Translate inside the SquirrelMail frames"). - '
    '. - _("When composing:") . '' . + '
    - ' . _("Show translation box") . + '
    '. + ' - ' . _("Translate inside the SquirrelMail frames"). + "
    - ' . _("Not yet functional, currently does nothing") . - '
    '. - ''. - '
    '. - '
    '. -"\n"; - + echo ' checked="checked"'; + echo ' /> - ' . _("Not yet functional, currently does nothing") . + "
    +" name="submit_translate" /> +
    + +