WordPress.org

Make WordPress Core

Opened 11 months ago

Last modified 2 months ago

#51317 new enhancement

Remove deprecated JavaScript i18n globals

Reported by: SergeyBiryukov Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 5.5.1
Component: Script Loader Keywords: early needs-patch
Focuses: javascript Cc:

Description

Background: #51123

[48923] added backward compatibility for JavaScript i18n globals and properties deprecated in WordPress 5.5.

Per the corresponding dev note on make/core, the plan is to remove this fallback code in two major versions, so it should be deleted in WordPress 5.7. This gives plugin and theme developers ample time to remove the conflicting code and switch to using wp.i18n.

This ticket serves as a reminder to address this in 5.7.

Change History (11)

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


9 months ago

#2 @noisysocks
9 months ago

In 49625:

Customize: Temporary fix for autosave restore notice not being removed

Fixes the "There is a more recent autosave of your changes" notice from not
being removed when the dismiss button is clicked.

The problem is caused by the notice being initialized twice: once by the
common script and then again by the customize-controls script.

This temporary fix prevents customize-controls from initializing a notice if
it has already been initialized.

A better fix would be to not initialize notices twice. This can be done by
removing common as a dependency of updates when deprecateL10nObject is
removed.

When this happens (est: 5.7), this temporary fix should be reverted.

Fixes #51425.
See #51317.
Props karthikbhatb, dlh, SergeyBiryukov.

#3 follow-up: @noisysocks
9 months ago

When deprecateL10nObject is removed as part of this, we can remove common as a dependency of updates. This will properly fix #51425 and let us revert r49625.

#4 @hellofromTonya
8 months ago

  • Keywords early added; 5.7-early removed
  • Milestone changed from Future Release to 5.7

Moving into the 5.7 milestone as an early candidate per Sergey's notes.

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


8 months ago

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


6 months ago

#7 in reply to: ↑ 3 @hellofromTonya
6 months ago

Replying to noisysocks:

When deprecateL10nObject is removed as part of this, we can remove common as a dependency of updates. This will properly fix #51425 and let us revert r49625.

What's the status of removing deprecateL10nObject?

Is this ticket doable for 5.7 (with Beta 1 coming fast)?

#8 @hellofromTonya
6 months ago

  • Milestone changed from 5.7 to 5.8

In talking with @noisysocks, punting this one to 5.8. Why? 5.7 Beta 1 is tomorrow and there's been on work on the remaining parts of it.

#9 @desrosj
4 months ago

  • Keywords needs-patch added

Are there any negative aspects of leaving deprecateL10nObject in the code base?

I don't think it's a unreasonable to assume that some plugins and themes are still referencing the old variables. From a user perspective, if that is the case and deprecateL10nObject is removed, JavaScript will break and they will experience the same thing as in 5.5.

That said, I'm not entirely against removing this, but I'm just not convinced it's necessary yet without understanding why it's important to rip the bandaid off.

Some other thoughts:

  • If FSE is merged in 5.8, it may make sense to wait another release for this change in order to limit introducing potential issues.
  • If it's decided to make this change in 5.8, this should be made in the next week, and a dev note should be published as soon as possible so that plugin and theme developers have time to check their code.

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


3 months ago

#11 @SergeyBiryukov
2 months ago

  • Milestone changed from 5.8 to Future Release
Note: See TracTickets for help on using tickets.