Fix i18n gaps in WP-CLI messages and the Quick Create button title#669
Open
miyanialkesh7 wants to merge 1 commit into
Open
Fix i18n gaps in WP-CLI messages and the Quick Create button title#669miyanialkesh7 wants to merge 1 commit into
miyanialkesh7 wants to merge 1 commit into
Conversation
Wrap the `wp msls blog` command's success/error messages in esc_html__() so they can be translated, instead of hardcoded English. Fix the Quick Create button's title swap on translated sites: the button previously carried only its "Create..." title, and the JavaScript derived the "Edit..." title by regex-replacing the English word "Create", which silently breaks once that word is translated. Render both the create and edit titles server-side (the edit title as a new data-edit-title attribute) and have the JS read the localized edit title directly instead of doing English-text surgery on it. (cherry picked from commit 58cdee1)
Contributor
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
wp msls blogcommand's success/error messages inesc_html__()so they can be translated, instead of hardcoded English.data-edit-titleattribute), and the JS reads the localized edit title directly instead of doing English-text surgery on it.Context
Split out of #668 to keep scope focused, per maintainer feedback. Unrelated to the security/PHPCS changes in that PR.
Test plan
wp msls blog <id>with a valid and an invalid locale on a site with a non-English locale active, confirm messages are translated