$headers_to_display contains TRANSLATED key values! Thanks to Stefano Bridi.
[squirrelmail.git] / templates / default_advanced / read_headers.tpl
index cb4899f..6759ff5 100644 (file)
@@ -14,7 +14,7 @@
  *                          additional templates.
  * 
  *
- * @copyright © 1999-2006 The SquirrelMail Project Team
+ * @copyright © 1999-2008 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id: read_headers.tpl 11998 2006-12-10 21:06:24Z pdontthink $
  * @package squirrelmail
@@ -56,12 +56,12 @@ extract($t);
     // show reduced (collapsed) header
     if (!$expand_header) {
 
-        $subject = (!empty($headers_to_display['Subject']) 
-                    ? $headers_to_display['Subject'] : _("(no subject)"));
-        $date = (!empty($headers_to_display['Date']) 
-                 ? $headers_to_display['Date'] : _("Unknown date"));
-        $from = (!empty($headers_to_display['From']) 
-                    ? $headers_to_display['From'] : _("Unknown sender"));
+        $subject = (!empty($headers_to_display[_("Subject")]) 
+                    ? $headers_to_display[_("Subject")] : _("(no subject)"));
+        $date = (!empty($headers_to_display[_("Date")]) 
+                 ? $headers_to_display[_("Date")] : _("Unknown date"));
+        $from = (!empty($headers_to_display[_("From")]) 
+                    ? $headers_to_display[_("From")] : _("Unknown sender"));
         // if available, print "real" name instead of email addr
         if (strpos($from,"<") !== FALSE) {
             list($from, $ignore) = $parts = explode('<', $from);
@@ -71,9 +71,7 @@ extract($t);
             $from = preg_replace('/"$/', '', trim($from));
         }
         // i18n: The parameters are: subject, sender, and date.
-        $reduced_header = str_replace(array('%1', '%2', '%3'),
-                                      array("<b>$subject</b>", "<b>$from</b>", "<b>$date</b>"),
-                                      _("%1 from %2 on %3"));
+        $reduced_header = sprintf(_("%s from %s on %s"), "<b>$subject</b>", "<b>$from</b>", "<b>$date</b>");
         $expand_link = str_replace('&expand_header=0', '', $PHP_SELF) . '&expand_header=1';
 
         echo '<tr><td colspan="2" align="center" valign="top">'
@@ -94,7 +92,7 @@ extract($t);
                 continue;
             }
         ?>
- <tr>
+ <tr class="field_<?php echo $field_name; ?>">
   <td class="fieldName">
 <?php 
         if ($first_time)