Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#50845 closed defect (bug) (fixed)

Block patterns: Fix translatable strings (take 2)

Reported by: sergeybiryukov's profile SergeyBiryukov Owned by: audrasjb's profile audrasjb
Milestone: 5.5.1 Priority: normal
Severity: normal Version:
Component: Editor Keywords: has-patch commit
Focuses: Cc:

Description

Background: #50842

Reported by @tobifjellner:

I got this screenshot from @nabilmoqbel
Seems to be more hardcoded stuff in sample content.

Not sure this can be addressed in time for 5.5, so setting the milestone to 5.5.1 for now.

Attachments (4)

Chapter-Buttons.jpg (172.8 KB) - added by SergeyBiryukov 4 years ago.
Read-now-button.jpg (103.2 KB) - added by nabilmoqbel 4 years ago.
Read now button
50845-1.patch (10.1 KB) - added by justinahinon 4 years ago.
Make string translatables in block patterns
50845.2.diff (10.3 KB) - added by audrasjb 4 years ago.
Editor: Transform block patterns hardcoded strings into translatable strings

Download all attachments as: .zip

Change History (14)

@nabilmoqbel
4 years ago

Read now button

#1 @justinahinon
4 years ago

Just look and yes, the strings are hardcoded. Working on a patch for the blocks in the screenshots and also looking at investigating others block patterns.

@justinahinon
4 years ago

Make string translatables in block patterns

#2 @SergeyBiryukov
4 years ago

#50904 was marked as a duplicate.

#3 @johnbillion
4 years ago

  • Keywords has-patch added

@audrasjb
4 years ago

Editor: Transform block patterns hardcoded strings into translatable strings

#4 @audrasjb
4 years ago

  • Keywords commit added
  • Owner set to audrasjb
  • Status changed from new to accepted

Thanks @justinahinon, the patch looks good to me but it wasn't generated against wordpress-develop, so it's pretty hard to apply to WP Core dev environment. I added a new patch based on what you did and I checked all the patterns: you identified all the patterns with issues regarding i18n, thanks.

Marking this for commit action.

#5 @SergeyBiryukov
4 years ago

This also needs to be fixed upstream in Gutenberg. See #50842 for example, which was a backport of https://github.com/WordPress/gutenberg/pull/24317 for https://github.com/WordPress/gutenberg/issues/24316.

#6 @justinahinon
4 years ago

Replying to SergeyBiryukov:

This also needs to be fixed upstream in Gutenberg.

Opened an issue https://github.com/WordPress/gutenberg/issues/24646.

Here's the PR: https://github.com/WordPress/gutenberg/pull/24647.

This ticket was mentioned in Slack in #core by david.baumwald. View the logs.


4 years ago

#8 @audrasjb
4 years ago

Hi,
Note: The PR has been merged, so this patch can be committed as well.

#9 @SergeyBiryukov
4 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 48859:

Editor: Make some hardcoded strings in block patterns translatable.

Follow-up to [48726].

Props justinahinon, audrasjb, nabilmoqbel, tobifjellner, yoavf, ramiy.
Fixes #50845.

#10 @SergeyBiryukov
4 years ago

In 48860:

Editor: Make some hardcoded strings in block patterns translatable.

Follow-up to [48726].

Props justinahinon, audrasjb, nabilmoqbel, tobifjellner, yoavf, ramiy.
Merges [48859] to the 5.5 branch.
Fixes #50845.

Note: See TracTickets for help on using tickets.