Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#50526 closed enhancement (fixed)

Use wp.i18n for translatable strings in wp-admin/js/common.js

Reported by: ocean90's profile ocean90 Owned by:
Milestone: 5.5 Priority: normal
Severity: normal Version:
Component: I18N Keywords: has-patch has-dev-note
Focuses: javascript Cc:

Description

We should replace the use of wp_localize_script() with the proper JavaScript i18n functions introduced in WordPress 5.0, see #20491 and #45103. This ticket is for wp-admin/js/common.js.

Previously: #50235, #50525

Change History (5)

#1 @ocean90
5 years ago

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

In 48267:

I18N: Use wp.i18n for translatable strings in wp-admin/js/common.js.

This removes the usage of wp_localize_script() for passing translations to the script and instead adds the translatable strings in the script directly through the use of wp.i18n and its utilities.

Props swissspidy, ocean90.
See #20491.
Fixes #50526.

#2 @kebbet
5 years ago

@ocean90 Was the version change of 'imagesloaded' and 'masonry' in this commit done by intension? It's not mentioned in the commit-message or in the ticket?

#3 @SergeyBiryukov
5 years ago

In 48276:

Script Loader: Restore correct versions for Masonry and imagesLoaded.

These libraries were previously updated in [48038], but some changes were accidentally reverted in [48267].

Props kebbet.
See #50526.

#4 @justinahinon
5 years ago

  • Keywords needs-dev-note added
Note: See TracTickets for help on using tickets.