Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i18n: Make example label for Comments Pagination Next block translatable #68373

Merged

Conversation

yogeshbhutkar
Copy link
Contributor

Part of: #64707
Tracker Comment: #64707 (comment)

What, Why & How?

This PR refactors the example attribute of block.json to support translatable text.

Testing Instructions

  1. Create a comments block.
  2. Add a pagination block to it.
  3. Hover over the inserter to see the preview for comments pagination next block.

Screenshot

Screenshot 2024-12-30 at 10 13 39 AM

@yogeshbhutkar yogeshbhutkar marked this pull request as ready for review December 30, 2024 04:47
Copy link

github-actions bot commented Dec 30, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: yogeshbhutkar <yogeshbhutkar@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@t-hamano t-hamano added [Block] Comment Pagination Next Affects the Comments Pagination Next Block l10n Localization and translations best practices labels Jan 2, 2025
Copy link
Contributor

@t-hamano t-hamano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering why the label is the block name. Would the default placeholder text, Newer Comments be appropriate here?

@yogeshbhutkar
Copy link
Contributor Author

Hi @t-hamano, thanks for the review.

I've updated the label to Newer Comments as it seems to be more appropriate to me as well.

Screenshot:
Screenshot 2025-01-02 at 1 30 15 PM

Copy link
Contributor

@t-hamano t-hamano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Below is a screenshot in the Japanese locale, where I can see that the example text has been translated and matches the text immediately after the block is inserted.

comments-pagination-next

@t-hamano t-hamano self-requested a review January 3, 2025 10:24
@t-hamano t-hamano added the [Type] Bug An existing feature does not function as intended label Jan 3, 2025
@t-hamano t-hamano merged commit 2d0c68e into WordPress:trunk Jan 3, 2025
66 of 67 checks passed
@github-actions github-actions bot added this to the Gutenberg 20.1 milestone Jan 3, 2025
bph pushed a commit to bph/gutenberg that referenced this pull request Jan 8, 2025
…ble (WordPress#68373)

* i18n: Make example label for Comments Pagination Next block translatable

* i18n: Update example label for Comments Pagination Next block to use `__` translation function

* i18n: Update example label for Comments Pagination Next block to 'Newer Comments'

Co-authored-by: yogeshbhutkar <yogeshbhutkar@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Comment Pagination Next Affects the Comments Pagination Next Block l10n Localization and translations best practices [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants