Make WordPress Core

#63674 closed defect (bug) (wontfix)

Missing text domain in query-large-title-posts.php block pattern

Reported by: sandippatel11 Owned by:
Priority: normal Milestone:
Component: Editor Version: 6.8
Severity: normal Keywords: has-patch needs-testing
Cc: Focuses:

Description

The block pattern file query-large-title-posts.php located in wp-includes/block-patterns/ is missing the text domain in the _x() translation function.

This causes the translation to be skipped in some cases or not properly recognized by Polyglots or string extraction tools.

Proposed change:

Before:
'title' => _x( 'Large title', 'Block pattern title' ),

After:
'title' => _x( 'Large title', 'Block pattern title', 'default' ),

This ensures the translation system knows which domain it belongs to. Adding this also aligns with other patterns already using text domains.

Attachments (1)

fix-text-domain.diff (296 bytes ) - added by sandippatel11 13 months ago.
The block pattern file query-large-title-posts.php inside wp-includes/block-patterns/ is missing a text domain in the _x() function.

Download all attachments as: .zip

Change History (2)

@sandippatel11
13 months ago

The block pattern file query-large-title-posts.php inside wp-includes/block-patterns/ is missing a text domain in the _x() function.

#1 @swissspidy
13 months ago

  • Focuses accessibility removed
  • Milestone Awaiting Review
  • Resolutionwontfix
  • Status newclosed

Hi there and welcome to WordPress Trac!

This causes the translation to be skipped in some cases or not properly recognized by Polyglots or string extraction tools.

This is incorrect. default is actually the default value for the text domain value and is the one used by core. So core strings don't need to use 'default' everywhere.

Adding this also aligns with other patterns already using text domains.

None of the other patterns in that folder use 'default'.

Note: See TracTickets for help on using tickets.