From 4c7daf5ceaea1bc48eff117e1abe642d13445857 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Sun, 13 Apr 2014 03:06:36 -0400
Subject: [PATCH] Fix lack of translation of special folders in some configurations (#1489799)

---
 program/include/rcmail.php |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/program/include/rcmail.php b/program/include/rcmail.php
index e558ce8..ca944f4 100644
--- a/program/include/rcmail.php
+++ b/program/include/rcmail.php
@@ -1621,9 +1621,13 @@
      *
      * @return string Localized folder name in UTF-8 encoding
      */
-    public function localize_foldername($name, $with_path = true)
+    public function localize_foldername($name, $with_path = false)
     {
         $realnames = $this->config->get('show_real_foldernames');
+
+        if (!$realnames && ($folder_class = $this->folder_classname($name))) {
+            return $this->gettext($folder_class);
+        }
 
         // try to localize path of the folder
         if ($with_path && !$realnames) {
@@ -1641,10 +1645,6 @@
                     }
                 }
             }
-        }
-
-        if (!$realnames && ($folder_class = $this->folder_classname($name))) {
-            return $this->gettext($folder_class);
         }
 
         return rcube_charset::convert($name, 'UTF7-IMAP');

--
Gitblit v1.9.1