Skip to content

Commit

Permalink
i18n: make example translatable in query-no-results (WordPress#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 } );

0 comments on commit 382af64

Please sign in to comment.