Support » Plugin: WP User Manager - User Profile Builder & Membership » Unable to translate ERROR text on login page

  • Resolved wp-fred

    (@wp-fred-1)


    Hello Team,

    I like WP User Manager (currently version 2.4.2) very much.

    I am using the loco translate plugin and trying to translate to Dutch. I followed the steps on: https://docs.wpusermanager.com/article/181-how-to-use-loco-translate-for-wp-user-manager and most of the text is translated succesfully.

    Although I do have a problem with translating the error-message when user tries to login with wrong username/password. Also when user leaves username or password fields empty the text on the popup can not be translated.

    My login-page is using shortcode: [wpum_login_form psw_link=”no” register_link=”no”]

    Do you recognize this problem, can this be solved?

    Thanks!

    wp-fred

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author WP User Manager

    (@wpusermanager)

    Hey @wp-fred-1

    Those error messages actually come from WordPress, so you can try and translate with Loco for core WordPress strings, or you can use this code to edit the message https://gist.github.com/wp-user-manager/e8ca68f2857999deeeaafa6600ba03d7

    Thread Starter wp-fred

    (@wp-fred-1)

    Hello Team,

    I have impression the error message comes from WP User Manager itself, since the DIV has a class called “class=”wpum-message error”.

    When I open the login page while I am already logged in, I get a simulair kind of error message: “You are currently logged in as %s.” Which I have been able to translate using Loco Translate properly.

    Problem, the message “ERROR: The username or password you entered is incorrect” I am unable to find in Loco Translate.

    Could you have a check where error message is coming from?

    Thanks!
    wp-fred

    Plugin Author WP User Manager

    (@wpusermanager)

    WP User Manager takes the error from WordPress or another plugin on login, and displays it in it’s DIV, hence the class.

    It looks like this is actually coming from the Wordfence plugin

    Thread Starter wp-fred

    (@wp-fred-1)

    Hi Team,

    Thank you for pointing me in the right direction. Indeed Wordfence is responsible for the text. Users are asking already for over 2 years for a fix.

    https://wordpress.org/support/topic/cant-translate-error-the-username-or-password-you-entered-is-incorrect

    Found workaround via link above.

    // Translate English to Dutch

    function wpfred_custom_translation( $translated, $original, $domain ) {

    switch ($original) {
    case ‘ERROR: The username or password you entered is incorrect. Lost your password?’:
    $translated = ‘Fout: Gebruikersnaam, E-mailadres of wachtwoord is onjuist.’;
    break;
    }
    return $translated;
    }

    add_filter( ‘gettext’, ‘wpfred_custom_translation’, 10, 3 );

    Thanks you so much for help!
    wp-fred

    • This reply was modified 1 year ago by wp-fred.
    Thread Starter wp-fred

    (@wp-fred-1)

    Hi Team,

    What about the Account-page with shortcode [wpum_account]. I noticed there is a place to upload profile picture. I am unable to translate the text on the button “Browse” and text right of the button called “No file selected” and the text below the button “Maximum file size:”.

    How could I translate this text?

    Thanks!
    wp-fred

    Plugin Author WP User Manager

    (@wpusermanager)

    Hey @wp-fred-1, are you using something like Loco Translate to translate the plugin strings? https://docs.wpusermanager.com/article/181-how-to-use-loco-translate-for-wp-user-manager

    Thread Starter wp-fred

    (@wp-fred-1)

    Hi Team,

    Yes, indeed. I am using Loco Translate plugin.

    Thanks
    wp-fred

    Plugin Author WP User Manager

    (@wpusermanager)

    Are those strings not available? I’ve just searched on my site for “Maximum file size” and found 3 strings to translate.

    Thread Starter wp-fred

    (@wp-fred-1)

    Hi Team,

    Yes I found 3 strings as well, translated them, but without effect on front-end. While other strings are translated correctly with Loco Translate plugin.

    Thanks
    wp-fred

    Plugin Author WP User Manager

    (@wpusermanager)

    That’s strange – I’ve just managed to translate them. Can you send me a message via https://wpusermanager.com/contact/ so I can troubleshoot more please

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Unable to translate ERROR text on login page’ is closed to new replies.