Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#50535 closed enhancement (fixed)

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

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


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//privacy-tools.js.

Previously: #50235, #50525, #50526, #50527

Change History (3)

#1 @SergeyBiryukov
4 years ago

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

In 48274:

I18N: Use wp.i18n for translatable strings in wp-admin/js/privacy-tools.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, afercia.
See #20491.
Fixes #50535.

#2 @justinahinon
4 years ago

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