Skip to content

Commit

Permalink
i18n: Make example label for Comments Pagination Next block translatable
Browse files Browse the repository at this point in the history
  • Loading branch information
yogeshbhutkar committed Dec 30, 2024
1 parent b4304f8 commit 9c641c9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@
"type": "string"
}
},
"example": {
"attributes": {
"label": "Comments Next Page"
}
},
"usesContext": [ "postId", "comments/paginationArrow" ],
"supports": {
"reusable": false,
Expand Down
9 changes: 9 additions & 0 deletions packages/block-library/src/comments-pagination-next/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* WordPress dependencies
*/
import { _x } from '@wordpress/i18n';
import { queryPaginationNext as icon } from '@wordpress/icons';

/**
Expand All @@ -16,6 +17,14 @@ export { metadata, name };
export const settings = {
icon,
edit,
example: {
attributes: {
label: _x(
'Comments Next Page',
'Example label for the Comments Pagination Next block'
),
},
},
};

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

0 comments on commit 9c641c9

Please sign in to comment.