Opened 5 months ago
Last modified 3 months ago
#64619 reviewing defect (bug)
wp.updates.l10n.updating is deprecated notice
| Reported by: | Presskopp | Owned by: | westonruter |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.1 |
| 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 (29)
This ticket was mentioned in PR #10895 on WordPress/wordpress-develop by RaviVaghasiya.
5 months ago
#2
- Keywords has-patch added; needs-patch removed
Resolved
Trac ticket:
## Use of AI Tools
@huzaifaalmesbah commented on PR #10895:
5 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:
5 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.
5 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
@westonruter commented on PR #10896:
5 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:
5 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:
5 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:
5 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.().
@westonruter commented on PR #10896:
5 months ago
#10
@manishxdp commented on PR #10896:
5 months ago
#11
@westonruter Could you please checknow added nessary changes
@manishxdp commented on PR #10896:
5 months ago
#12
@westonruter what else changes are necessary
@westonruter commented on PR #10896:
5 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.
@manishxdp commented on PR #10896:
5 months ago
#15
@westonruter done please check now
@manishxdp commented on PR #10896:
5 months ago
#16
@westonruter can you check now done suggested changes
@westonruter commented on PR #10896:
5 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:
5 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:
5 months ago
#19
@westonruter do we need any changes to this ticket ?
@westonruter commented on PR #10896:
5 months ago
#20
I don't know. It's waiting for another reviewer.
@westonruter commented on PR #10896:
5 months ago
#21
Please don't keep merging
trunkinto this branch. It's not necessary unless there is a merge conflict. Please wait for another reviewer.
@manishxdp commented on PR #10896:
4 months ago
#23
@huzaifaalmesbah can you pls review this
@huzaifaalmesbah commented on PR #10896:
4 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:
4 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.
4 months ago
#27
@
4 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:
4 months ago
#28
@westonruter its been long are there any changes in the pr expected
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Patch:
.find( 'p' ).text( wp.i18n.__( 'Updating...' ) );