-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Site Editor: Make the text "Custom Styles" translatable #69677
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
Conversation
Size Change: +5 B (0%) Total Size: 1.84 MB
ℹ️ View Unchanged
|
ae7cf4f
to
8e1a4c6
Compare
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 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. |
Note: The milestone for the core ticket has been changed to 6.8, but this issue isn't new to 6.8. I don't have a strong opinion, but it might be nice to backport to 6.8. |
This looks good to me. |
Alright I moved the related Trac ticket to milestone 6.9 |
What?
Closes https://core.trac.wordpress.org/ticket/63150
This PR applies the translate function to the text "Custom Styles" in the pre-publish sidebar in the site editor.
Why?
In the site editor, there is the pre-save panel that shows dirty entities, such as templates, template parts, global styles, etc.
The global styles is a kind of a post, so the
post_title
field is referenced. As you can see in https://core.trac.wordpress.org/changeset/52282, this title is not translatable because the hard-coded English text is stored in the database.How?
In the root entities config, update the
getTitle()
function so that it can get the translated text. My understanding is that this title is not used anywhere else except in the pre-save panel, so it should be fine to always return the translated text.Testing Instructions
We can't test this PR for now, because the text is not localized yet in all languages. However, you can temporarily change the text to test whether the context is really reflected in the panel.