Make WordPress Core

Changeset 57135


Ignore:
Timestamp:
11/25/2023 09:17:28 PM (18 months ago)
Author:
SergeyBiryukov
Message:

I18N: Move code out of translatable strings in a few error messages.

Follow-up to [54272], [56101].

Props rabmalin, Presskopp.
Fixes #59563.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

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

    r56991 r57135  
    674674            if ( null === $color ) {
    675675                $error_message = sprintf(
    676                     /* translators: %s: duotone colors */
    677                     __( '"%s" in theme.json settings.color.duotone is not a hex or rgb string.' ),
    678                     $color_str
     676                    /* translators: 1: Duotone colors, 2: theme.json, 3: settings.color.duotone */
     677                    __( '"%1$s" in %2$s %3$s is not a hex or rgb string.' ),
     678                    $color_str,
     679                    'theme.json',
     680                    'settings.color.duotone'
    679681                );
    680682                _doing_it_wrong( __METHOD__, $error_message, '6.3.0' );
     
    901903        if ( ! array_key_exists( $filter_id, $global_styles_presets ) ) {
    902904            $error_message = sprintf(
    903                 /* translators: %s: duotone filter ID */
    904                 __( 'The duotone id "%s" is not registered in theme.json settings' ),
    905                 $filter_id
     905                /* translators: 1: Duotone filter ID, 2: theme.json */
     906                __( 'The duotone id "%1$s" is not registered in %2$s settings' ),
     907                $filter_id,
     908                'theme.json'
    906909            );
    907910            _doing_it_wrong( __METHOD__, $error_message, '6.3.0' );
  • trunk/src/wp-includes/class-wp-theme-json.php

    r56812 r57135  
    33913391            || ( '+' !== $spacing_scale['operator'] && '*' !== $spacing_scale['operator'] ) ) {
    33923392            if ( ! empty( $spacing_scale ) ) {
    3393                 trigger_error( __( 'Some of the theme.json settings.spacing.spacingScale values are invalid' ), E_USER_NOTICE );
     3393                trigger_error(
     3394                    sprintf(
     3395                        /* translators: 1: theme.json, 2: settings.spacing.spacingScale */
     3396                        __( 'Some of the %1$s %2$s values are invalid' ),
     3397                        'theme.json',
     3398                        'settings.spacing.spacingScale'
     3399                    ),
     3400                    E_USER_NOTICE
     3401                );
    33943402            }
    33953403            return null;
Note: See TracChangeset for help on using the changeset viewer.