X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=plugins%2Ftranslate%2Ffunctions.php;h=a94b4c88624e3d6e311f29691c766720620fed78;hp=0d22c64cf35a326951d34540a5575bcb6d8799ee;hb=bbb2bab55dbfb58735b8aa3eab53c052410753fa;hpb=d41c4aa2176be7cd8131430a4fe61bcea1887916
diff --git a/plugins/translate/functions.php b/plugins/translate/functions.php
index 0d22c64c..a94b4c88 100644
--- a/plugins/translate/functions.php
+++ b/plugins/translate/functions.php
@@ -3,7 +3,7 @@
/**
* SquirrelMail translate plugin functions
*
- * @copyright © 2004-2006 The SquirrelMail Project Team
+ * @copyright © 2004-2009 The SquirrelMail Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
* @package plugins
@@ -13,8 +13,7 @@
/**
* do not allow to call this file directly
*/
-if ((isset($_SERVER['SCRIPT_FILENAME']) && $_SERVER['SCRIPT_FILENAME'] == __FILE__) ||
- (isset($HTTP_SERVER_SERVER['SCRIPT_FILENAME']) && $HTTP_SERVER_SERVER['SCRIPT_FILENAME'] == __FILE__) ) {
+if (isset($_SERVER['SCRIPT_FILENAME']) && $_SERVER['SCRIPT_FILENAME'] == __FILE__) {
header("Location: ../../src/login.php");
die();
}
@@ -93,7 +92,7 @@ function translate_read_form_function() {
$trans_ar = $message->findDisplayEntity(array(), array('text/plain'));
$body = '';
$final_body = '';
- if ($trans_ar[0] != '') {
+ if ( !empty($trans_ar[0]) ) {
for ($i = 0; $i < count($trans_ar); $i++) {
/* reduced version of formatBody and translateText functions */
@@ -928,7 +927,7 @@ function translate_form_google($message) {
translate_lang_opt('en_US', 'ko_KR', 'en|ko',
sprintf( _("%s to %s"),_("English"),_("Korean"))) .
translate_lang_opt('en_US', 'zh_CN', 'en|zh-CN',
- sprintf( _("%s to %s"),_("English"),_("Chinese (Simplified)"))) .
+ sprintf( _("%s to %s"),_("English"),_("Chinese, Simplified"))) .
translate_lang_opt('de_DE', 'en_US', 'de|en',
sprintf( _("%s to %s"),_("German"),_("English"))) .
translate_lang_opt('de_DE', '', 'de|fr',
@@ -950,7 +949,7 @@ function translate_form_google($message) {
translate_lang_opt('ko_KR', '', 'ko|en',
sprintf( _("%s to %s"),_("Korean"),_("English"))).
translate_lang_opt('zh_CN', '', 'zh-CN|en',
- sprintf( _("%s to %s"),_("Chinese (Simplified)"),_("English")));
+ sprintf( _("%s to %s"),_("Chinese, Simplified"),_("English")));
echo ''.
'' .
'' .