Opened 5 weeks ago
Closed 2 weeks ago
#63150 closed defect (bug) (reported-upstream)
Site Editor: "Custom Styles" is not translatable
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Editor | Keywords: | |
Focuses: | Cc: |
Description
Related tiket: ticket:54518
The global styles post has a hard-coded Custom Styles
text as a title.
This seems to be the intended use, and it is assumed that this string will not appear anywhere. However, this string does appear in the pre-save panel in the site editor.
if we have any problems with making this string translatable on the server side, we would need some fix to the client side(Gutenberg).
Probably around here: https://github.com/WordPress/gutenberg/blob/f8521012e0923907df67e1f0beab8c955d8ab012/packages/editor/src/components/entities-saved-states/entity-record-item.js#L21-L52
Attachments (1)
Change History (13)
#3
@
5 weeks ago
@wildworks isnt this a thing to be posted here?
https://github.com/WordPress/gutenberg/issues
#4
follow-up:
↓ 5
@
5 weeks ago
@SirLouen I think we should explore whether we can solve this problem server-side first, so I submitted a ticket here.
#5
in reply to:
↑ 4
@
5 weeks ago
Replying to wildworks:
@SirLouen I think we should explore whether we can solve this problem server-side first, so I submitted a ticket here.
Gutenberg has a ton of PHP files. It's not only frontend.
I'm not versed in Gutenberg but I discovered this with the last patch I submitted.
This said, in the Gutenberg code there is this line
'post_title' => 'Custom Styles', // Do not make string translatable, see https://core.trac.wordpress.org/ticket/54518.
I think this is why @audrasjb referenced to this ticket:
https://core.trac.wordpress.org/changeset/52280
This change removes the internationalization of the "Custom Styles" specific posts as the post title being hardcoded is consistent with wp_template_part and wp_template post types, and is not publicly visible, except in the database. Moreover, using consistent "Custom Styles" post title may make is easier to retrieve the related posts in the database.
So I believe, that translation should be done on display, not on creation. And this might be done in the Gutenberg plugin repo if I'm not wrong.
#7
@
5 weeks ago
After thinking about it again, it seems that this problem can be best solved with Gutenberg.
I've submitted a PR: https://github.com/WordPress/gutenberg/pull/69677
#8
@
5 weeks ago
Thanks for submitting the PR @wildworks, it looks good on my side.
I'm all for fixing this issue in 6.8, but we'll need to merge the Gutenberg change by tomorrow's RC1. Does it sounds doable to you?
This ticket was mentioned in Slack in #core by audrasjb. View the logs.
5 weeks ago
#11
@
5 weeks ago
I've submitted a PR: https://github.com/WordPress/gutenberg/pull/69677
This PR has been merged, so can we close this ticket?
Pre-save panel when there are unsaved global style changes in Japanese locale