I18N: Merge duplicate strings in notifications displayed when a new user has been created or added to the site.
Props ramiy. Fixes #35746. Built from https://develop.svn.wordpress.org/trunk@45542 git-svn-id: http://core.svn.wordpress.org/trunk@45353 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6b74e27d04
commit
4e4ef1170b
|
@ -86,12 +86,17 @@ if ( isset( $_GET['update'] ) ) {
|
|||
}
|
||||
}
|
||||
|
||||
if ( empty( $edit_link ) ) {
|
||||
$messages[] = __( 'User added.' );
|
||||
} else {
|
||||
/* translators: %s: edit page url */
|
||||
$messages[] = sprintf( __( 'User added. <a href="%s">Edit user</a>' ), $edit_link );
|
||||
$message = __( 'User added.' );
|
||||
|
||||
if ( $edit_link ) {
|
||||
$message .= sprintf(
|
||||
' <a href="%s">%s</a>',
|
||||
$edit_link,
|
||||
__( 'Edit user' )
|
||||
);
|
||||
}
|
||||
|
||||
$messages[] = $message;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -293,12 +293,17 @@ if ( isset( $_GET['update'] ) ) {
|
|||
$messages[] = __( 'Invitation email sent to user. A confirmation link must be clicked for them to be added to your site.' );
|
||||
break;
|
||||
case 'addnoconfirmation':
|
||||
if ( empty( $edit_link ) ) {
|
||||
$messages[] = __( 'User has been added to your site.' );
|
||||
} else {
|
||||
/* translators: %s: edit page url */
|
||||
$messages[] = sprintf( __( 'User has been added to your site. <a href="%s">Edit user</a>' ), $edit_link );
|
||||
$message = __( 'User has been added to your site.' );
|
||||
|
||||
if ( $edit_link ) {
|
||||
$message .= sprintf(
|
||||
' <a href="%s">%s</a>',
|
||||
$edit_link,
|
||||
__( 'Edit user' )
|
||||
);
|
||||
}
|
||||
|
||||
$messages[] = $message;
|
||||
break;
|
||||
case 'addexisting':
|
||||
$messages[] = __( 'That user is already a member of this site.' );
|
||||
|
|
|
@ -483,21 +483,23 @@ switch ( $wp_list_table->current_action() ) {
|
|||
$messages[] = '<div id="message" class="updated notice is-dismissible"><p>' . sprintf( $message, number_format_i18n( $delete_count ) ) . '</p></div>';
|
||||
break;
|
||||
case 'add':
|
||||
$message = __( 'New user created.' );
|
||||
|
||||
if ( isset( $_GET['id'] ) && ( $user_id = $_GET['id'] ) && current_user_can( 'edit_user', $user_id ) ) {
|
||||
/* translators: %s: edit page url */
|
||||
$messages[] = '<div id="message" class="updated notice is-dismissible"><p>' . sprintf(
|
||||
__( 'New user created. <a href="%s">Edit user</a>' ),
|
||||
$message .= sprintf(
|
||||
' <a href="%s">%s</a>',
|
||||
esc_url(
|
||||
add_query_arg(
|
||||
'wp_http_referer',
|
||||
urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ),
|
||||
self_admin_url( 'user-edit.php?user_id=' . $user_id )
|
||||
)
|
||||
)
|
||||
) . '</p></div>';
|
||||
} else {
|
||||
$messages[] = '<div id="message" class="updated notice is-dismissible"><p>' . __( 'New user created.' ) . '</p></div>';
|
||||
),
|
||||
__( 'Edit user' )
|
||||
);
|
||||
}
|
||||
|
||||
$messages[] = '<div id="message" class="updated notice is-dismissible"><p>' . $message . '</p></div>';
|
||||
break;
|
||||
case 'promote':
|
||||
$messages[] = '<div id="message" class="updated notice is-dismissible"><p>' . __( 'Changed roles.' ) . '</p></div>';
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.3-alpha-45541';
|
||||
$wp_version = '5.3-alpha-45542';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue