I18N: Merge similar strings in `_deprecated_argument()` calls.

Add translator comments.

Props ramiy, SergeyBiryukov.
Fixes #39020.
Built from https://develop.svn.wordpress.org/trunk@40028


git-svn-id: http://core.svn.wordpress.org/trunk@39965 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2017-01-29 11:50:41 +00:00
parent b0bcea2a18
commit 9d7ea04936
6 changed files with 68 additions and 14 deletions

View File

@ -1207,12 +1207,22 @@ function add_settings_section($id, $title, $callback, $page) {
global $wp_settings_sections;
if ( 'misc' == $page ) {
_deprecated_argument( __FUNCTION__, '3.0.0', sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ), 'misc' ) );
_deprecated_argument( __FUNCTION__, '3.0.0',
/* translators: %s: misc */
sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ),
'misc'
)
);
$page = 'general';
}
if ( 'privacy' == $page ) {
_deprecated_argument( __FUNCTION__, '3.5.0', sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ), 'privacy' ) );
_deprecated_argument( __FUNCTION__, '3.5.0',
/* translators: %s: privacy */
sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ),
'privacy'
)
);
$page = 'reading';
}
@ -1258,12 +1268,22 @@ function add_settings_field($id, $title, $callback, $page, $section = 'default',
global $wp_settings_fields;
if ( 'misc' == $page ) {
_deprecated_argument( __FUNCTION__, '3.0.0', __( 'The miscellaneous options group has been removed. Use another settings group.' ) );
_deprecated_argument( __FUNCTION__, '3.0.0',
/* translators: %s: misc */
sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ),
'misc'
)
);
$page = 'general';
}
if ( 'privacy' == $page ) {
_deprecated_argument( __FUNCTION__, '3.5.0', __( 'The privacy options group has been removed. Use another settings group.' ) );
_deprecated_argument( __FUNCTION__, '3.5.0',
/* translators: %s: privacy */
sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ),
'privacy'
)
);
$page = 'reading';
}

View File

@ -342,8 +342,8 @@ function wp_dropdown_categories( $args = '' ) {
// Back compat.
if ( isset( $args['type'] ) && 'link' == $args['type'] ) {
/* translators: 1: "type => link", 2: "taxonomy => link_category" alternative */
_deprecated_argument( __FUNCTION__, '3.0.0',
/* translators: 1: "type => link", 2: "taxonomy => link_category" */
sprintf( __( '%1$s is deprecated. Use %2$s instead.' ),
'<code>type => link</code>',
'<code>taxonomy => link_category</code>'

View File

@ -41,8 +41,8 @@ function get_categories( $args = '' ) {
// Back compat
if ( isset($args['type']) && 'link' == $args['type'] ) {
/* translators: 1: "type => link", 2: "taxonomy => link_category" alternative */
_deprecated_argument( __FUNCTION__, '3.0.0',
/* translators: 1: "type => link", 2: "taxonomy => link_category" */
sprintf( __( '%1$s is deprecated. Use %2$s instead.' ),
'<code>type => link</code>',
'<code>taxonomy => link_category</code>'

View File

@ -1713,9 +1713,17 @@ class WP_Query {
$page = 1;
if ( isset( $q['caller_get_posts'] ) ) {
_deprecated_argument( 'WP_Query', '3.1.0', __( '"caller_get_posts" is deprecated. Use "ignore_sticky_posts" instead.' ) );
if ( !isset( $q['ignore_sticky_posts'] ) )
_deprecated_argument( 'WP_Query', '3.1.0',
/* translators: 1: caller_get_posts, 2: ignore_sticky_posts */
sprintf( __( '%1$s is deprecated. Use %2$s instead.' ),
'<code>caller_get_posts</code>',
'<code>ignore_sticky_posts</code>'
)
);
if ( ! isset( $q['ignore_sticky_posts'] ) ) {
$q['ignore_sticky_posts'] = $q['caller_get_posts'];
}
}
if ( !isset( $q['ignore_sticky_posts'] ) )

View File

@ -1913,12 +1913,22 @@ function register_setting( $option_group, $option_name, $args = array() ) {
}
if ( 'misc' == $option_group ) {
_deprecated_argument( __FUNCTION__, '3.0.0', sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ), 'misc' ) );
_deprecated_argument( __FUNCTION__, '3.0.0',
/* translators: %s: misc */
sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ),
'misc'
)
);
$option_group = 'general';
}
if ( 'privacy' == $option_group ) {
_deprecated_argument( __FUNCTION__, '3.5.0', sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ), 'privacy' ) );
_deprecated_argument( __FUNCTION__, '3.5.0',
/* translators: %s: privacy */
sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ),
'privacy'
)
);
$option_group = 'reading';
}
@ -1949,12 +1959,22 @@ function unregister_setting( $option_group, $option_name, $deprecated = '' ) {
global $new_whitelist_options, $wp_registered_settings;
if ( 'misc' == $option_group ) {
_deprecated_argument( __FUNCTION__, '3.0.0', sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ), 'misc' ) );
_deprecated_argument( __FUNCTION__, '3.0.0',
/* translators: %s: misc */
sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ),
'misc'
)
);
$option_group = 'general';
}
if ( 'privacy' == $option_group ) {
_deprecated_argument( __FUNCTION__, '3.5.0', sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ), 'privacy' ) );
_deprecated_argument( __FUNCTION__, '3.5.0',
/* translators: %s: privacy */
sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ),
'privacy'
)
);
$option_group = 'reading';
}
@ -1963,7 +1983,13 @@ function unregister_setting( $option_group, $option_name, $deprecated = '' ) {
unset( $new_whitelist_options[ $option_group ][ $pos ] );
}
if ( '' !== $deprecated ) {
_deprecated_argument( __FUNCTION__, '4.7.0', __( '$sanitize_callback is deprecated. The callback from register_setting() is used instead.' ) );
_deprecated_argument( __FUNCTION__, '4.7.0',
/* translators: 1: $sanitize_callback, 2: register_setting() */
sprintf( __( '%1$s is deprecated. The callback from %2$s is used instead.' ),
'<code>$sanitize_callback</code>',
'<code>register_setting()</code>'
)
);
remove_filter( "sanitize_option_{$option_name}", $deprecated );
}

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.8-alpha-40027';
$wp_version = '4.8-alpha-40028';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.