From 7e6d1b6e2168dde106b9cd76429f065a208078ae Mon Sep 17 00:00:00 2001 From: Yogesh Bhutkar Date: Fri, 3 Jan 2025 15:55:25 +0530 Subject: [PATCH] i18n: make example translatable in comments-pagination-previous (#68374) * i18n: make example translatable in comments-pagination-previous * i18n: Update label translation in comments-pagination-previous block * i18n: Update label for comments pagination to 'Older Comments' Co-authored-by: yogeshbhutkar Co-authored-by: t-hamano --- .../src/comments-pagination-previous/block.json | 5 ----- .../block-library/src/comments-pagination-previous/index.js | 6 ++++++ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/block-library/src/comments-pagination-previous/block.json b/packages/block-library/src/comments-pagination-previous/block.json index eb5203af33c866..0871b000c569dd 100644 --- a/packages/block-library/src/comments-pagination-previous/block.json +++ b/packages/block-library/src/comments-pagination-previous/block.json @@ -12,11 +12,6 @@ "type": "string" } }, - "example": { - "attributes": { - "label": "Comments Previous Page" - } - }, "usesContext": [ "postId", "comments/paginationArrow" ], "supports": { "reusable": false, diff --git a/packages/block-library/src/comments-pagination-previous/index.js b/packages/block-library/src/comments-pagination-previous/index.js index 80e555ccc79d9b..975d4c0b6cbc02 100644 --- a/packages/block-library/src/comments-pagination-previous/index.js +++ b/packages/block-library/src/comments-pagination-previous/index.js @@ -1,6 +1,7 @@ /** * WordPress dependencies */ +import { __ } from '@wordpress/i18n'; import { queryPaginationPrevious as icon } from '@wordpress/icons'; /** @@ -16,6 +17,11 @@ export { metadata, name }; export const settings = { icon, edit, + example: { + attributes: { + label: __( 'Older Comments' ), + }, + }, }; export const init = () => initBlock( { name, metadata, settings } );