Changeset 1070


Ignore:
Timestamp:
07/02/09 13:38:44 (15 years ago)
Author:
alexandrecorreia
Message:

Ticket #474 - Arquivos modificados para a tradução do Applet.

Location:
trunk/jabberit_messenger/java_source/src/nu/fw/jeti
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/jabberit_messenger/java_source/src/nu/fw/jeti/languages/languages.java

    r1064 r1070  
    1010                { "Close" , "&Fechar"}, 
    1111                { "Loading" , "Carregando"}, 
     12                { "initMessages.Available", "Disponível" }, 
     13                { "initMessages.Be_right_back", "Volto Logo"}, 
     14                { "initMessages.Busy", "Ocupado"}, 
     15                { "initMessages.Extend_Away", "Ausente" }, 
     16                { "initMessages.Free_for_Chat", "Livre p/ Chat"},                
     17                { "initMessages.Gone_home", "Em casa"}, 
     18                { "initMessages.In_a_meeting", "Em reunião"}, 
     19                { "initMessages.On_vacation", "Férias"}, 
     20                { "initMessages.On_the_phone", "No telefone"}, 
     21                { "initMessages.Working", "Trabalhando"}, 
    1222                { "main.about.About_JETI" , "Sobre Jeti"}, 
    1323                { "main.about.Version" , "Jeti Versão"}, 
     
    3545                { "main.chat.with_status_message" , "com status de mensagem:"}, 
    3646                { "main.chat.You_are_about_to_close_{0}_tabs_Are_you_sure_you_want_to_close_them?" , "Você vai fechar {0} abas. Tem certeza que deseja fechá-las?"},  
    37                 { "main.error.{0}_contains_no_plugins" , "{0} não contém plugins"}, 
     47                { "main.error.{0}_contains_no_plugins" , "{0} não contêm plugins"}, 
    3848                { "main.error.{0}_is_not_valid" , "{0} não é válido"}, 
    3949                { "main.error.{0}_plugin_failed_to_load" , "{0} plugin falhou ao carregar"}, 
     
    5464                { "main.error.Server_has_no_value" , "Servidor não tem valor"}, 
    5565                { "main.error.Server_must_start_with_a_letter_(see_english_translation)" , "Servidor precisa começar com uma letra ou conter [A-Z], [a-z], [0-9], '.' or '-'"}, 
    56                 { "main.error.Server_or_Username_contains_a_'@'" , "Servidor ou Usuário contém '@'"}, 
     66                { "main.error.Server_or_Username_contains_a_'@'" , "Servidor ou usuário contém @"}, 
    5767                { "main.error.Service_error" , "Erro de serviço"}, 
    5868                { "main.error.Time_Error" , "Erro de tempo"}, 
     
    6373                { "main.error.User_{0}_could_not_be_found" , "Usuário {0} não foi encontrado"}, 
    6474                { "main.error.Username_>_255_Characters" , "Usuário > 255 caracteres"}, 
    65                 { "main.error.Username_contains_illegal_chars_(see_english_translation)" , "Usuário contém caracteres inválidos"}, 
     75                { "main.error.Username_contains_illegal_chars_(see_english_translation)" , "Usuário contêm caracteres inválidos"}, 
    6676                { "main.error.Version_Error" , "Erro na versão"}, 
    6777                { "main.error.Wrong_contact_name" , "Nome de contato inválido"}, 
     
    133143                { "main.manageservices.Register" , "&Registrar"}, 
    134144                { "main.manageservices.Server" , "&Servidor"}, 
    135                 { "main.popup.{0}_is_in_the_last_group,_remove_completely?" , "{0} é o \u00FAltimo grupo, remover completamente?"}, 
     145                { "main.popup.{0}_is_in_the_last_group,_remove_completely?" , "{0} é o último grupo, remover completamente?"}, 
    136146                { "main.popup.{0}_is_in_timezone_{1}" , "{0} fuso-horário {1}"}, 
    137147                { "main.popup.{0}_not_found" , "{0} não encontrado."}, 
  • trunk/jabberit_messenger/java_source/src/nu/fw/jeti/languages/languagesPlugins.java

    r1064 r1070  
    1919                { "filetransfer.automatic" , "automático"}, 
    2020                { "filetransfer.behind_firewall_or_NAT" , "atrás de um firewall ou  NAT"}, 
    21                 { "filetransfer.Can_not_transfer_directories" , "Não pode transferir diretórios"}, 
     21                { "filetransfer.Can_not_transfer_directories" , "não pode transferir diretórios"}, 
    2222                { "filetransfer.Close" , "Fechar"}, 
    2323                { "filetransfer.close_download_windows_when_download_ready" , "Fechar a janela quando terminar o download."}, 
     
    2727                { "filetransfer.File_Name" , "&Nome do arquivo"}, 
    2828                { "filetransfer.File_Size" , "Tamhando do arquivo"}, 
    29                 { "filetransfer.File_Transfer" , "Transferência de arquivo"}, 
     29                { "filetransfer.File_Transfer" , "transferência de arquivo"}, 
    3030                { "filetransfer.From" , "De"}, 
    3131                { "filetransfer.ip" , "ip"}, 
     
    3939                { "filetransfer.Send_file_to" , "Mandar arquivo para"}, 
    4040                { "filetransfer.To" , "Para"}, 
    41                 { "filetransfer.Transfer_complete" , "Transferência completa"}, 
     41                { "filetransfer.Transfer_complete" , "transferência completa"}, 
    4242                { "filetransfer.Transfer_File" , "Transferir arquivo"}, 
    4343                { "filetransfer.Transferring" , "Transferindo"}, 
     
    5959                { "xhtml.Size" , "Tamanho" }, 
    6060                { "xhtml.Style" , "Estilo" }, 
    61                 { "xhtml.Transfer_File" , "Transferência de Arquivo" }, 
     61                { "xhtml.Transfer_File" , "transferência de Arquivo" }, 
    6262                { "xhtml.The_font_used_when_sending_messages" , "A fonte usada para mandar mensagem" }, 
    6363                { "xhtml.The_quick_brown_fox_jumped_over_the_lazy_dogs" , "A ligeira raposa ultrapassou os lobos preguiçosos" },  
  • trunk/jabberit_messenger/java_source/src/nu/fw/jeti/util/I18N.java

    r1064 r1070  
    1 /* 
     1/** 
    22 * @Author(s) - Alexndre Correia 
    3  * 
    4  * This class is a wrapper for easier i18n of Jeti.  
    5  * It uses the standard i18n mechanisms given by Java.  
    6  *  
    73 * Created on - 30/06/2009 
    84 */ 
     
    106package nu.fw.jeti.util; 
    117 
     8import java.nio.charset.Charset; 
     9import java.nio.charset.CharsetDecoder; 
    1210import java.util.*; 
    1311 
     
    2119        private static HashMap messagesLangPlugins; 
    2220         
     21        private static String getEncoding() 
     22        { 
     23                CharsetDecoder decoder = Charset.defaultCharset().newDecoder(); 
     24        String charsetType = decoder.charset().toString(); 
     25         
     26        return charsetType; 
     27        } 
     28 
    2329        public static String getText(String type, String messageID) 
    2430        { 
     
    3945                //remove & 
    4046                int i = translation.indexOf("&"); 
    41                 if (i > -1) 
    42                 { 
     47                 
     48                if ( i > -1 ) 
    4349                        translation = translation.substring(0, i) + translation.substring(i + 1, translation.length()); 
    44                 } 
    4550 
    4651                return translation; 
     
    5863                if( translation == null ) 
    5964                { 
    60                         int dotPos = messageID.lastIndexOf('.'); 
     65                        translation = (String)messagesLangPlugins.get(messageID); 
    6166                         
    62                         if ( dotPos > 0 ) 
    63                                 messageID = messageID.substring(dotPos+1); 
    64                          
    65                         return messageID.replace('_',' ');                       
     67                        if( translation == null ) 
     68                        { 
     69                                int dotPos = messageID.lastIndexOf('.'); 
     70                                 
     71                                if ( dotPos > 0 ) 
     72                                        messageID = messageID.substring(dotPos+1); 
     73                                 
     74                                return messageID.replace('_',' '); 
     75                        } 
    6676                } 
    6777 
    68                 return translation;  
     78                // Encoding UTF-8/ISO-8859-1             
     79                try 
     80                { 
     81 
     82                        translation = new String(translation.getBytes("UTF-8"), "UTF-8"); 
     83 
     84                }catch(Exception e){} 
     85 
     86                return translation; 
    6987        } 
    7088 
     
    169187                Locale myLocale   = null; 
    170188 
    171                 if( myLanguage != "" ) 
     189                if( !myLanguage.equals("") && !myCountry.equals("") ) 
    172190                        myLocale = new Locale(myLanguage, myCountry); 
    173191                else 
    174192                        myLocale = new Locale("en", "US"); 
    175  
    176                 System.out.println("Valor de myLocale : " + myLocale); 
    177193                 
    178194                I18N.loadLanguages(myLocale); 
  • trunk/jabberit_messenger/java_source/src/nu/fw/jeti/util/Preferences.java

    r1064 r1070  
    104104        { 
    105105                /** 
    106                  * @author(s) : Alexandre Correia - alexandrecorreia@celepar.pr.gov.br 
    107                  * @brief : Adicionado as traduções para os items do menu ( presença ) 
     106                 * @Author(s) : Alexandre Correia - alexandrecorreia@celepar.pr.gov.br 
     107                 * @description : Adicionado as traducoes para os items do menu ( presenca ) 
    108108                 */ 
    109109                 
    110110                List tempList = new ArrayList(10); 
    111                         tempList.add("Disponível"); 
    112                         tempList.add("Livre p/ Chat"); 
     111                        tempList.add(I18N.gettext("initMessages.Available")); 
     112                        tempList.add(I18N.gettext("initMessages.Free_for_Chat")); 
    113113                        mapMessages.put("chat", tempList); 
    114114                        mapMessages.put("available", tempList); 
    115115                        tempList = new ArrayList(10); 
    116                         tempList.add("Em reunião"); 
    117                         tempList.add("Ocupado"); 
    118                         tempList.add("Trabalhando"); 
     116                        tempList.add(I18N.gettext("initMessages.In_a_meeting")); 
     117                        tempList.add(I18N.gettext("initMessages.Busy")); 
     118                        tempList.add(I18N.gettext("initMessages.Working")); 
    119119                        mapMessages.put("dnd", tempList); 
    120120                        tempList = new ArrayList(10); 
    121                         tempList.add("No telefone"); 
    122                         tempList.add("Volto Logo"); 
     121                        tempList.add(I18N.gettext("initMessages.On_the_phone")); 
     122                        tempList.add(I18N.gettext("initMessages.Be_right_back")); 
    123123                        mapMessages.put("away", tempList); 
    124124                        tempList = new ArrayList(10); 
    125                         tempList.add("Férias"); 
    126                         tempList.add("Em casa"); 
    127                         tempList.add("Ausente"); 
     125                        tempList.add(I18N.gettext("initMessages.On_vacation")); 
     126                        tempList.add(I18N.gettext("initMessages.Gone_home")); 
     127                        tempList.add(I18N.gettext("initMessages.Extend_Away")); 
    128128                        mapMessages.put("xa", tempList); 
    129129                 
     
    145145        { 
    146146                mapMessages.putAll(jetiExtension.getMessages()); 
    147                 //removed save message version check because it gives problems when 
    148                 //the server has removed the messages so there is no version 
    149 //              if(jetiExtension.getXmlVersion()==null) 
    150 //              {//on extension not found set save to true to try to overwrite 
    151 //                      save = true; 
    152 //              } 
    153 //              else  
    154 //              { 
    155 //                      try 
    156 //                      { 
    157 //                              //save if loaded xml version <= own xmlversion (backwards compatible) 
    158 //                              save = (Integer.parseInt(jetiExtension.getXmlVersion().substring(1)) <= Integer.parseInt(JetiPrivateExtension.XML_VERSION.substring(1))); 
    159 //                      } 
    160 //                      catch (Exception e) 
    161 //                      { 
    162 //                      } //exception not saven 
    163 //              } 
    164147        } 
    165148 
     
    172155        { 
    173156                mapMessages.put(convertPresenceKey(key), value); 
    174                 //if(save)backend.savePreferences(map,mapMessages); 
    175157        } 
    176158         
Note: See TracChangeset for help on using the changeset viewer.