Script Loader: Use localized list separators in dependency warning messages.
Improve dependency warning messages so that list separators are localized according to the current locale when multiple dependencies are listed. Follow-up to [61323], [60999], [61357]. Props mukeshpanchal27, jorbin, westonruter, wildworks. See #64229. Built from https://develop.svn.wordpress.org/trunk@61542 git-svn-id: http://core.svn.wordpress.org/trunk@60853 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -569,10 +569,10 @@ class WP_Dependencies {
|
||||
*/
|
||||
protected function get_dependency_warning_message( $handle, $missing_dependency_handles ) {
|
||||
return sprintf(
|
||||
/* translators: 1: Handle, 2: Comma-separated list of missing dependency handles. */
|
||||
/* translators: 1: Handle, 2: List of missing dependency handles. */
|
||||
__( 'The handle "%1$s" was enqueued with dependencies that are not registered: %2$s.' ),
|
||||
$handle,
|
||||
implode( ', ', $missing_dependency_handles )
|
||||
implode( wp_get_list_item_separator(), $missing_dependency_handles )
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -739,10 +739,10 @@ class WP_Script_Modules {
|
||||
_doing_it_wrong(
|
||||
get_class( $this ) . '::register',
|
||||
sprintf(
|
||||
/* translators: 1: Script module ID, 2: Comma-separated list of missing dependency IDs. */
|
||||
/* translators: 1: Script module ID, 2: List of missing dependency IDs. */
|
||||
__( 'The script module with the ID "%1$s" was enqueued with dependencies that are not registered: %2$s.' ),
|
||||
$id,
|
||||
implode( ', ', $missing_dependencies )
|
||||
implode( wp_get_list_item_separator(), $missing_dependencies )
|
||||
),
|
||||
'6.9.1'
|
||||
);
|
||||
|
||||
@@ -1191,10 +1191,10 @@ JS;
|
||||
*/
|
||||
protected function get_dependency_warning_message( $handle, $missing_dependency_handles ) {
|
||||
return sprintf(
|
||||
/* translators: 1: Script handle, 2: Comma-separated list of missing dependency handles. */
|
||||
/* translators: 1: Script handle, 2: List of missing dependency handles. */
|
||||
__( 'The script with the handle "%1$s" was enqueued with dependencies that are not registered: %2$s.' ),
|
||||
$handle,
|
||||
implode( ', ', $missing_dependency_handles )
|
||||
implode( wp_get_list_item_separator(), $missing_dependency_handles )
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -493,10 +493,10 @@ class WP_Styles extends WP_Dependencies {
|
||||
*/
|
||||
protected function get_dependency_warning_message( $handle, $missing_dependency_handles ) {
|
||||
return sprintf(
|
||||
/* translators: 1: Style handle, 2: Comma-separated list of missing dependency handles. */
|
||||
/* translators: 1: Style handle, 2: List of missing dependency handles. */
|
||||
__( 'The style with the handle "%1$s" was enqueued with dependencies that are not registered: %2$s.' ),
|
||||
$handle,
|
||||
implode( ', ', $missing_dependency_handles )
|
||||
implode( wp_get_list_item_separator(), $missing_dependency_handles )
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '7.0-alpha-61539';
|
||||
$wp_version = '7.0-alpha-61542';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
||||
Reference in New Issue
Block a user