Consolidate some strings. Props pavelevap, SergeyBiryukov. see #21728
git-svn-id: https://develop.svn.wordpress.org/trunk@22124 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
b0cae159ea
commit
8d5ca186c2
@ -224,12 +224,12 @@ function send_confirmation_on_profile_email() {
|
||||
|
||||
if ( $current_user->user_email != $_POST['email'] ) {
|
||||
if ( !is_email( $_POST['email'] ) ) {
|
||||
$errors->add( 'user_email', __( "<strong>ERROR</strong>: The e-mail address isn't correct." ), array( 'form-field' => 'email' ) );
|
||||
$errors->add( 'user_email', __( "<strong>ERROR</strong>: The email address isn’t correct." ), array( 'form-field' => 'email' ) );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( $wpdb->get_var( $wpdb->prepare( "SELECT user_email FROM {$wpdb->users} WHERE user_email=%s", $_POST['email'] ) ) ) {
|
||||
$errors->add( 'user_email', __( "<strong>ERROR</strong>: The e-mail address is already used." ), array( 'form-field' => 'email' ) );
|
||||
$errors->add( 'user_email', __( "<strong>ERROR</strong>: The email address is already used." ), array( 'form-field' => 'email' ) );
|
||||
delete_option( $current_user->ID . '_new_email' );
|
||||
return;
|
||||
}
|
||||
|
@ -144,7 +144,7 @@ function edit_user( $user_id = 0 ) {
|
||||
if ( empty( $user->user_email ) ) {
|
||||
$errors->add( 'empty_email', __( '<strong>ERROR</strong>: Please enter an e-mail address.' ), array( 'form-field' => 'email' ) );
|
||||
} elseif ( !is_email( $user->user_email ) ) {
|
||||
$errors->add( 'invalid_email', __( '<strong>ERROR</strong>: The e-mail address isn’t correct.' ), array( 'form-field' => 'email' ) );
|
||||
$errors->add( 'invalid_email', __( '<strong>ERROR</strong>: The email address isn’t correct.' ), array( 'form-field' => 'email' ) );
|
||||
} elseif ( ( $owner_id = email_exists($user->user_email) ) && ( !$update || ( $owner_id != $user->ID ) ) ) {
|
||||
$errors->add( 'email_exists', __('<strong>ERROR</strong>: This email is already registered, please choose another one.'), array( 'form-field' => 'email' ) );
|
||||
}
|
||||
|
@ -127,7 +127,7 @@ if ( ! empty( $messages ) ) {
|
||||
<?php } else {
|
||||
echo $current_site->domain . $current_site->path ?><input name="blog[domain]" class="regular-text" type="text" title="<?php esc_attr_e( 'Domain' ) ?>"/>
|
||||
<?php }
|
||||
echo '<p>' . __( 'Only the characters a-z and 0-9 recommended.' ) . '</p>';
|
||||
echo '<p>' . __( 'Only lowercase letters (a-z) and numbers are allowed.' ) . '</p>';
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -165,7 +165,7 @@ switch($step) {
|
||||
foreach ( array( 'dbname', 'uname', 'pwd', 'dbhost', 'prefix' ) as $key )
|
||||
$$key = trim( stripslashes( $_POST[ $key ] ) );
|
||||
|
||||
$tryagain_link = '</p><p class="step"><a href="setup-config.php?step=1" onclick="javascript:history.go(-1);return false;" class="button">' . __( 'Try Again' ) . '</a>';
|
||||
$tryagain_link = '</p><p class="step"><a href="setup-config.php?step=1" onclick="javascript:history.go(-1);return false;" class="button">' . __( 'Try again' ) . '</a>';
|
||||
|
||||
if ( empty( $prefix ) )
|
||||
wp_die( __( '<strong>ERROR</strong>: "Table Prefix" must not be empty.' . $tryagain_link ) );
|
||||
|
@ -182,7 +182,7 @@ function add_user_to_blog( $blog_id, $user_id, $role ) {
|
||||
|
||||
if ( ! $user ) {
|
||||
restore_current_blog();
|
||||
return new WP_Error('user_does_not_exist', __('That user does not exist.'));
|
||||
return new WP_Error( 'user_does_not_exist', __( 'The requested user does not exist.' ) );
|
||||
}
|
||||
|
||||
if ( !get_user_meta($user_id, 'primary_blog', true) ) {
|
||||
@ -462,7 +462,7 @@ function wpmu_validate_user_signup($user_name, $user_email) {
|
||||
$errors->add('user_name', __('Sorry, usernames must have letters too!'));
|
||||
|
||||
if ( !is_email( $user_email ) )
|
||||
$errors->add('user_email', __( 'Please enter a correct email address.' ) );
|
||||
$errors->add('user_email', __( 'Please enter a valid email address.' ) );
|
||||
|
||||
$limited_email_domains = get_site_option( 'limited_email_domains' );
|
||||
if ( is_array( $limited_email_domains ) && empty( $limited_email_domains ) == false ) {
|
||||
@ -473,11 +473,11 @@ function wpmu_validate_user_signup($user_name, $user_email) {
|
||||
|
||||
// Check if the username has been used already.
|
||||
if ( username_exists($user_name) )
|
||||
$errors->add('user_name', __('Sorry, that username already exists!'));
|
||||
$errors->add( 'user_name', __( 'Sorry, that username already exists!' ) );
|
||||
|
||||
// Check if the email address has been used already.
|
||||
if ( email_exists($user_email) )
|
||||
$errors->add('user_email', __('Sorry, that email address is already used!'));
|
||||
$errors->add( 'user_email', __( 'Sorry, that email address is already used!' ) );
|
||||
|
||||
// Has someone already signed up for this username?
|
||||
$signup = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->signups WHERE user_login = %s", $user_name) );
|
||||
@ -553,7 +553,7 @@ function wpmu_validate_blog_signup($blogname, $blog_title, $user = '') {
|
||||
$errors->add('blogname', __( 'Please enter a site name.' ) );
|
||||
|
||||
if ( preg_match( '/[^a-z0-9]+/', $blogname ) )
|
||||
$errors->add('blogname', __( 'Only lowercase letters and numbers allowed.' ) );
|
||||
$errors->add('blogname', __( 'Only lowercase letters (a-z) and numbers are allowed.' ) );
|
||||
|
||||
if ( in_array( $blogname, $illegal_names ) == true )
|
||||
$errors->add('blogname', __( 'That name is not allowed.' ) );
|
||||
@ -590,7 +590,7 @@ function wpmu_validate_blog_signup($blogname, $blog_title, $user = '') {
|
||||
$path = $base.$blogname.'/';
|
||||
}
|
||||
if ( domain_exists($mydomain, $path, $current_site->id) )
|
||||
$errors->add('blogname', __('Sorry, that site already exists!'));
|
||||
$errors->add( 'blogname', __( 'Sorry, that site already exists!' ) );
|
||||
|
||||
if ( username_exists( $blogname ) ) {
|
||||
if ( is_object( $user ) == false || ( is_object($user) && ( $user->user_login != $blogname ) ) )
|
||||
@ -956,7 +956,7 @@ function wpmu_create_blog($domain, $path, $title, $user_id, $meta = '', $site_id
|
||||
|
||||
// Check if the domain has been used already. We should return an error message.
|
||||
if ( domain_exists($domain, $path, $site_id) )
|
||||
return new WP_Error('blog_taken', __('Site already exists.'));
|
||||
return new WP_Error( 'blog_taken', __( 'Sorry, that site already exists!' ) );
|
||||
|
||||
if ( !defined('WP_INSTALLING') )
|
||||
define( 'WP_INSTALLING', true );
|
||||
@ -1629,7 +1629,7 @@ function signup_nonce_check( $result ) {
|
||||
return $result;
|
||||
|
||||
if ( wp_create_nonce('signup_form_' . $_POST[ 'signup_form_id' ]) != $_POST['_signup_form'] )
|
||||
wp_die( __('Please try again!') );
|
||||
wp_die( __( 'Please try again.' ) );
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
@ -1305,7 +1305,7 @@ function wp_insert_user( $userdata ) {
|
||||
return new WP_Error('empty_user_login', __('Cannot create a user with an empty login name.') );
|
||||
|
||||
if ( !$update && username_exists( $user_login ) )
|
||||
return new WP_Error('existing_user_login', __('This username is already registered.') );
|
||||
return new WP_Error( 'existing_user_login', __( 'Sorry, that username already exists!' ) );
|
||||
|
||||
if ( empty($user_nicename) )
|
||||
$user_nicename = sanitize_title( $user_login );
|
||||
@ -1320,7 +1320,7 @@ function wp_insert_user( $userdata ) {
|
||||
$user_email = apply_filters('pre_user_email', $user_email);
|
||||
|
||||
if ( !$update && ! defined( 'WP_IMPORTING' ) && email_exists($user_email) )
|
||||
return new WP_Error('existing_user_email', __('This email address is already registered.') );
|
||||
return new WP_Error( 'existing_user_email', __( 'Sorry, that email address is already used!' ) );
|
||||
|
||||
if ( empty($nickname) )
|
||||
$nickname = $user_login;
|
||||
|
@ -315,7 +315,7 @@ function register_new_user( $user_login, $user_email ) {
|
||||
$errors->add( 'invalid_username', __( '<strong>ERROR</strong>: This username is invalid because it uses illegal characters. Please enter a valid username.' ) );
|
||||
$sanitized_user_login = '';
|
||||
} elseif ( username_exists( $sanitized_user_login ) ) {
|
||||
$errors->add( 'username_exists', __( '<strong>ERROR</strong>: This username is already registered, please choose another one.' ) );
|
||||
$errors->add( 'username_exists', __( '<strong>ERROR</strong>: This username is already registered. Please choose another one.' ) );
|
||||
}
|
||||
|
||||
// Check the e-mail address
|
||||
|
Loading…
Reference in New Issue
Block a user