Added translate.ru online translator. Changed strings. Now it is possible
authortokul <tokul@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sun, 13 Jul 2003 10:45:45 +0000 (10:45 +0000)
committertokul <tokul@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sun, 13 Jul 2003 10:45:45 +0000 (10:45 +0000)
to change number of available languages or language pairs without
squirrelmail.po update. Different string used for InterTran is not mistake.
It looks better when string says "Number of supported languages = 28"
instead of "Number of supported language pairs = 28^2"

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@5316 7612ce4b-ef26-0410-bec9-ea0150e637f0

plugins/translate/options.php
plugins/translate/setup.php

index bed2196..a90bf6c 100644 (file)
@@ -105,23 +105,32 @@ require_once(SM_PATH . 'include/load_prefs.php');
    <ul>
 <?php
     ShowTrad( 'Babelfish',
-              _("19 language pairs, maximum of 1000 characters translated, powered by Systran"),
+              _("Maximum of 1000 characters translated, powered by Systran").
+             "<br>".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',
-              _("12 language pairs, no known limits, powered by Systran"),
+              _("No known limits, powered by Systran").
+             "<br>".sprintf(_("Number of supported language pairs: %s"),"12")." " ,
               'http://www.dictionary.com/translate' );
     ShowTrad( 'InterTran',
-              _("784 language pairs, no known limits, powered by Translation Experts's InterTran"),
+              _("No known limits, powered by Translation Experts's InterTran").
+             "<br>".sprintf(_("Number of supported languages: %s"),"28")." " ,
               'http://www.tranexp.com/' );
     ShowTrad( 'GPLTrans',
-              _("8 language pairs, no known limits, powered by GPLTrans (free, open source)"),
+              _("No known limits, powered by GPLTrans (free, open source)").
+             "<br>".sprintf(_("Number of supported language pairs: %s"),"8")." " ,
               'http://www.translator.cx/' );
     ShowTrad( 'OTEnet',
-              _("4 language pairs for Hellenic, no known limits, powered by Systran"),
+              _("Hellenic translations, no known limits, powered by Systran").
+             "<br>".sprintf(_("Number of supported language pairs: %s"),"4")." " ,
               'http://systran.otenet.gr/' );
+    ShowTrad( 'PROMT',
+              _("Russian translations, maximum of 500 characters translated").
+             "<br>".sprintf(_("Number of supported language pairs: %s"),"12")." " ,
+              'http://www.translate.ru/' );
 ?>
    </ul>
    <p>
@@ -140,6 +149,7 @@ require_once(SM_PATH . 'include/load_prefs.php');
     ShowOption('server', 'intertran', 'Intertran');
     ShowOption('server', 'gpltrans', 'GPLTrans');
     ShowOption('server', 'otenet', 'OTEnet');
+    ShowOption('server', 'promt', 'PROMT');
     echo '</select>' .
          '</td></tr>' .
          '<tr><td align=right nowrap>' .
index e017d86..de12966 100644 (file)
@@ -556,4 +556,74 @@ function translate_form_otenet($message) {
     translate_table_end();
 
 }
+
+function translate_form_promt($message) {
+    translate_new_form('http://www.translate.ru/text.asp#tr_form');
+    echo '<input type="hidden" name="status" value="translate">';
+    echo "<input type=\"hidden\" name=\"source\" value=\"$message\">";
+    echo _("Interface language")." : ";
+    echo "<select size=\"1\" name=\"lang\">\n";
+    echo "<option value=\"en\">" . _("English") . "</option>\n";
+    echo "<option value=\"ru\">" . _("Russian") . "</option>\n";
+    echo "<option value=\"de\">" . _("German") . "</option>\n";
+    echo "<option value=\"fr\">" . _("French") . "</option>\n";
+    echo "<option value=\"es\">" . _("Spanish") . "</option>\n";
+    echo "</select><br>\n";
+    echo _("Translation direction")." : ";
+    echo '<select size="1" id="direction" name="direction">';
+        echo translate_lang_opt('en',  'ru',  'er',
+                                sprintf( _("%s to %s"),
+                                         _("English"),
+                                         _("Russian"))) .
+             translate_lang_opt('ru',  'en',  're',
+                                sprintf( _("%s to %s"),
+                                         _("Russian"), 
+                                         _("English"))) .
+            translate_lang_opt('de',  'ru',  'gr',
+                                sprintf( _("%s to %s"),
+                                         _("German"),
+                                         _("Russian"))) .
+            translate_lang_opt('ru',  'de',  'rg',
+                                sprintf( _("%s to %s"),
+                                         _("Russian"),
+                                         _("German"))) .
+            translate_lang_opt('fr',  'ru',  'fr',
+                                sprintf( _("%s to %s"),
+                                         _("French"),
+                                         _("Russian"))) .
+            translate_lang_opt('ru',  'fr',  'rf',
+                                sprintf( _("%s to %s"),
+                                         _("Russian"),
+                                         _("French"))) .
+            translate_lang_opt('es',  'ru',  'sr',
+                                sprintf( _("%s to %s"),
+                                         _("Spanish"),
+                                         _("Russian"))) .
+            translate_lang_opt('it',  'ru',  'ir',
+                                sprintf( _("%s to %s"),
+                                         _("Italian"),
+                                         _("Russian"))) .
+            translate_lang_opt('en',  'de',  'eg',
+                                sprintf( _("%s to %s"),
+                                         _("English"),
+                                         _("German"))) .
+            translate_lang_opt('de',  'en',  'ge',
+                                sprintf( _("%s to %s"),
+                                         _("German"),
+                                         _("English"))) .
+            translate_lang_opt('en',  'es',  'es',
+                                sprintf( _("%s to %s"),
+                                         _("English"),
+                                         _("Spanish"))) .
+            translate_lang_opt('es',  'en',  'se',
+                                sprintf( _("%s to %s"),
+                                         _("Spanish"),
+                                         _("English"))) ;
+    echo "</select><br>\n";
+    echo "<input type=\"hidden\" name=\"template\" value=\"General\">\n";
+    echo 'PROMT: <input type="submit" value="' . _("Translate") . '">';
+
+    translate_table_end();
+}
+
 ?>