Revise plugin documentation. Mainly, this removes remains of documentation
[squirrelmail.git] / plugins / translate / functions.php
index f548be156e9f46e19f293a231a2c2aa0e2d58fba..edd0233ad47ba242c0db9cdb5ab72870f63e9824 100644 (file)
@@ -2,7 +2,7 @@
 /**
  * SquirrelMail translate plugin functions
  *
- * Copyright (c) 2004 The SquirrelMail Project Team
+ * Copyright (c) 2004-2005 The SquirrelMail Project Team
  * Licensed under the GNU GPL. For full terms see the file COPYING.
  *
  * @version $Id$
@@ -77,6 +77,7 @@ function translate_read_form_function() {
         $translate_promt_enabled, $translate_otenet_enabled;
     global $translate_custom_enabled;
 
+
     if (!$translate_show_read) {
         return;
     }
@@ -232,7 +233,7 @@ function translate_showoption() {
         $translate_dictionary_enabled, $translate_google_enabled,
         $translate_gpltrans_enabled, $translate_intertran_enabled,
         $translate_promt_enabled, $translate_otenet_enabled;
-    global $translate_custom_enabled;
+    global $translate_custom_enabled, $translate_gpltrans_url;
 
     if ($translate_babelfish_enabled) translate_showoption_internal('server','babelfish', 'Babelfish');
     if ($translate_go_enabled) translate_showoption_internal('server','go', 'Go.com');
@@ -426,7 +427,7 @@ function translate_lang_opt($from, $to, $value, $text) {
  * @access private
  */
 function translate_new_form($action) {
-    global $translate_dir, $translate_new_window, $translate_location;
+    global $translate_dir, $translate_location;
     global $color, $translate_same_window;
 
     echo '<form action="';
@@ -468,13 +469,13 @@ function translate_form_babelfish($message) {
     <input type="hidden" name="trtext" value="<?php echo $message; ?>" />
     <select name="lp"><?php
         echo translate_lang_opt('zh_CN',  '',     'zh_en',
-                            sprintf( _("%s to %s"),_("Chinese Simplified"),_("English"))) .
+                            sprintf( _("%s to %s"),_("Chinese, Simplified"),_("English"))) .
          translate_lang_opt('zh_TW',  '',     'zt_en',
-                            sprintf( _("%s to %s"),_("Chinese Traditional"),_("English"))) .
+                            sprintf( _("%s to %s"),_("Chinese, Traditional"),_("English"))) .
          translate_lang_opt('en_US', 'zh_CN', 'en_zh',
-                            sprintf( _("%s to %s"),_("English"),_("Chinese Simplified"))) .
+                            sprintf( _("%s to %s"),_("English"),_("Chinese, Simplified"))) .
          translate_lang_opt('en_US', 'zh_TW', 'en_zt',
-                            sprintf( _("%s to %s"),_("English"),_("Chinese Traditional"))) .
+                            sprintf( _("%s to %s"),_("English"),_("Chinese, Traditional"))) .
          translate_lang_opt('en_US', 'nl_NL',  'en_nl',
                             sprintf( _("%s to %s"),_("English"),_("Dutch"))) .
          translate_lang_opt('en_US', 'fr_FR',  'en_fr',
@@ -590,7 +591,7 @@ function translate_form_go($message) {
  * @access private
  */
 function translate_form_intertran($message) {
-    translate_new_form('http://www.tranexp.com:2000/InterTran');
+    translate_new_form('http://intertran.tranexp.com/Translate/result.shtml');
     echo '<input type="hidden" name="topframe" value="yes" />'.
          '<input type="hidden" name="type" value="text" />'.
          '<input type="hidden" name="keyb" value="non" />'.
@@ -672,7 +673,13 @@ function translate_form_intertran($message) {
  * @access private
  */
 function translate_form_gpltrans($message) {
-    translate_new_form('http://www.translator.cx/cgi-bin/gplTrans');
+    global $translate_gpltrans_url;
+
+    // make sure that it is not empty
+    if ($translate_gpltrans_url=='')
+        $translate_gpltrans_url='http://www.translator.cx/cgi-bin/gplTrans';
+
+    translate_new_form($translate_gpltrans_url);
     echo '<select name="language">'.
         translate_lang_opt('', 'nl_NL', 'dutch_dict',      _("Dutch")).
         translate_lang_opt('', 'fr_FR', 'french_dict',     _("French")).
@@ -706,9 +713,9 @@ function translate_form_dictionary($message) {
          '<input type="hidden" name="ts" value="'.$time.'" />'.
          '<select name="lp">'.
          translate_lang_opt('en_US', 'zh_CN', 'en_zh',
-                            sprintf( _("%s to %s"),_("English"),_("Simplified Chinese"))) .
+                            sprintf( _("%s to %s"),_("English"),_("Chinese, Simplified"))) .
          translate_lang_opt('en_US', 'zh_TW', 'en_zt',
-                            sprintf( _("%s to %s"),_("English"),_("Traditional Chinese"))) .
+                            sprintf( _("%s to %s"),_("English"),_("Chinese, Traditional"))) .
          translate_lang_opt('en_US', 'nl_NL', 'en_nl',
                             sprintf( _("%s to %s"),_("English"),_("Dutch"))) .
          translate_lang_opt('en_US', 'fr_FR', 'en_fr',
@@ -730,9 +737,9 @@ function translate_form_dictionary($message) {
          translate_lang_opt('en_US', 'es_ES', 'en_es',
                             sprintf( _("%s to %s"),_("English"),_("Spanish"))) .
          translate_lang_opt('zh_CN',  '',     'zh_en',
-                            sprintf( _("%s to %s"),_("Simplified Chinese"),_("English"))) .
+                            sprintf( _("%s to %s"),_("Chinese, Simplified"),_("English"))) .
          translate_lang_opt('zh_TW',  '',     'zt_en',
-                            sprintf( _("%s to %s"),_("Traditional Chinese"),_("English"))) .
+                            sprintf( _("%s to %s"),_("Chinese, Traditional"),_("English"))) .
          translate_lang_opt('nl_NL',  '',     'nl_en',
                             sprintf( _("%s to %s"),_("Dutch"),_("English"))) .
          translate_lang_opt('fr_FR',  '',     'fr_en',
@@ -766,7 +773,7 @@ function translate_form_dictionary($message) {
  * @access private
  */
 function translate_form_otenet($message) {
-    translate_new_form('http://systran.otenet.gr/cgi-bin/systran.cgi');
+    translate_new_form('http://trans.otenet.gr/systran/box');
 ?>
     <input type="hidden" name="doit" value="done" />
     <input type="hidden" name="partner" value="OTEnet-en" />