Make WordPress Core

Opened 8 months ago

Last modified 2 months ago

#64619 reviewing defect (bug)

wp.updates.l10n.updating is deprecated notice

Reported by: Presskopp Owned by: westonruter
Priority: normal Milestone: 7.2
Component: I18N Version:
Severity: normal Keywords: has-patch
Cc: Focuses: administration

Description

I got a notice wp.updates.l10n.updating is deprecated since version 5.5.0! Use wp-i18n instead.. The corresponding code ist to find on line 1280 in theme.js:

.find( 'p' ).text( wp.updates.l10n.updating );

Change History (32)

#1 @Presskopp
8 months ago

Patch:

.find( 'p' ).text( wp.i18n.__( 'Updating...' ) );

This ticket was mentioned in ​PR #10895 on ​WordPress/wordpress-develop by ​RaviVaghasiya.


8 months ago
#2

  • Keywords has-patch added; needs-patch removed

Resolved

Trac ticket:

## Use of AI Tools

​@huzaifaalmesbah commented on ​PR #10895:


8 months ago
#3

Thanks for the PR! 🙌

Could you please connect your WordPress.org account with your GitHub account?

You can follow the instructions here:
​https://make.wordpress.org/core/2020/03/19/associating-github-accounts-with-wordpress-org-profiles/

​@Presskopp commented on ​PR #10895:


8 months ago
#4

I intentionally chose “Updating...” (3 dots) instead of “Updating...” (ellipsis) because that string already exists.

This ticket was mentioned in ​PR #10896 on ​WordPress/wordpress-develop by ​@manishxdp.


8 months ago
#5

Fixes a deprecated JavaScript usage in the WordPress admin.

The code in wp-admin/js/theme.js was using wp.updates.l10n.updating, which has been deprecated since WordPress 5.5. This PR replaces it with the recommended wp.i18n.() function.

Testing Instructions

Go to Dashboard → Updates or Appearance → Themes

Trigger a theme update

Confirm:

The text “Updating...” appears correctly

No deprecation notice appears in the browser console

Trac Ticket

Fixes: https://core.trac.wordpress.org/ticket/64619

​@westonruter commented on ​PR #10896:


8 months ago
#6

I see there are quite a few reads of the l10n object as well. Should those not be updated as well?

​@westonruter commented on ​PR #10895:


8 months ago
#7

There is a seeming duplicate PR opened at the same time: #10896. Should this be close in favor of that, or the other way around?

​@westonruter commented on ​PR #10896:


8 months ago
#8

There is a seeming duplicate PR opened at the same time: #10895. Should this be close in favor of that, or the other way around?

​@manishxdp commented on ​PR #10896:


8 months ago
#9

Thanks for the review, @westonruter.
I checked theme.js and found that line 1280 already uses wp.i18n.('Updating...') instead of wp.updates.l10n.updating. I didn't find other direct references to wp.updates.l10n in this file.
Could you point to the specific instances you're seeing? I can:
Check other files if they're outside theme.js
Review the PR diff if there are other patterns to update
Look for indirect uses I might have missed
I want to make sure all deprecated wp.updates.l10n usages are replaced with wp.i18n.
().

​@manishxdp commented on ​PR #10896:


8 months ago
#11

@westonruter Could you please checknow added nessary changes

​@manishxdp commented on ​PR #10896:


8 months ago
#12

@westonruter what else changes are necessary

​@westonruter commented on ​PR #10896:


8 months ago
#13

I'm not an expert on i18n in JS, so it will be best for someone else who has more experience to provide final review, but I'm sharing what I believe needs to be done.

#14 @westonruter
8 months ago

  • Component Administration → I18N

​@manishxdp commented on ​PR #10896:


8 months ago
#15

@westonruter done please check now

​@manishxdp commented on ​PR #10896:


8 months ago
#16

@westonruter can you check now done suggested changes

​@westonruter commented on ​PR #10896:


8 months ago
#17

@manishdhorepatil-art That looks correct. I'll leave for another contributor who has I18N expertise to confirm.

​@westonruter commented on ​PR #10896:


8 months ago
#18

Please don't keep merging trunk into this branch. It's not necessary unless there is a merge conflict. Please wait for another reviewer.

​@manishxdp commented on ​PR #10896:


8 months ago
#19

@westonruter do we need any changes to this ticket ?

​@westonruter commented on ​PR #10896:


8 months ago
#20

I don't know. It's waiting for another reviewer.

​@westonruter commented on ​PR #10896:


8 months ago
#21

Please don't keep merging trunk into this branch. It's not necessary unless there is a merge conflict. Please wait for another reviewer.

#22 @SergeyBiryukov
8 months ago

  • Milestone Awaiting Review → 7.0

​@manishxdp commented on ​PR #10896:


7 months ago
#23

@huzaifaalmesbah can you pls review this

​@huzaifaalmesbah commented on ​PR #10896:


7 months ago
#24

Hi @manishdhorepatil-art,
I see that @westonruter has already reviewed this and mentioned it is waiting for another reviewer with more i18n expertise. So it’s better to wait for a committer or component maintainer to review it.

No need to rush or worry too much. please wait for the appropriate reviewer.

​@ozgursar commented on ​PR #10896:


7 months ago
#25

While searching for l10n.updating I found that it's also being used in /js/_enqueues/wp/customize/controls.js as follows on like 7296

section.contentContainer.find( '.customize-action' ).text( api.l10n.updating );

I'm not sure whether this should be fixed as well.

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


7 months ago

#27 @audrasjb
7 months ago

  • Milestone 7.0 → 7.1

As per today's 7.0 pre-RC1 bug scrub:
As we're a few hours from 7.0 RC1, I'm moving this ticket to milestone 7.1 to give it more time for testing.

​@manishxdp commented on ​PR #10896:


7 months ago
#28

@westonruter its been long are there any changes in the pr expected

#29 @westonruter
6 months ago

  • Owner set to westonruter
  • Status new → reviewing

#30 @wildworks
3 months ago

Since ​PR 10896 was submitted several months ago, we need to re-review it to move this ticket forward. Otherwise, we will punt this ticket to 7.2.

​@wildworks commented on ​PR #10895:


2 months ago
#31

Closing this in favor of #10896. #10896 appears to resolve more issues.

#32 @wildworks
2 months ago

  • Milestone 7.1 → 7.2

Punting this to 7.2 as the 7.1 RC1 release is imminent. Let's wait for reviews from contributors who are more familiar with internationalization.

Note: See TracTickets for help on using tickets.