Changeset 3773 for branches/2.2/mobile


Ignore:
Timestamp:
02/16/11 17:17:01 (13 years ago)
Author:
thiagoaos
Message:

Ticket #1558 - Traduzido o nome das pastas padrões no expresso Mini.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/mobile/inc/class.ui_home.inc.php

    r3734 r3773  
    4343                        $this->template->set_var('lang_my_folders', lang("my folders")); 
    4444                        $this->template->set_var('lang_my_commitments', lang("my commitments")); 
    45       $this->template->set_var('lang_my_contacts', lang("my contacts")); 
     45                        $this->template->set_var('lang_my_contacts', lang("my contacts")); 
    4646                        $this->template->set_var('lang_new_mail', lang("new mail")); 
    4747                        $this->template->set_var('lang_mark_as_read', lang("mark as read")); 
     
    5252                        //pegando as pastas 
    5353                        $default_folders = $this->imap_functions->get_folders_list(array('noSharedFolders' => true, 'folderType' => 'default', 'noQuotaInfo' => true)); 
    54                         $total_quota = $this->imap_functions->get_quota(array());                
     54                        $total_quota = $this->imap_functions->get_quota(array()); 
    5555                                         
    5656                        $this->set_folder_block($default_folders, "default_folders_box"); 
     
    103103                                $GLOBALS['phpgw_info']['mobiletemplate']->set_content($this->template->fp('out', 'page')); 
    104104                        } 
    105  
     105                } 
     106 
     107                function get_translate_default_folder_name_from_id($folder_id) { 
     108                        $imap_delimiter = $_SESSION['phpgw_info']['expressomail']['email_server']['imapDelimiter']; 
     109                         
     110                        switch ($folder_id) { 
     111                                case 'INBOX': 
     112                                        return lang("Inbox"); 
     113                                case 'INBOX'.$imap_delimiter.$_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultTrashFolder']:  
     114                                        return lang("Trash"); 
     115                                case 'INBOX'.$imap_delimiter.$_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultDraftsFolder']:  
     116                                        return lang("Drafts"); 
     117                                case 'INBOX'.$imap_delimiter.$_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSpamFolder']:  
     118                                        return lang("Spam"); 
     119                                case 'INBOX'.$imap_delimiter.$_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSentFolder']:  
     120                                        return lang("Sent"); 
     121                                default: 
     122                                        return ""; 
     123                        } 
    106124                } 
    107125                 
     
    116134                                $this->template->set_var('folder_class', (($index%2==0) ? "par" : "par1") ); 
    117135                                $this->template->set_var('folder_id', $index + $index_increment ); 
    118                                 $this->template->set_var('folder_name', $folder["folder_name"] ); 
     136                                 
     137                                $translated_folder_name = $this->get_translate_default_folder_name_from_id($folder["folder_id"]); 
     138                                 
     139                                $this->template->set_var('folder_name', (($translated_folder_name == "") ? $folder["folder_name"] : $translated_folder_name) ); 
    119140                                $this->template->set_var('folder_unseen', $folder["folder_unseen"] ); 
    120141                                 
Note: See TracChangeset for help on using the changeset viewer.