Skip to content

Commit 382af64

Browse files
yogeshbhutkaryogeshbhutkart-hamano
authored
i18n: make example translatable in query-no-results (#68376)
Co-authored-by: yogeshbhutkar <[email protected]> Co-authored-by: t-hamano <[email protected]>
1 parent 42658e2 commit 382af64

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

packages/block-library/src/query-no-results/block.json

-10
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,6 @@
88
"ancestor": [ "core/query" ],
99
"textdomain": "default",
1010
"usesContext": [ "queryId", "query" ],
11-
"example": {
12-
"innerBlocks": [
13-
{
14-
"name": "core/paragraph",
15-
"attributes": {
16-
"content": "No posts were found."
17-
}
18-
}
19-
]
20-
},
2111
"supports": {
2212
"align": true,
2313
"reusable": false,

packages/block-library/src/query-no-results/index.js

+11
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/**
22
* WordPress dependencies
33
*/
4+
import { __ } from '@wordpress/i18n';
45
import { loop as icon } from '@wordpress/icons';
56

67
/**
@@ -18,6 +19,16 @@ export const settings = {
1819
icon,
1920
edit,
2021
save,
22+
example: {
23+
innerBlocks: [
24+
{
25+
name: 'core/paragraph',
26+
attributes: {
27+
content: __( 'No posts were found.' ),
28+
},
29+
},
30+
],
31+
},
2132
};
2233

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

0 commit comments

Comments
 (0)