Make WordPress Core

Opened 9 months ago

Closed 9 months ago

#63674 closed defect (bug) (wontfix)

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

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

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 9 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
9 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
9 months ago

  • Focuses accessibility removed
  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

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.