thomascube
2008-02-19 fed22fd23257ac86ae9c7f1dbea1d538a0f0dee7
Localize folder name in page title (#1484785)

3 files modified
22 ■■■■■ changed files
CHANGELOG 4 ●●●● patch | view | raw | blame | history
program/include/main.inc 16 ●●●●● patch | view | raw | blame | history
program/steps/mail/func.inc 2 ●●● patch | view | raw | blame | history
CHANGELOG
@@ -1,6 +1,10 @@
CHANGELOG RoundCube Webmail
---------------------------
2008/02/20 (thomasb)
----------
- Localize folder name in page title (#1484785)
2008/02/12 (estadtherr)
----------
- fix switching between HTML/plain composing (#1484752) 
program/include/main.inc
@@ -1844,4 +1844,20 @@
}
/**
 * Try to localize the given IMAP folder name.
 * UTF-7 decode it in case no localized text was found
 *
 * @param string Folder name
 * @return string Localized folder name in UTF-8 encoding
 */
function rcmail_localize_foldername($name)
{
  if ($folder_class = rcmail_folder_classname($name))
    return rcube_label($folder_class);
  else
    return rcube_charset_convert($name, 'UTF-7');
}
?>
program/steps/mail/func.inc
@@ -76,7 +76,7 @@
// set page title
if (empty($_action) || $_action == 'list')
  $OUTPUT->set_pagetitle(rcube_charset_convert($IMAP->get_mailbox_name(), 'UTF-7'));
  $OUTPUT->set_pagetitle(rcmail_localize_foldername($IMAP->get_mailbox_name()));