WordPress.org

Make WordPress Core

Changeset 51308


Ignore:
Timestamp:
07/02/2021 06:37:39 PM (3 months ago)
Author:
desrosj
Message:

Editor: Ensure the Query block pattern category is translatable.

Because the __() translation function was used here, the Query block pattern category string is not translatable. _x() is the correct function here as that passes the second parameter as context and not text domain.

Follow up to [50948].

Props walbo.
Merges [51307] to the 5.8 branch.
Fixes #53577.

Location:
branches/5.8
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.8

  • branches/5.8/src/wp-includes/block-patterns.php

    r51208 r51308  
    4242    register_block_pattern_category( 'header', array( 'label' => _x( 'Headers', 'Block pattern category' ) ) );
    4343    register_block_pattern_category( 'text', array( 'label' => _x( 'Text', 'Block pattern category' ) ) );
    44     register_block_pattern_category( 'query', array( 'label' => __( 'Query', 'Block pattern category' ) ) );
     44    register_block_pattern_category( 'query', array( 'label' => _x( 'Query', 'Block pattern category' ) ) );
    4545}
    4646
Note: See TracChangeset for help on using the changeset viewer.