From cb29c97bf6cb5bbe79b17e7524a6042000f1a101 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak <alec@alec.pl> Date: Sun, 13 Apr 2014 03:05:18 -0400 Subject: [PATCH] Fix lack of translation of special folders in some configurations (#1489799) --- CHANGELOG | 1 + program/include/rcmail.php | 10 +++++----- program/steps/mail/func.inc | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index a658336..150d380 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -14,6 +14,7 @@ - Fix "washing" of unicoded style attributes (#1489777) - Fix unintentional redirect from compose page in Webkit browsers (#1489789) - Fix messages index cache update under some conditions (e.g. proxy) (#1489756) +- Fix lack of translation of special folders in some configurations (#1489799) RELEASE 1.0.0 ------------- diff --git a/program/include/rcmail.php b/program/include/rcmail.php index 431b772..7b663ca 100644 --- a/program/include/rcmail.php +++ b/program/include/rcmail.php @@ -1606,9 +1606,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) { @@ -1626,10 +1630,6 @@ } } } - } - - if (!$realnames && ($folder_class = $this->folder_classname($name))) { - return $this->gettext($folder_class); } return rcube_charset::convert($name, 'UTF7-IMAP'); diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index c123fe8..027b2c1 100644 --- a/program/steps/mail/func.inc +++ b/program/steps/mail/func.inc @@ -146,7 +146,7 @@ 'copy', 'move', 'quota', 'replyall', 'replylist'); } - $pagetitle = $RCMAIL->localize_foldername($RCMAIL->storage->mod_folder($mbox_name), true); + $pagetitle = $RCMAIL->localize_foldername($mbox_name, true); $pagetitle = str_replace($delimiter, " \xC2\xBB ", $pagetitle); $OUTPUT->set_pagetitle($pagetitle); -- Gitblit v1.9.1