瀏覽代碼

Removing trailing spaces from strings.

Fredrik Jervfors 19 年之前
父節點
當前提交
91cda79db6
共有 5 個文件被更改,包括 206 次插入165 次删除
  1. 2 2
      functions/imap_general.php
  2. 12 12
      plugins/mail_fetch/class.POP3.php
  3. 8 7
      plugins/mail_fetch/fetch.php
  4. 3 3
      plugins/mail_fetch/functions.php
  5. 181 141
      po/squirrelmail.pot

+ 2 - 2
functions/imap_general.php

@@ -691,7 +691,7 @@ function sqimap_create_stream($server,$port,$tls=0) {
                 // starttls command failed
                 sqimap_error_box(sprintf(_("Error connecting to IMAP server: %s."), $server),
                                  'STARTTLS',
-                                 _("Server replied: "),
+                                 _("Server replied:") . ' ',
                                  $starttls_message);
                 exit();
             }
@@ -1244,4 +1244,4 @@ function map_yp_alias($username) {
    return chop(substr($yp, strlen($username)+1));
 }
 
-?>
+?>

+ 12 - 12
plugins/mail_fetch/class.POP3.php

@@ -92,7 +92,7 @@ class POP3 {
         $fp = @fsockopen("$server", $port, $errno, $errstr);
 
         if(!$fp) {
-            $this->ERROR = _("POP3 connect:") . ' ' . _("Error ") . "[$errno] [$errstr]";
+            $this->ERROR = _("POP3 connect:") . ' ' . _("Error") . ' ' . "[$errno] [$errstr]";
             unset($this->FP);
             return false;
         }
@@ -104,7 +104,7 @@ class POP3 {
         if($this->DEBUG)
             error_log("POP3 SEND [connect: $server] GOT [$reply]",0);
         if(!$this->is_ok($reply)) {
-            $this->ERROR = _("POP3 connect:") . ' ' . _("Error ") . "[$reply]";
+            $this->ERROR = _("POP3 connect:") . ' ' . _("Error") . ' ' . "[$reply]";
             unset($this->FP);
             return false;
         }
@@ -125,7 +125,7 @@ class POP3 {
         } else {
             $reply = $this->send_cmd("USER $user");
             if(!$this->is_ok($reply)) {
-                $this->ERROR = _("POP3 user:") . ' ' . _("Error ") . "[$reply]";
+                $this->ERROR = _("POP3 user:") . ' ' . _("Error") . ' ' . "[$reply]";
                 return false;
             } else
                 return true;
@@ -248,7 +248,7 @@ class POP3 {
         }
         if(!$this->is_ok($reply))
         {
-            $this->ERROR = _("POP3 top:") . ' ' . _("Error ") . "[$reply]";
+            $this->ERROR = _("POP3 top:") . ' ' . _("Error") . ' ' . "[$reply]";
             return false;
         }
 
@@ -302,7 +302,7 @@ class POP3 {
             }
             if(!$this->is_ok($reply))
             {
-                $this->ERROR = _("POP3 pop_list:") . ' ' . _("Error ") . "[$reply]";
+                $this->ERROR = _("POP3 pop_list:") . ' ' . _("Error") . ' ' . "[$reply]";
                 return false;
             }
             list($junk,$num,$size) = preg_split('/\s+/',$reply);
@@ -313,7 +313,7 @@ class POP3 {
         if(!$this->is_ok($reply))
         {
             $reply = $this->strip_clf($reply);
-            $this->ERROR = _("POP3 pop_list:") . ' ' . _("Error ") .  "[$reply]";
+            $this->ERROR = _("POP3 pop_list:") . ' ' . _("Error") . ' ' .  "[$reply]";
             return false;
         }
         $MsgArray = array();
@@ -361,7 +361,7 @@ class POP3 {
 
         if(!$this->is_ok($reply))
         {
-            $this->ERROR = _("POP3 get:") . ' ' . _("Error ") . "[$reply]";
+            $this->ERROR = _("POP3 get:") . ' ' . _("Error") . ' ' . "[$reply]";
             return false;
         }
 
@@ -394,7 +394,7 @@ class POP3 {
         $reply = $this->send_cmd("STAT");
         if(!$this->is_ok($reply))
         {
-            $this->ERROR = _("POP3 last:") . ' ' . _("Error ") . "[$reply]";
+            $this->ERROR = _("POP3 last:") . ' ' . _("Error") . ' ' . "[$reply]";
             return $last;
         }
 
@@ -427,7 +427,7 @@ class POP3 {
             //  response - if it ever does, something truely
             //  wild is going on.
 
-            $this->ERROR = _("POP3 reset:") . ' ' . _("Error ") . "[$reply]";
+            $this->ERROR = _("POP3 reset:") . ' ' . _("Error") . ' ' . "[$reply]";
             @error_log("POP3 reset: ERROR [$reply]",0);
         }
         $this->quit();
@@ -526,7 +526,7 @@ class POP3 {
             $reply = $this->send_cmd($cmd);
             if(!$this->is_ok($reply))
             {
-                $this->ERROR = _("POP3 uidl:") . ' ' . _("Error ") . "[$reply]";
+                $this->ERROR = _("POP3 uidl:") . ' ' . _("Error") . ' ' . "[$reply]";
                 return false;
             }
             list ($ok,$num,$myUidl) = preg_split('/\s+/',$reply);
@@ -549,7 +549,7 @@ class POP3 {
             if($this->DEBUG) { @error_log("POP3 SEND [$cmd] GOT [$reply]",0); }
             if(!$this->is_ok($reply))
             {
-                $this->ERROR = _("POP3 uidl:") . ' ' . _("Error ") . "[$reply]";
+                $this->ERROR = _("POP3 uidl:") . ' ' . _("Error") . ' ' . "[$reply]";
                 return false;
             }
 
@@ -593,7 +593,7 @@ class POP3 {
         $reply = $this->send_cmd("DELE $msgNum");
         if(!$this->is_ok($reply))
         {
-            $this->ERROR = _("POP3 delete:") . ' ' . _("Command failed ") . "[$reply]";
+            $this->ERROR = _("POP3 delete:") . ' ' . _("Command failed") . ' ' . "[$reply]";
             return false;
         }
         return true;

+ 8 - 7
plugins/mail_fetch/fetch.php

@@ -156,8 +156,9 @@ for ($i_loop=$i_start;$i_loop<$i_stop;$i_loop++) {
     echo '<br />' .
         html_tag( 'table',
             html_tag( 'tr',
-                html_tag( 'td', '<b>' . _("Fetching from ") .
-                    htmlspecialchars($mailfetch[$i_loop]['alias']) .
+                html_tag( 'td', '<b>' .
+                    sprintf(_("Fetching from %s"),
+                        htmlspecialchars($mailfetch[$i_loop]['alias'])) .
                     '</b>',
                 'center' ) ,
             '', $color[9] ) ,
@@ -166,7 +167,7 @@ for ($i_loop=$i_start;$i_loop<$i_stop;$i_loop++) {
     flush();
 
     if (!$pop3->connect($mailfetch_server,$mailfetch_port)) {
-        Mail_Fetch_Status(_("Oops, ") . $pop3->ERROR );
+        Mail_Fetch_Status($pop3->ERROR );
         continue;
     }
 
@@ -227,7 +228,7 @@ for ($i_loop=$i_start;$i_loop<$i_stop;$i_loop++) {
     }
 
     for (; $i <= $Count; $i++) {
-        Mail_Fetch_Status(_("Fetching message ") . "$i" );
+        Mail_Fetch_Status(sprintf(_("Fetching message %s."), $i));
 
         if (!ini_get('safe_mode'))
             set_time_limit(20); // 20 seconds per message max
@@ -235,13 +236,13 @@ for ($i_loop=$i_start;$i_loop<$i_stop;$i_loop++) {
         $MessArray = $pop3->get($i);
 
         while ( (!$MessArray) or (gettype($MessArray) != "array")) {
-            Mail_Fetch_Status(_("Oops, ") . $pop3->ERROR);
+            Mail_Fetch_Status($pop3->ERROR);
             // re-connect pop3
             Mail_Fetch_Status(_("Server error. Disconnect"));
             $pop3->quit();
             Mail_Fetch_Status(_("Reconnect from dead connection"));
             if (!$pop3->connect($mailfetch_server)) {
-                Mail_Fetch_Status(_("Oops, ") . $pop3->ERROR );
+                Mail_Fetch_Status($pop3->ERROR );
                 Mail_Fetch_Status(_("Saving UIDL"));
                 setPref($data_dir,$username,"mailfetch_uidl_$i_loop", $mailfetch_uidl[$i-1]);
 
@@ -255,7 +256,7 @@ for ($i_loop=$i_start;$i_loop<$i_stop;$i_loop++) {
 
                 continue;
             }
-            Mail_Fetch_Status(_("Refetching message ") . "$i" );
+            Mail_Fetch_Status(sprintf(_("Refetching message %s."), $i));
             $MessArray = $pop3->get($i);
 
         } // end while

+ 3 - 3
plugins/mail_fetch/functions.php

@@ -134,7 +134,7 @@ function mail_fetch_login_function() {
             $pop3 = new POP3($mailfetch_server, 60);
 
             if (!$pop3->connect($mailfetch_server,$mailfetch_port)) {
-                $outMsg .= _("Warning, ") . $pop3->ERROR;
+                $outMsg .= _("Warning:") . ' ' . $pop3->ERROR;
                 continue;
             }
 
@@ -142,7 +142,7 @@ function mail_fetch_login_function() {
 
             $Count = $pop3->login($mailfetch_user, $mailfetch_pass);
             if (($Count == false || $Count == -1) && $pop3->ERROR != '') {
-                $outMsg .= _("Login Failed:") . $pop3->ERROR;
+                $outMsg .= _("Login Failed:") . ' ' . $pop3->ERROR;
                 continue;
             }
 
@@ -180,7 +180,7 @@ function mail_fetch_login_function() {
                 $MessArray = $pop3->get($i);
 
                 if ( (!$MessArray) or (gettype($MessArray) != "array")) {
-                    $outMsg .= _("Warning, ") . $pop3->ERROR;
+                    $outMsg .= _("Warning:") . ' ' . $pop3->ERROR;
                     continue 2;
                 }
 

File diff suppressed because it is too large
+ 181 - 141
po/squirrelmail.pot


Some files were not shown because too many files changed in this diff