I18N: Add translator comments for strings in _deprecated_*() functions.

See #38862.
Built from https://develop.svn.wordpress.org/trunk@39315


git-svn-id: http://core.svn.wordpress.org/trunk@39255 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2016-11-19 02:39:33 +00:00
parent 285a774cad
commit 725a04d815
2 changed files with 27 additions and 13 deletions

View File

@ -3778,15 +3778,19 @@ function _deprecated_function( $function, $version, $replacement = null ) {
*/
if ( WP_DEBUG && apply_filters( 'deprecated_function_trigger_error', true ) ) {
if ( function_exists( '__' ) ) {
if ( ! is_null( $replacement ) )
if ( ! is_null( $replacement ) ) {
/* translators: 1: PHP function name, 2: version number, 3: alternative function name */
trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.'), $function, $version, $replacement ) );
else
} else {
/* translators: 1: PHP function name, 2: version number */
trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.'), $function, $version ) );
}
} else {
if ( ! is_null( $replacement ) )
if ( ! is_null( $replacement ) ) {
trigger_error( sprintf( '%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.', $function, $version, $replacement ) );
else
} else {
trigger_error( sprintf( '%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.', $function, $version ) );
}
}
}
}
@ -3902,15 +3906,19 @@ function _deprecated_file( $file, $version, $replacement = null, $message = '' )
if ( WP_DEBUG && apply_filters( 'deprecated_file_trigger_error', true ) ) {
$message = empty( $message ) ? '' : ' ' . $message;
if ( function_exists( '__' ) ) {
if ( ! is_null( $replacement ) )
if ( ! is_null( $replacement ) ) {
/* translators: 1: PHP file name, 2: version number, 3: alternative file name */
trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.'), $file, $version, $replacement ) . $message );
else
} else {
/* translators: 1: PHP file name, 2: version number */
trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.'), $file, $version ) . $message );
}
} else {
if ( ! is_null( $replacement ) )
if ( ! is_null( $replacement ) ) {
trigger_error( sprintf( '%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.', $file, $version, $replacement ) . $message );
else
} else {
trigger_error( sprintf( '%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.', $file, $version ) . $message );
}
}
}
}
@ -3962,15 +3970,19 @@ function _deprecated_argument( $function, $version, $message = null ) {
*/
if ( WP_DEBUG && apply_filters( 'deprecated_argument_trigger_error', true ) ) {
if ( function_exists( '__' ) ) {
if ( ! is_null( $message ) )
if ( ! is_null( $message ) ) {
/* translators: 1: PHP function name, 2: version number, 3: optional message regarding the change */
trigger_error( sprintf( __('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s'), $function, $version, $message ) );
else
} else {
/* translators: 1: PHP function name, 2: version number */
trigger_error( sprintf( __('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.'), $function, $version ) );
}
} else {
if ( ! is_null( $message ) )
if ( ! is_null( $message ) ) {
trigger_error( sprintf( '%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s', $function, $version, $message ) );
else
} else {
trigger_error( sprintf( '%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.', $function, $version ) );
}
}
}
}
@ -4018,8 +4030,10 @@ function _deprecated_hook( $hook, $version, $replacement = null, $message = null
if ( WP_DEBUG && apply_filters( 'deprecated_hook_trigger_error', true ) ) {
$message = empty( $message ) ? '' : ' ' . $message;
if ( ! is_null( $replacement ) ) {
/* translators: 1: PHP hook name, 2: version number, 3: alternative hook name */
trigger_error( sprintf( __( '%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.' ), $hook, $version, $replacement ) . $message );
} else {
/* translators: 1: PHP hook name, 2: version number */
trigger_error( sprintf( __( '%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.' ), $hook, $version ) . $message );
}
}

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.7-beta4-39314';
$wp_version = '4.7-beta4-39315';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.