Port Thijs fix (rev.13790) to DEVEL: no words must be an empty array, not a string...
[squirrelmail.git] / functions / page_header.php
index ecb1aabcd880e580b98602f14dd4843a2d2ba699..c7e0fb650a8f28997888da32838c36ad161bae2e 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Prints the page header (duh)
  *
- * @copyright © 1999-2007 The SquirrelMail Project Team
+ * @copyright © 1999-2009 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package squirrelmail
@@ -258,7 +258,13 @@ function displayPageHeader($color, $mailbox='', $sHeaderJs='', $sOnload = '') {
         $shortBoxName = htmlspecialchars(imap_utf7_decode_local(
                     readShortMailboxName($mailbox, $delimiter)));
         if (getPref($data_dir, $username, 'translate_special_folders')) {
-            $shortBoxName = _($shortBoxName);
+            global $sent_folder, $trash_folder, $draft_folder;
+            if ($mailbox == $sent_folder)
+                $shortBoxName = _("Sent");
+            else if ($mailbox == $trash_folder)
+                $shortBoxName = _("Trash");
+            else if ($mailbox == $sent_folder)
+                $shortBoxName = _("Drafts");
         }
         $urlMailbox = urlencode($mailbox);
     } else {