Skip to content

Commit

Permalink
i18n: make example translatable in query-no-results
Browse files Browse the repository at this point in the history
  • Loading branch information
yogeshbhutkar committed Dec 30, 2024
1 parent b4304f8 commit 54da7fd
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 54da7fd

Please sign in to comment.