Skip to content

Upgrade/Install: Count each translation update in the update counts. - #16210

Closed
SainathPoojary wants to merge 2 commits into
WordPress:trunkfrom
SainathPoojary:fix/66806-translation-update-count
Closed

SainathPoojary wants to merge 2 commits into
WordPress:trunkfrom
SainathPoojary:fix/66806-translation-update-count

Conversation

@SainathPoojary

Copy link
Copy Markdown
Member

The Updates badge in the admin menu and the admin bar always counted translation updates as 1, even when there were more. Since 7.2, the Updates screen lists each translation update and shows the real number in the heading, for example "Translations (3)", so the badge and the screen no longer matched.

This PR counts each available translation update, the same way plugin and theme updates are counted.

The existing test now checks that each translation update is counted.

Trac ticket: https://core.trac.wordpress.org/ticket/66806

image

Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5.5
Used for: Claude Code helped with the code changes. Review and testing the changes was done by me


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

@github-actions

Copy link
Copy Markdown

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

@SainathPoojary
SainathPoojary marked this pull request as ready for review November 24, 2026 18:48
@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs.

Core Committers: Use this line as a base for the props when committing in SVN:

Props sainathpoojary, wildworks, krupalpanchal, audrasjb.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.


Props Bot commands

You can trigger Props Bot actions by commenting on this PR:

  • @propsbot add <username> to give props to a GitHub or WordPress.org user. Requires write access.
  • @propsbot remove <username> to leave a user out of the props. Requires write access.
  • @propsbot refresh to refresh this list. Adding the props-bot label works too.

@t-hamano t-hamano left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. @audrasjb, can you take another look at this?

@krupal-panchal

Copy link
Copy Markdown

Would it be worth adding a test case where translation updates are distributed across multiple update transients, such as update_core, update_plugins, and update_themes? The current data provider appears to test each transient separately. A test covering updates across multiple transients could help verify that wp_get_update_data() correctly counts all available translation updates together and prevents regressions in the combined total.

@t-hamano

Copy link
Copy Markdown
Contributor

Would it be worth adding a test case where translation updates are distributed across multiple update transients, such as update_core, update_plugins, and update_themes?

Good point, I agree with this.

@audrasjb

audrasjb commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

This looks good to me. @krupal-panchal I think we can open a new ticket to add this test during the 7.2.x cycle.

wporg-sync pushed a commit that referenced this pull request Dec 1, 2026
The Updates badge in the admin menu and the admin bar always counted translation updates as "1", even when there were more. Since 7.2, the Updates screen lists each translation update and shows the real number in the heading, for example "Translations (3)", so the badge and the screen no longer match.

This changeset ensures each available translation update is taken into account, the same way plugin and theme updates are counted.

Developed in #16210.

Follow-up to [65226].

Props sainathpoojary, wildworks, krupalpanchal, audrasjb.
Fixes #66806.
See #42281.



git-svn-id: https://develop.svn.wordpress.org/trunk@65850 602fd350-edb4-49c9-b593-d223f7449a82
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

A commit was made that fixes the Trac ticket referenced in the description of this pull request.

SVN changeset: 65850
GitHub commit: 0c00432

This PR will be closed, but please confirm the accuracy of this and reopen if there is more work to be done.

@github-actions github-actions Bot closed this Dec 1, 2026
wporg-sync pushed a commit to WordPress/WordPress that referenced this pull request Dec 1, 2026
The Updates badge in the admin menu and the admin bar always counted translation updates as "1", even when there were more. Since 7.2, the Updates screen lists each translation update and shows the real number in the heading, for example "Translations (3)", so the badge and the screen no longer match.

This changeset ensures each available translation update is taken into account, the same way plugin and theme updates are counted.

Developed in WordPress/wordpress-develop#16210.

Follow-up to [65226].

Props sainathpoojary, wildworks, krupalpanchal, audrasjb.
Fixes #66806.
See #42281.


Built from https://develop.svn.wordpress.org/trunk@65850


git-svn-id: http://core.svn.wordpress.org/trunk@64879 1a063a9b-81f0-0310-95a4-ce76da25c4cd
wporg-sync pushed a commit that referenced this pull request Dec 1, 2026
The Updates badge in the admin menu and the admin bar always counted translation updates as "1", even when there were more. Since 7.2, the Updates screen lists each translation update and shows the real number in the heading, for example "Translations (3)", so the badge and the screen no longer match.

This changeset ensures each available translation update is taken into account, the same way plugin and theme updates are counted.

Developed in #16210.

Follow-up to [65850].

Reviewed by mamaduka, audrasjb.
Merges [65850] to the 7.2 branch.
Props sainathpoojary, wildworks, krupalpanchal, audrasjb, sebastienserre, mayankmajeji.
Fixes #66806.
See #42281.


git-svn-id: https://develop.svn.wordpress.org/branches/7.2@65851 602fd350-edb4-49c9-b593-d223f7449a82
wporg-sync pushed a commit to WordPress/WordPress that referenced this pull request Dec 1, 2026
The Updates badge in the admin menu and the admin bar always counted translation updates as "1", even when there were more. Since 7.2, the Updates screen lists each translation update and shows the real number in the heading, for example "Translations (3)", so the badge and the screen no longer match.

This changeset ensures each available translation update is taken into account, the same way plugin and theme updates are counted.

Developed in WordPress/wordpress-develop#16210.

Follow-up to [65850].

Reviewed by mamaduka, audrasjb.
Merges [65850] to the 7.2 branch.
Props sainathpoojary, wildworks, krupalpanchal, audrasjb, sebastienserre, mayankmajeji.
Fixes #66806.
See #42281.

Built from https://develop.svn.wordpress.org/branches/7.2@65851


git-svn-id: http://core.svn.wordpress.org/branches/7.2@64880 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants