Complemento Tradução

12

Algumas pessoas me questionaram que a tradução do painel do cliente não traduziu 100% o painel do cliente, de forma especial quando o cliente vai cadastrar a senha. Ficam restando a tradução da palavra Password Strength, Weak, Moderate e Strong. Essas palavras não estão localizados na pasta /www/seuwhmcs/lang/ e por isso não tive como traduzir.

Sem Tradução (Original)

O objetivo desse post é ensinar a você a traduzir essas palavras que restam.

Traduzido

Basta acessar a pasta /www/seuwhmcswhmcs/includes/jscript/ e editar o arquivo pwstrength.js

Coloque o contéudo abaixo e pronto.

$(document).ready(function(){
    $("#newpw").keyup(function () {
        var pwvalue = $("#newpw").val();
        var pwstrength = getPasswordStrength(pwvalue);
        $("#pwstrength").html("Forte");
        $("#pwstrengthpos").css("background-color","#33CC00");
        if (pwstrength<75) {
            $("#pwstrength").html("Média");
            $("#pwstrengthpos").css("background-color","#ff6600");
        }
        if (pwstrength<30) {
            $("#pwstrength").html("Fraca");
            $("#pwstrengthpos").css("background-color","#cc0000");
        }
        $("#pwstrengthpos").css("width",pwstrength);
        $("#pwstrengthneg").css("width",100-pwstrength);
    });
});

function getPasswordStrength(pw){
    var pwlength=(pw.length);
    if(pwlength>5)pwlength=5;
    var numnumeric=pw.replace(/[0-9]/g,"");
    var numeric=(pw.length-numnumeric.length);
    if(numeric>3)numeric=3;
    var symbols=pw.replace(/W/g,"");
    var numsymbols=(pw.length-symbols.length);
    if(numsymbols>3)numsymbols=3;
    var numupper=pw.replace(/[A-Z]/g,"");
    var upper=(pw.length-numupper.length);
    if(upper>3)upper=3;
    var pwstrength=((pwlength*10)-20)+(numeric*10)+(numsymbols*15)+(upper*10);
    if(pwstrength<0){pwstrength=0}
    if(pwstrength>100){pwstrength=100}
    return pwstrength;
}

function showStrengthBar() {
    document.write(‘<table align="center"><tr><td>Qualidade da Senha:</td><td width="102"><div id="pwstrengthpos" style="position:relative;float:left;width:0px;background-color:#33CC00;border:1px solid #000;border-right:0px;">&nbsp;</div><div id="pwstrengthneg" style="position:relative;float:right;width:100px;background-color:#efefef;border:1px solid #000;border-left:0px;">&nbsp;</div></td><td><div id="pwstrength">Fraca</div></td></tr></table>’);
}

Caso ache dificil editar substitua o arquivo já pronto, faça o download [Download não encontrado.].

Depois irei postar alguma imagens da tradução do admin da v4 que já está sendo comercializada em https://servicos.edvan.com.br

12 COMENTÁRIOS

  1. Hum! Legal, não uso a versão 4 e nem pretendo, mas valeu por compartilhar.

    O negócio é; cadê o Adaptbill? (risos)
    • news
    • features
    • screenshots

    Oh mês de junho demorado rs

  2. Hum! Legal, não uso a versão 4 e nem pretendo, mas valeu por compartilhar.

    O negócio é; cadê o Adaptbill? (risos)
    • news
    • features
    • screenshots

    Oh mês de junho demorado rs

  3. Só se for junho de 2010.
    Adaptbill e copa do mundo, nada mal.
    Estranho a HD não se pronunciar a respeito e, ainda deixar uma bela propaganda na inicial de seu site sobre o WHMCS.

  4. Só se for junho de 2010.
    Adaptbill e copa do mundo, nada mal.
    Estranho a HD não se pronunciar a respeito e, ainda deixar uma bela propaganda na inicial de seu site sobre o WHMCS.

DEIXE UMA RESPOSTA

Please enter your comment!
Please enter your name here