Ignore:
Timestamp:
03/19/08 11:59:26 (16 years ago)
Author:
wmerlotto
Message:

Internacionalizacao do ExpressoAdmin

Location:
trunk/expressoAdmin1_2/js/jscode
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoAdmin1_2/js/jscode/groups.js

    r86 r233  
    77         
    88        if (document.forms[0].cn.value == ''){ 
    9                 alert('Campo NOME do grupo está vazio.'); 
     9                alert(document.getElementById('group_name_field_is_empty').value); 
    1010                return; 
    1111        } 
    1212                 
    1313        if (document.forms[0].description.value == ''){ 
    14                 alert('Campo DESCRIÇÃO está vazio.'); 
     14                alert(document.getElementById('description_field_is_empty').value); 
    1515                return; 
    1616        } 
     
    2020                cn_tmp = document.forms[0].cn.value.split("-"); 
    2121                if ( (cn_tmp.length < 3) || ((cn_tmp[0] != 'grupo') && (cn_tmp[0] != 'smb')) ){ 
    22                         alert( 
    23                                 'O campo NOME do grupo está incompleto.\n' + 
    24                                 'O nome do grupo deve ser formado assim:\n' + 
    25                                 'grupo-ORGANIZACAO-NOME_DO_GRUPO.\n' + 
    26                                 'Ex: grupo-celepar-rh.'); 
     22                        alert(document.getElementById('field_name_is_incomplete').value); 
    2723                        return; 
    2824                } 
     
    3329         
    3430        if(!reCn.test(document.forms[0].cn.value)){ 
    35                 alert('Campo NOME DO GRUPO comtém caracteres não permitidos.'); 
     31                alert(document.getElementById('group_name_not_allowed').value); 
    3632                document.forms[0].cn.focus(); 
    3733                return; 
     
    3935 
    4036        if(!reDesc.test(document.forms[0].description.value)){ 
    41                 alert('Campo DESCRIÇÃO comtém caracteres não permitidos.'); 
     37                alert(document.getElementGroupById('description_field_not_allowed').value); 
    4238                document.forms[0].description.focus(); 
    4339                return; 
     
    4743        if ( (document.forms[0].email.value != '') && (!reEmail.test(document.forms[0].email.value)) ) 
    4844        { 
    49                 alert("Campo E-mail não é válido."); 
     45                alert(document.getElementById('field_name_is_incomplete').value); 
    5046                return false; 
    5147        } 
     
    9086                alert(data.msg); 
    9187        else{ 
    92                 alert('Grupo criado com êxito!'); 
     88                alert(document.getElementById('group_successfully_created').value); 
    9389                location.href="./index.php?menuaction=expressoAdmin1_2.uigroups.list_groups"; 
    9490        } 
     
    156152        if ((recursive) && (document.forms[0].ldap_context.value == document.getElementById('ea_combo_org_groups').value)) 
    157153        { 
    158                 alert('Nao é possível selecionar todos os usuários da organização raiz.') 
     154                alert(document.getElementById('not_possible_select_all_users').value) 
    159155                document.getElementById('ea_check_allUsers').checked = false; 
    160156 
     
    270266function delete_group(cn, gidnumber) 
    271267{ 
    272         if (confirm("Realmente deletar Grupo " + cn + " ??")) 
     268        if (confirm(document.getElementById('delete_group').value + cn + " ??")) 
    273269        { 
    274270                var handler_delete_group = function(data) 
     
    277273                                alert(data.msg); 
    278274                        else 
    279                                 alert('Grupo deletado com êxito!!'); 
     275                                alert(document.getElementById('group_successfully_deleted').value); 
    280276                         
    281277                        location.href="./index.php?menuaction=expressoAdmin1_2.uigroups.list_groups"; 
  • trunk/expressoAdmin1_2/js/jscode/maillists.js

    r208 r233  
    66         
    77        if (document.forms[0].uid.value == ''){ 
    8                 alert('Campo LOGIN da lista está vazio.'); 
     8                alert(document.getElementById('login_field_has_spaces').value); 
    99                return; 
    1010        } 
    1111 
    1212        if (document.forms[0].cn.value == ''){ 
    13                 alert('Campo NOME da lista está vazio.'); 
     13                alert(document.getElementById('list_email_field_is_empty').value); 
    1414                return; 
    1515        } 
     
    1919                uid_tmp = document.forms[0].uid.value.split("-"); 
    2020                if ((uid_tmp.length < 3) || (uid_tmp[0] != 'lista')){ 
    21                         alert( 
    22                                 'O campo LOGIN da lista está incompleto.\n' + 
    23                                 'O nome da lista deve ser formado assim:\n' + 
    24                                 'lista-ORGANIZACAO-NOME_DA_LISTA.\n' + 
    25                                 'Ex: lista-celepar-rh.'); 
     21                        alert(document.getElementById('login_field_incomplete').value); 
    2622                        return; 
    2723                } 
     
    2925                 
    3026        if (document.forms[0].uid.value.split(" ").length > 1){ 
    31                 alert('Campo LOGIN comtém espaços.'); 
     27                alert(document.getElementById('login_field_has_spaces').value); 
    3228                document.forms[0].uid.focus(); 
    3329                return; 
     
    3531         
    3632        if (document.forms[0].mail.value == ''){ 
    37                 alert('Campo E-MAIL da lista está vazio.'); 
     33                alert(document.getElementById('list_email_field_is_empty').value); 
    3834                document.forms[0].mail.focus(); 
    3935                return; 
     
    4137        var reEmail = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/; 
    4238        if(!reEmail.test(document.forms[0].mail.value)){ 
    43                 alert("Campo E-mail não é válido."); 
     39                alert(document.getElementById('field_email_is_invalid').value); 
    4440                return false; 
    4541        } 
     
    4743        select_userInMaillist = document.getElementById('ea_select_usersInMaillist'); 
    4844        if (select_userInMaillist.options.length == 0){ 
    49                 alert('Nenhum usuário faz parte da lista.'); 
     45                alert(document.getElementById('no_user_is_part_of_the_list').value); 
    5046                return; 
    5147        } 
     
    9591                alert(data.msg); 
    9692        else{ 
    97                 alert('Lista de emails criada com êxito!'); 
     93                alert(document.getElementById('email_list_successfully_created').value); 
    9894                location.href="./index.php?menuaction=expressoAdmin1_2.uimaillists.list_maillists"; 
    9995        } 
     
    112108                alert(data.msg); 
    113109        else{ 
    114                 alert('Lista de emails salva com êxito!!'); 
     110                alert(document.getElementById('email_list_successfully_saved').value); 
    115111                location.href="./index.php?menuaction=expressoAdmin1_2.uimaillists.list_maillists"; 
    116112        } 
     
    137133                alert(data.msg); 
    138134        else 
    139                 alert('Sending Control List salva com êxito!!'); 
     135                alert(document.getElementById('sending_control_list_successfully_saved').value); 
    140136        location.href="./index.php?menuaction=expressoAdmin1_2.uimaillists.list_maillists"; 
    141137        return; 
     
    185181        if ((recursive) && (document.forms[0].ldap_context.value == document.getElementById('ea_combo_org_maillists').value)) 
    186182        { 
    187                 alert('Nao é possível selecionar todos os usuários da organização raiz.') 
     183            alert(document.getElementById('it_is_not_possible_select_users').value); 
    188184                document.getElementById('ea_check_allUsers').checked = false; 
    189185                 
     
    358354function delete_maillist(uid, uidnumber) 
    359355{ 
    360         if (confirm("Realmente deletar Lista " + uid + " ??")) 
     356        if (confirm(document.getElementById('delete_list').value + uid + " ??")) 
    361357        { 
    362358                var handler_delete_maillist = function(data) 
     
    365361                                alert(data.msg); 
    366362                        else 
    367                                 alert('Lista de email deletada com êxito!!'); 
     363                                alert(document.getElementById('email_list_successfully_deleted'); 
    368364                         
    369365                        location.href="./index.php?menuaction=expressoAdmin1_2.uimaillists.list_maillists"; 
  • trunk/expressoAdmin1_2/js/jscode/managers.js

    r180 r233  
    22function copy_manager(manager) 
    33{ 
    4         var new_manager = prompt("Digite o login do novo gerente:",""); 
     4        var new_manager = prompt(document.getElementById('type_the_new_manager_login').value,""); 
    55         
    66        var handler_copy_manager = function(data) 
     
    99                        location.reload(); 
    1010                else 
    11                         alert('Erro ao copiar gerente.'); 
     11                        alert(document.getElementById('error_at_copy_manager').value); 
    1212        } 
    1313        cExecute ('$this.db_functions.copy_manager&manager='+manager+'&new_manager='+new_manager, handler_copy_manager); 
  • trunk/expressoAdmin1_2/js/jscode/users.js

    r208 r233  
    77                document.forms[0].uid.value = document.forms[0].uid.value.toLowerCase(); 
    88                if (document.forms[0].uid.value == ''){ 
    9                         alert('Campo LOGIN está vazio.'); 
     9                        alert(document.getElementById('login_field_empty').value); 
    1010                        return; 
    1111                } 
    1212                else if (document.forms[0].uid.value.length < document.forms[0].minimumSizeLogin.value){ 
    13                         alert('Campo LOGIN deve ter mais que '+document.forms[0].minimumSizeLogin.value+' caracteres.'); 
     13                        alert(document.getElementById('login_field_must_have').value + document.forms[0].minimumSizeLogin.value+document.getElementById('characters').value ); 
    1414                        return; 
    1515                } 
     
    2121                        var reUid = /^([a-zA-Z0-9_\-])+$/; 
    2222                if(!reUid.test(document.forms[0].uid.value)){ 
    23                         alert('Campo LOGIN comtém caracteres não permitidos.'); 
     23                        alert(document.getElementById('login_field_contains_not_allowed').value); 
    2424                        document.forms[0].account_lid.focus(); 
    2525                        return; 
     
    2828                //PASSWORD's 
    2929                if (document.forms[0].password1.value == ''){ 
    30                         alert('Campo SENHA está vazio.'); 
     30                        alert(document.getElementById('password_field_empty').value); 
    3131                        return; 
    3232                } 
    3333                if (document.forms[0].password2.value == ''){ 
    34                         alert('Campo RE-SENHA está vazio.'); 
     34                        alert(document.getElementById('re-password_field_empty').value); 
    3535                        return; 
    3636                } 
     
    3838 
    3939        if (document.forms[0].password1.value != document.forms[0].password2.value){ 
    40                 alert('Campo SENHA e RE-SENHA são diferentes.'); 
     40                alert(document.getElementById('pass_re-pass_diferents').value); 
    4141                return; 
    4242        } 
     
    4949                if(!re_employeenumber.test(document.forms[0].corporative_information_employeenumber.value)) 
    5050                { 
    51                         alert('Campo matrícula contém caracteres não permitidos. Somente números são permitidos.'); 
     51                        alert(document.getElementById('register_field_contains_not_allowed').value); 
    5252                        document.forms[0].corporative_information_employeenumber.focus(); 
    5353                        return; 
     
    6161                if(!re_cpf.test(document.forms[0].corporative_information_cpf.value)) 
    6262                { 
    63                         alert('Campo cpf contém caracteres não permitidos. Somente números são permitidos'); 
     63                        alert(document.getElementById('cpf_field_not_allowed').value); 
    6464                        document.forms[0].corporative_information_employeenumber.focus(); 
    6565                        return; 
     
    6868                if (! validarCPF(document.forms[0].corporative_information_cpf.value) ) 
    6969                { 
    70                         alert("Campo CPF invalido."); 
     70                        alert(document.getElementById('cpf_field_invalid').value); 
    7171                        document.forms[0].corporative_information_cpf.focus(); 
    7272                        return; 
     
    7777        document.forms[0].mail.value = document.forms[0].mail.value.toLowerCase(); 
    7878        if (document.forms[0].mail.value == ''){ 
    79                 alert('Campo E-MAIL está vazio.'); 
     79                alert(document.getElementById('email_field_empty').value); 
    8080                return; 
    8181        } 
    8282        var reEmail = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/; 
    8383        if(!reEmail.test(document.forms[0].mail.value)){ 
    84                 alert("Campo E-mail não é válido."); 
     84                alert(document.getElementById('email_field_not_valid').value); 
    8585                return false; 
    8686        } 
     
    8888        //FIRSTNAME 
    8989        if (document.forms[0].givenname.value == ''){ 
    90                 alert('Campo PRIMEIRO NOME está vazio.'); 
     90                alert(document.getElementById('first_name_empty').value); 
    9191                return; 
    9292        } 
     
    9494        //LASTNAME 
    9595        if (document.forms[0].sn.value == ''){ 
    96                 alert('Campo ÚLTIMO NOME está vazio.'); 
     96                alert(document.getElementById('last_name_empty').value); 
    9797                return; 
    9898        } 
     
    104104                if (!reg_tel.exec(document.forms[0].telephonenumber.value)) 
    105105                { 
    106                         alert('Campo Telefone incorreto.'); 
     106                        alert(document.getElementById('incorrect_telephone_field').value); 
    107107                        return; 
    108108                } 
     
    111111        //FORWAR ONLY 
    112112        if ((document.forms[0].deliverymode.checked) && (document.forms[0].mailforwardingaddress.value == '')){ 
    113                 alert('Campo E-MAIL DE ENCAMINHAMENTO está vazio.'); 
     113                alert(document.getElementById('redirect_email_empty').value); 
    114114                return; 
    115115        } 
     
    117117        // Email Quota 
    118118        if (document.forms[0].mailquota.value == ''){ 
    119                 alert('Usuário sem COTA.'); 
     119                alert(document.getElementById('without_quota').value); 
    120120                return; 
    121121        } 
     
    123123        //GROUPS 
    124124        if (document.getElementById('ea_select_user_groups').length < 1){ 
    125                 alert('Nenhum GRUPO selecionado.'); 
     125                alert(document.getElementById('no_group_selected').value); 
    126126                return; 
    127127        } 
     
    130130        if (document.getElementById('tabcontent6').style.display != 'none'){ 
    131131                if ((document.forms[0].sambalogonscript.value == '') && (!document.forms[0].sambalogonscript.disabled)){ 
    132                         alert('Script de logon do usuário está vazio.'); 
     132                        alert(document.getElementById('user_logon_script_empty').value); 
    133133                        return; 
    134134                } 
    135135                if ((document.forms[0].sambahomedirectory.value == '') && (!document.forms[0].sambahomedirectory.disabled)){ 
    136                         alert('Diretório Home do usuário está vazio.'); 
     136                        alert(document.getElementById('user_home_path_empty').value); 
    137137                        return; 
    138138                } 
     
    205205                alert(data.msg); 
    206206        else 
    207                 alert('Usuário criado com êxito!'); 
     207                alert(document.getElementById('user_successfully_created').value); 
    208208 
    209209        location.href="./index.php?menuaction=expressoAdmin1_2.uiaccounts.list_users"; 
     
    224224        } 
    225225        else{ 
    226                 alert('Usuário salvo com êxito!!'); 
     226                alert(document.getElementById('user_successfully_saved').value); 
    227227        } 
    228228        location.href="./index.php?menuaction=expressoAdmin1_2.uiaccounts.list_users"; 
     
    447447                        alert(data.msg); 
    448448                else 
    449                         alert('Senha default cadastrada com êxito!!'); 
     449                        alert(document.getElementById('default_password_successfully_registered_cadastre').value); 
    450450                return; 
    451451        } 
     
    460460                        alert(data.msg); 
    461461                else 
    462                         alert('Senha do usuário retornado com êxito!!'); 
     462                        alert(document.getElementById('user_password_returned_with_success').value); 
    463463                return; 
    464464        } 
     
    468468function delete_user(uid, uidnumber) 
    469469{ 
    470         if (confirm("Realmente deseja deletar o usuário " + uid + " ??")) 
     470        if (confirm(document.getElementById('delete_the_user').value + uid + " ??")) 
    471471        { 
    472472                var handler_delete_user = function(data) 
     
    475475                                alert(data.msg); 
    476476                        else 
    477                                 alert('Usuário deletado com êxito!!'); 
     477                                alert(document.getElementById('user_deleted_with_success').value); 
    478478                         
    479479                        location.href="./index.php?menuaction=expressoAdmin1_2.uiaccounts.list_users"; 
     
    491491                var reUid = /^([a-zA-Z0-9_\-])+$/; 
    492492 
    493         new_uid = prompt("Alterar login do usuário " + uid + " para: ", uid); 
     493        new_uid = prompt(document.getElementById('change_user_login').value + uid + document.getElementById('to').value, uid); 
    494494 
    495495        if(!reUid.test(new_uid)){ 
    496                 alert('Campo LOGIN comtém caracteres não permitidos.'); 
     496                alert(document.getElementById('login_field_contains_not_allowed').value); 
    497497                document.forms[0].account_lid.focus(); 
    498498                return; 
     
    527527                alert(data.msg); 
    528528        else{ 
    529                 alert("Usuário renomeado com êxito!\n" + data.exec_return); 
     529                alert(document.getElementById('user_renamed_success').value + "\n" + data.exec_return); 
    530530                location.href="./index.php?menuaction=expressoAdmin1_2.uiaccounts.list_users"; 
    531531        } 
     
    543543        clearTimeout(finderTimeout_maillist); 
    544544        var oWait = document.getElementById("ea_span_searching_maillist"); 
    545         oWait.innerHTML = 'Buscando...'; 
     545        oWait.innerHTML = document.getElementById('searching').value; 
    546546        finderTimeout_maillist = setTimeout("optionFinder_maillist('"+obj.id+"')",500); 
    547547} 
     
    577577        clearTimeout(finderTimeout_group); 
    578578        var oWait = document.getElementById("ea_span_searching_group"); 
    579         oWait.innerHTML = 'Buscando...'; 
     579        oWait.innerHTML = document.getElementById('searching').value; 
    580580        finderTimeout_group = setTimeout("optionFinder_group('"+obj.id+"')",500); 
    581581} 
     
    643643                else{ 
    644644                        cExecute ('$this.user.write_log_from_ajax&_action='+action+'&userinfo='+uid, handler_write_log); 
    645                         alert("Esvaziados '" + data.inbox_size + "' MB da caixa postal do usuário"); 
     645                        alert(document.getElementById('removed').value + data.inbox_size + document.getElementById('mb_from_the_user_mailbox').value); 
    646646                        document.getElementById('mailquota_used').value = data.mailquota_used; 
    647647                } 
Note: See TracChangeset for help on using the changeset viewer.