I18N: Add translator comments for strings in _deprecated_*()
functions.
See #38862. git-svn-id: https://develop.svn.wordpress.org/trunk@39315 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
d9c848142e
commit
b706194ec3
@ -3778,17 +3778,21 @@ 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
|
||||
trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.'), $function, $version ) );
|
||||
} else {
|
||||
if ( ! is_null( $replacement ) )
|
||||
/* 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 ) ) {
|
||||
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,17 +3906,21 @@ 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
|
||||
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 ) )
|
||||
/* 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 ) ) {
|
||||
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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Mark a function argument as deprecated and inform when it has been used.
|
||||
@ -3962,17 +3970,21 @@ 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
|
||||
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 ) )
|
||||
/* 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 ) ) {
|
||||
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 );
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user