-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Fix: Change Featured Image toggle label to 'Make image a link' #71931
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
base: trunk
Are you sure you want to change the base?
Fix: Change Featured Image toggle label to 'Make image a link' #71931
Conversation
|
Warning: Type of PR label mismatch To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task. |
|
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 Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @Alkasingh09. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @rajanarahul93! In case you missed it, we'd love to have you join us in our Slack community. If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information. |
|
I have rebased this branch to keep it in sync with the latest trunk. Standing by for review or any further feedback! |
What?
Closes #55057
This pull request updates the UI label for the setting that links a Post Featured Image. The dynamic label "Link to [Post Type]" is replaced with the static label "Make image a link".
Why?
The previous label was dynamically generated using the post type's
singular_name(e.g., "Page," "Post"), which is typically capitalized. This created an inconsistent, title-cased label in the UI.Previous attempts to programmatically lowercase this string were rejected because this approach is not safe for internationalization (i18n) and can break translations in other languages. This PR implements a pragmatic solution that was suggested by a project contributor in the issue thread.
How?
The dynamic
sprintflogic for the label has been removed frompackages/block-library/src/post-featured-image/edit.js. It is replaced with the static, translatable string__( 'Make image a link' )for both theToolsPanelItemand the nestedToggleControl.This approach was confirmed to be a preferred solution in this comment.
Testing Instructions