How to translate wordpress error message

I was able to solve my problem, follow the code in case someone needs the solution:

add_filter('login_errors','login_error_message');

    function login_error_message($error){
        //check if that's the error you are looking for
        $pos = strpos($error, 'incorrect');
        if (is_int($pos)) {
            //its the right error so you can overwrite it
            $error = "Um ou mais campo estão em branco ou dados não existem!";
        }
        return $error;
    }

Source from where I located the answer:
Change login error messages