Make WordPress Core

Opened 5 weeks ago

Closed 2 weeks ago

#63150 closed defect (bug) (reported-upstream)

Site Editor: "Custom Styles" is not translatable

Reported by: wildworks's profile wildworks 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)

global-styles-pre-save-panel-ja.png (27.7 KB) - added by wildworks 5 weeks ago.
Pre-save panel when there are unsaved global style changes in Japanese locale

Download all attachments as: .zip

Change History (13)

@wildworks
5 weeks ago

Pre-save panel when there are unsaved global style changes in Japanese locale

#1 @audrasjb
5 weeks ago

  • Milestone changed from Awaiting Review to 6.8

Moving for 6.8 consideration.

#2 @audrasjb
5 weeks ago

Good catch, this may be related to #54518.

#3 @SirLouen
5 weeks ago

@wildworks isnt this a thing to be posted here?
https://github.com/WordPress/gutenberg/issues

#4 follow-up: @wildworks
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 @SirLouen
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.

#6 @SirLouen
5 weeks ago

  • Keywords 2nd-opinion added

#7 @wildworks
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 @audrasjb
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

#10 @audrasjb
5 weeks ago

  • Milestone changed from 6.8 to 6.9

As per today's bug scrub: Moving to 6.9.

#11 @wildworks
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?

#12 @audrasjb
2 weeks ago

  • Keywords 2nd-opinion removed
  • Milestone 6.9 deleted
  • Resolution set to reported-upstream
  • Status changed from new to closed

Yeah sure

Note: See TracTickets for help on using tickets.