Skip to content

Commit

Permalink
i18n: make example translatable in query-no-results (#68376)
Browse files Browse the repository at this point in the history
Co-authored-by: yogeshbhutkar <[email protected]>
Co-authored-by: t-hamano <[email protected]>
  • Loading branch information
3 people authored Jan 2, 2025
1 parent 42658e2 commit 382af64
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
10 changes: 0 additions & 10 deletions packages/block-library/src/query-no-results/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,6 @@
"ancestor": [ "core/query" ],
"textdomain": "default",
"usesContext": [ "queryId", "query" ],
"example": {
"innerBlocks": [
{
"name": "core/paragraph",
"attributes": {
"content": "No posts were found."
}
}
]
},
"supports": {
"align": true,
"reusable": false,
Expand Down
11 changes: 11 additions & 0 deletions packages/block-library/src/query-no-results/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* WordPress dependencies
*/
import { __ } from '@wordpress/i18n';
import { loop as icon } from '@wordpress/icons';

/**
Expand All @@ -18,6 +19,16 @@ export const settings = {
icon,
edit,
save,
example: {
innerBlocks: [
{
name: 'core/paragraph',
attributes: {
content: __( 'No posts were found.' ),
},
},
],
},
};

export const init = () => initBlock( { name, metadata, settings } );

1 comment on commit 382af64

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 382af64.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/12579246965
📝 Reported issues:

Please sign in to comment.