diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-02-19 23:09:20 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-02-19 23:09:20 +0000 |
| commit | d4251dabace59bf938fb4fcd445286935820a914 (patch) | |
| tree | 6f8744e05ba1638155f6f6b4afbd12ed684105f2 | |
| parent | 68955361dd404a1eb0fdca648f14ed1aefee29d9 (diff) | |
Localize folder name in page title (#1484785)
git-svn-id: https://svn.roundcube.net/trunk@1119 208e9e7b-5314-0410-a742-e7e81cd9613c
| -rw-r--r-- | roundcubemail/CHANGELOG | 4 | ||||
| -rw-r--r-- | roundcubemail/program/include/main.inc | 16 | ||||
| -rw-r--r-- | roundcubemail/program/steps/mail/func.inc | 2 |
3 files changed, 21 insertions, 1 deletions
diff --git a/roundcubemail/CHANGELOG b/roundcubemail/CHANGELOG index 7a005b184..c7d1b686e 100644 --- a/roundcubemail/CHANGELOG +++ b/roundcubemail/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) diff --git a/roundcubemail/program/include/main.inc b/roundcubemail/program/include/main.inc index 2d28090c7..06cf706ea 100644 --- a/roundcubemail/program/include/main.inc +++ b/roundcubemail/program/include/main.inc @@ -1844,4 +1844,20 @@ function rcmail_folder_classname($folder_id) } +/** + * 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'); +} + + ?> diff --git a/roundcubemail/program/steps/mail/func.inc b/roundcubemail/program/steps/mail/func.inc index 5156e0232..f14c532b4 100644 --- a/roundcubemail/program/steps/mail/func.inc +++ b/roundcubemail/program/steps/mail/func.inc @@ -76,7 +76,7 @@ if (!$OUTPUT->ajax_call) // 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())); |
