Site Health: Use an established pattern for numbered placeholders in translator comments in WP_Debug_Data.

See #46683.

git-svn-id: https://develop.svn.wordpress.org/trunk@45102 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2019-04-02 22:17:18 +00:00
parent ffbc0e3b4e
commit 3b7028104b

View File

@ -304,7 +304,7 @@ class WP_Debug_Data {
$info['wp-core']['fields']['dotorg_communication'] = array( $info['wp-core']['fields']['dotorg_communication'] = array(
'label' => __( 'Communication with WordPress.org' ), 'label' => __( 'Communication with WordPress.org' ),
'value' => sprintf( 'value' => sprintf(
// translators: %1$s: The IP address WordPress.org resolves to. %2$s: The error returned by the lookup. // translators: 1: The IP address WordPress.org resolves to. 2: The error returned by the lookup.
__( 'Unable to reach WordPress.org at %1$s: %2$s' ), __( 'Unable to reach WordPress.org at %1$s: %2$s' ),
gethostbyname( 'wordpress.org' ), gethostbyname( 'wordpress.org' ),
$wp_dotorg->get_error_message() $wp_dotorg->get_error_message()
@ -677,7 +677,7 @@ class WP_Debug_Data {
$plugin_version_string = __( 'No version or author information is available.' ); $plugin_version_string = __( 'No version or author information is available.' );
if ( ! empty( $plugin_version ) && ! empty( $plugin_author ) ) { if ( ! empty( $plugin_version ) && ! empty( $plugin_author ) ) {
// translators: %1$s: Plugin version number. %2$s: Plugin author name. // translators: 1: Plugin version number. 2: Plugin author name.
$plugin_version_string = sprintf( __( 'Version %1$s by %2$s' ), $plugin_version, $plugin_author ); $plugin_version_string = sprintf( __( 'Version %1$s by %2$s' ), $plugin_version, $plugin_author );
} }
if ( empty( $plugin_version ) && ! empty( $plugin_author ) ) { if ( empty( $plugin_version ) && ! empty( $plugin_author ) ) {
@ -708,7 +708,7 @@ class WP_Debug_Data {
$plugin_version_string = __( 'No version or author information is available.' ); $plugin_version_string = __( 'No version or author information is available.' );
if ( ! empty( $plugin_version ) && ! empty( $plugin_author ) ) { if ( ! empty( $plugin_version ) && ! empty( $plugin_author ) ) {
// translators: %1$s: Plugin version number. %2$s: Plugin author name. // translators: 1: Plugin version number. 2: Plugin author name.
$plugin_version_string = sprintf( __( 'Version %1$s by %2$s' ), $plugin_version, $plugin_author ); $plugin_version_string = sprintf( __( 'Version %1$s by %2$s' ), $plugin_version, $plugin_author );
} }
if ( empty( $plugin_version ) && ! empty( $plugin_author ) ) { if ( empty( $plugin_version ) && ! empty( $plugin_author ) ) {
@ -798,7 +798,7 @@ class WP_Debug_Data {
$theme_version_string = __( 'No version or author information is available.' ); $theme_version_string = __( 'No version or author information is available.' );
if ( ! empty( $theme_version ) && ! empty( $theme_author ) ) { if ( ! empty( $theme_version ) && ! empty( $theme_author ) ) {
// translators: %1$s: Theme version number. %2$s: Theme author name. // translators: 1: Theme version number. 2: Theme author name.
$theme_version_string = sprintf( __( 'Version %1$s by %2$s' ), $theme_version, wp_kses( $theme_author, array() ) ); $theme_version_string = sprintf( __( 'Version %1$s by %2$s' ), $theme_version, wp_kses( $theme_author, array() ) );
} }
if ( empty( $theme_version ) && ! empty( $theme_author ) ) { if ( empty( $theme_version ) && ! empty( $theme_author ) ) {
@ -819,7 +819,7 @@ class WP_Debug_Data {
$info['wp-themes']['fields'][ sanitize_key( $theme->Name ) ] = array( $info['wp-themes']['fields'][ sanitize_key( $theme->Name ) ] = array(
'label' => sprintf( 'label' => sprintf(
// translators: %1$s: Theme name. %2$s: Theme slug. // translators: 1: Theme name. 2: Theme slug.
__( '%1$s (%2$s)' ), __( '%1$s (%2$s)' ),
// phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
$theme->Name, $theme->Name,