Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#47485 closed defect (bug) (fixed)

I18n: Merge similar string between editor and widgets by unescaping a character

Reported by: jorgefilipecosta's profile jorgefilipecosta Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 5.3 Priority: normal
Severity: normal Version: 5.3
Component: I18N Keywords: has-patch
Focuses: administration Cc:

Description

In the calendar block in the editor, we use the string 'A calendar of your site’s posts.' in the calendar widget in PHP we use the following string 'A calendar of your site’s Posts.'. These strings should be merged.
A PR was proposed in the Gutenberg repository to change the editor string https://github.com/WordPress/gutenberg/pull/14975/. To follow that path we would need to add some unescape function to the editor the problem is that unescaping the string has security implications.
So here we try the opposite direction, change the core string to match the editor, locally this works well, but I am not sure if there is a reason to escape characters in core and would love some feedback or thoughts on how we can merge this strings between Gutenberg and core.
Props to @ramiy for starting this discussion in the Gutenberg repository.

Attachments (1)

47485.diff (690 bytes) - added by jorgefilipecosta 5 years ago.

Download all attachments as: .zip

Change History (5)

#1 @ramiy
5 years ago

  • Focuses administration added
  • Keywords has-patch added

#2 @SergeyBiryukov
5 years ago

  • Milestone changed from Awaiting Review to 5.3
  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#3 @SergeyBiryukov
5 years ago

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

In 45492:

I18N: Merge duplicate "A calendar of your site’s posts" strings used in the Calendar widget and the Calendar block in the editor.

Props jorgefilipecosta, ramiy.
Fixes #47485.

#4 @SergeyBiryukov
5 years ago

In 45493:

I18N: Correct encoding for wp-includes/widgets/class-wp-widget-calendar.php, accidentally saved in ANSI instead of UTF-8.

See #47485.

Note: See TracTickets for help on using tickets.