WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 4 years ago

#8502 closed defect (bug) (fixed)

Dashboard comments approval doesn't update right now correctly

Reported by: westi Owned by: nbachiyski
Milestone: 2.9 Priority: normal
Severity: normal Version: 2.7
Component: I18N Keywords: needs-patch
Focuses: Cc:

Description

Dashboard comments approval doesn't update right now correctly

Unapproved count changes, comment bubble changes approved count doesn't

See attached image

Attachments (1)

Picture 1.png (29.6 KB) - added by westi 5 years ago.
Dashboard comments approval doesn't update right now correctly

Download all attachments as: .zip

Change History (9)

westi5 years ago

Dashboard comments approval doesn't update right now correctly

comment:1 follow-up: azaozz5 years ago

  • Component changed from UI to i18n
  • Owner set to nbachiyski

That could easily be added, but there's a localization issue when updating the numbers from Javascript.

For most languages the difference is only in the thousands separator 10,000 10.000 or 10 000, so the lower numbers of Spam and Pending are not affected. For the rest the problem is bigger.

Perhaps we could turn the update from js off and do it only on page reload when the numbers can be localized properly.

comment:2 markjaquith5 years ago

  • Milestone changed from 2.7 to 2.8

We need a better global solution for this, but no time for 2.7.

comment:3 Denis-de-Bernardy5 years ago

  • Keywords needs-patch added
  • Milestone changed from 2.8 to Future Release

punting...

comment:4 in reply to: ↑ 1 Viper007Bond5 years ago

Replying to azaozz:

That could easily be added, but there's a localization issue when updating the numbers from Javascript.

Why not just use AJAX? On comment change via dashboard, refresh the counts (or even the whole "Right Now" widget via AJAX. That way PHP can handle generating the counts and everything.

comment:6 Denis-de-Bernardy5 years ago

  • Milestone changed from Future Release to 2.9

comment:7 caesarsgrunt5 years ago

Why not just leave the thousands separator out altogether? I believe this is acceptable in most locales, at least for numbers below 10,000, And it's certainly better to have an incorrectly formatted number than to have the wrong number.

Also, the localisation issue could conceivably affect the span and pending counts too, though it's true that they are unlikely to reach 1000...

comment:8 azaozz4 years ago

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.