Make WordPress Core

Opened 7 weeks ago

Last modified 10 days ago

#54561 reviewing enhancement

Avoid translating several times widget media default strings

Reported by: Chouby Owned by: audrasjb
Milestone: 6.0 Priority: normal
Severity: normal Version: 4.8
Component: Widgets Keywords: has-patch
Focuses: performance Cc:


The translation being a rather expensive process, we should avoid to translate the same string several times.

The class Widget_Media is a base class for 4 widgets. Its constructor is thus called 4 times, meaning that all the strings included in this constructor are translated 4 times.

Attachments (1)

54561.patch (4.5 KB) - added by Chouby 7 weeks ago.
Avoid 27 duplicate translations

Download all attachments as: .zip

Change History (7)

7 weeks ago

Avoid 27 duplicate translations

#1 @Chouby
7 weeks ago

  • Keywords has-patch added

#2 @costdev
7 weeks ago

  • Type changed from defect (bug) to enhancement

#4 @audrasjb
10 days ago

  • Milestone changed from Awaiting Review to 6.0
  • Owner set to audrasjb
  • Status changed from new to reviewing

#5 @audrasjb
10 days ago

  • Keywords needs-testing added

The above PR refreshes the patch against trunk and updates @since mentions.
GH Tests are passing.
Adding needs-testing keyword to ensure it doesn't break anything :)

#6 @audrasjb
10 days ago

  • Keywords needs-testing removed

Removing needs-testing keyword: the patch looks good on my side, it doesn't break anything on the Classic Widgets screen and it successfully mutualizes translations.

Note: See TracTickets for help on using tickets.