From 0f8bdeb2633cfea0764241269c344bd60a760817 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 8 Apr 2022 00:03:05 +0000 Subject: [PATCH] I18N: Add missing translator comment for application password helper text for Super Admins. Follow-up to [53101]. See #53234. Built from https://develop.svn.wordpress.org/trunk@53102 git-svn-id: http://core.svn.wordpress.org/trunk@52691 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/authorize-application.php | 10 +++++++--- wp-admin/user-edit.php | 10 +++++++--- wp-includes/version.php | 2 +- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/wp-admin/authorize-application.php b/wp-admin/authorize-application.php index 641721ebae..1bcf07b77c 100644 --- a/wp-admin/authorize-application.php +++ b/wp-admin/authorize-application.php @@ -161,25 +161,29 @@ require_once ABSPATH . 'wp-admin/admin-header.php'; if ( is_multisite() ) { $blogs = get_blogs_of_user( $user->ID, true ); $blogs_count = count( $blogs ); + if ( $blogs_count > 1 ) { ?>

the %2$s site in this installation that you have permissions on.', 'This will grant access to all %2$s sites in this installation that you have permissions on.', $blogs_count ); + if ( is_super_admin() ) { - $msg_fmt = _n( + /* translators: 1: URL to my-sites.php, 2: Number of sites the user has. */ + $message = _n( 'This will grant access to the %2$s site on the network as you have Super Admin rights.', 'This will grant access to all %2$s sites on the network as you have Super Admin rights.', $blogs_count ); } + printf( - $msg_fmt, + $message, admin_url( 'my-sites.php' ), number_format_i18n( $blogs_count ) ); diff --git a/wp-admin/user-edit.php b/wp-admin/user-edit.php index 82a3db1bb1..2fa5de8732 100644 --- a/wp-admin/user-edit.php +++ b/wp-admin/user-edit.php @@ -742,25 +742,29 @@ switch ( $action ) { if ( is_multisite() ) : $blogs = get_blogs_of_user( $user_id, true ); $blogs_count = count( $blogs ); + if ( $blogs_count > 1 ) : ?>

the %2$s site in this installation that you have permissions on.', 'Application passwords grant access to all %2$s sites in this installation that you have permissions on.', $blogs_count ); + if ( is_super_admin( $user_id ) ) { - $msg_fmt = _n( + /* translators: 1: URL to my-sites.php, 2: Number of sites the user has. */ + $message = _n( 'Application passwords grant access to the %2$s site on the network as you have Super Admin rights.', 'Application passwords grant access to all %2$s sites on the network as you have Super Admin rights.', $blogs_count ); } + printf( - $msg_fmt, + $message, admin_url( 'my-sites.php' ), number_format_i18n( $blogs_count ) ); diff --git a/wp-includes/version.php b/wp-includes/version.php index b48363fede..4d355795bf 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.0-alpha-53101'; +$wp_version = '6.0-alpha-53102'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.