Make WordPress Core


Ignore:
Timestamp:
01/28/2026 01:06:35 AM (4 months ago)
Author:
wildworks
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-styles.php

    r61463 r61542  
    494494    protected function get_dependency_warning_message( $handle, $missing_dependency_handles ) {
    495495        return sprintf(
    496             /* translators: 1: Style handle, 2: Comma-separated list of missing dependency handles. */
     496            /* translators: 1: Style handle, 2: List of missing dependency handles. */
    497497            __( 'The style with the handle "%1$s" was enqueued with dependencies that are not registered: %2$s.' ),
    498498            $handle,
    499             implode( ', ', $missing_dependency_handles )
     499            implode( wp_get_list_item_separator(), $missing_dependency_handles )
    500500        );
    501501    }
Note: See TracChangeset for help on using the changeset viewer.