Make WordPress Core

Opened 4 weeks ago

Last modified 6 days ago

#64619 new defect (bug)

wp.updates.l10n.updating is deprecated notice

Reported by: presskopp's profile Presskopp Owned by:
Milestone: 7.0 Priority: normal
Severity: normal Version:
Component: I18N Keywords: has-patch
Focuses: administration Cc:

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 (25)

#1 @Presskopp
4 weeks ago

Patch:

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

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


4 weeks ago
#2

  • Keywords has-patch added; needs-patch removed

Resolved

Trac ticket:

## Use of AI Tools

@huzaifaalmesbah commented on PR #10895:


4 weeks 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:


4 weeks 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.


4 weeks 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:


4 weeks 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:


4 weeks 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:


4 weeks 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:


4 weeks 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:


4 weeks ago
#11

@westonruter Could you please checknow added nessary changes

@manishxdp commented on PR #10896:


4 weeks ago
#12

@westonruter what else changes are necessary

@westonruter commented on PR #10896:


4 weeks 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
4 weeks ago

  • Component changed from Administration to I18N

@manishxdp commented on PR #10896:


4 weeks ago
#15

@westonruter done please check now

@manishxdp commented on PR #10896:


4 weeks ago
#16

@westonruter can you check now done suggested changes

@westonruter commented on PR #10896:


4 weeks ago
#17

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

@westonruter commented on PR #10896:


4 weeks 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:


3 weeks ago
#19

@westonruter do we need any changes to this ticket ?

@westonruter commented on PR #10896:


3 weeks ago
#20

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

@westonruter commented on PR #10896:


3 weeks 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
3 weeks ago

  • Milestone changed from Awaiting Review to 7.0

@manishxdp commented on PR #10896:


6 days ago
#23

@huzaifaalmesbah can you pls review this

@huzaifaalmesbah commented on PR #10896:


6 days 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:


6 days 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.

Note: See TracTickets for help on using tickets.