FYI: Translation Issue

Hi,

is it possible to make ‘Invalid’ translatable ins the next version? And if possible don’t use ‘strtolower’ as it doesn’t work for the German language.

Thanks

Thorsten

function signup_code_filter_wpmu($content) {
$signup_code = get_site_option('signup_code');
if ( !empty( $signup_code ) ) {
if($signup_code != $_POST['signup_code'] && $_POST['stage'] == 'validate-user-signup') {
$content['errors']->add('signup_code', __('Invalid ' . strtolower(stripslashes(get_site_option('signup_code_branding', 'Signup Code'))) . '.', 'signup_code'));
}
}
return $content;
}

function signup_code_filter_bp() {
global $bp;
$signup_code = get_site_option('signup_code');
if ( !empty( $signup_code ) ) {
if($signup_code != $_POST['signup_code'] && isset($_POST['signup_username'])) {
$bp->signup->errors['signup_code'] = __('Invalid ' . strtolower(stripslashes(get_site_option('signup_code_branding', 'Signup Code'))) . '.', 'signup_code');
}
}
return $content;
}

  • Philip John
    • DEV MAN’s Apprentice

    Ah okay – I see why that’s happening. I think changing the code to this should fix it (with a newly generated pot file);

    function signup_code_filter_wpmu($content) {
    $signup_code = get_site_option('signup_code');
    if ( !empty( $signup_code ) ) {
    if($signup_code != $_POST['signup_code'] && $_POST['stage'] == 'validate-user-signup') {
    $content['errors']->add('signup_code', __('Invalid ') . strtolower(stripslashes(get_site_option('signup_code_branding', __('Signup Code')))) . '.', 'signup_code');
    }
    }
    return $content;
    }

    function signup_code_filter_bp() {
    global $bp;
    $signup_code = get_site_option('signup_code');
    if ( !empty( $signup_code ) ) {
    if($signup_code != $_POST['signup_code'] && isset($_POST['signup_username'])) {
    $bp->signup->errors['signup_code'] = __('Invalid ') . strtolower(stripslashes(get_site_option('signup_code_branding', __('Signup Code')))) . '.', 'signup_code';
    }
    }
    return $content;
    }

    However, I’ll pass this onto the developer for a proper fix…

    Cheers!

    Phil

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.