Page MenuHomePhabricator

Hardcoded string in AbstractCheckUserPager::getTimeRangeString
Closed, ResolvedPublic

Description

The method AbstractCheckUserPager::getTimeRangeString uses a hardcoded string to define the separator between two timestamps. This should be a message definition so that the timestamps can be reversed or otherwise the separator modified to be correct for a given language.

Relevant code is at AbstractCheckUserPager line 126.

QA Results - Local

Event Timeline

Dreamy_Jazz renamed this task from Hardcoded string in `AbstractCheckUserPager::getTimeRangeString` to Hardcoded string in AbstractCheckUserPager::getTimeRangeString.Sep 4 2023, 4:47 PM
Dreamy_Jazz updated the task description. (Show Details)
Dreamy_Jazz updated the task description. (Show Details)
Dreamy_Jazz updated the task description. (Show Details)

Change 954729 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/CheckUser@master] Use i18n message in AbstractCheckUserPager::getTimeRangeString

https://gerrit.wikimedia.org/r/954729

Change 954729 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Use i18n message in AbstractCheckUserPager::getTimeRangeString

https://gerrit.wikimedia.org/r/954729

As this patch should make no visual change to the output, I would suggest that QA does the following:

  1. Log into an account
  2. Ensure the account uses the language "English - en" (this can be checked in the 'User profile' tab of Special:Preferences)
  3. Make one action logged by CheckUser on an IP that hasn't been used before on the wiki
  4. Make multiple actions logged by CheckUser on another IP
  5. Checkout a branch that does not have this change
  6. Load Special:CheckUser
  7. Enter your account name and choose the 'Get IP addresses' mode (should be selected by default)
  8. Run a check
  9. Check that the first IP has one timestamp and the second IP has a timestamp range
  10. Checkout the latest master branch (that has this change)
  11. Run the check again and make sure that nothing visually changed with regards to the timestamps.
GMikesell-WMF subscribed.

@Dreamy_Jazz There was nothing visually changed with regard to the timestamps between the old branch and the current master as seen in the screenshots. The first IP has one timestamp and the second IP has a timestamp range. I will move this to Done. Thanks for all your work!

Status: ✅ PASS
Environment: Local 1.41.0-alpha (2f2802e) 20:03, 11 September 2023. CheckUser: 2.5 (7402d99) 13:46, 11 September 2023
OS: macOS Ventura
Browser: Chrome 116
Device: MBP
Emulated Device:: N/A
Test Links:
http://localhost:8080/w/index.php?title=Philadelphia_Eagles

✅AC1: https://phabricator.wikimedia.org/T345586#9150646

Branch w/ no changeMaster
2023-09-11_11-52-20.png (1×2 px, 598 KB)
2023-09-11_11-54-12.png (1×2 px, 621 KB)