Skip to content

Commit

Permalink
Navigation Submenu Block: Make example preview text translatable
Browse files Browse the repository at this point in the history
  • Loading branch information
himanshupathak95 committed Jan 24, 2025
1 parent 0a620ea commit 17f41c1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
7 changes: 0 additions & 7 deletions packages/block-library/src/navigation-submenu/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,6 @@
"type": "boolean"
}
},
"example": {
"attributes": {
"label": "About",
"type": "page",
"title": "About Us"
}
},
"usesContext": [
"textColor",
"customTextColor",
Expand Down
7 changes: 7 additions & 0 deletions packages/block-library/src/navigation-submenu/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* WordPress dependencies
*/
import { page, addSubmenu } from '@wordpress/icons';
import { _x } from '@wordpress/i18n';

/**
* Internal dependencies
Expand Down Expand Up @@ -37,6 +38,12 @@ export const settings = {
return label;
},
edit,
example: {
attributes: {
label: _x( 'About', 'Example link text for Navigation Submenu' ),
type: 'page',
},
},
save,
transforms,
};
Expand Down

0 comments on commit 17f41c1

Please sign in to comment.