Page MenuHomePhabricator

Regression: SpecialMobileDiff does not display proper text for version link in several Wikipedias since 1.34.0-wmf.3
Closed, ResolvedPublic2 Story Points

Description

The current implementation of SpecialMobileDiff.php uses the revisionasof template with only one parameter. The German revisionasof template expects the date and time passed in $2 and $3 respectively, see implementation of getRevisionHeader() in DifferenceEngine.php for details.

This causes the following text to be displayed for the version link
Version vom $2, $3 Uhr
instead of the expected
Version vom 3. Mai 2019, 11:40 Uhr

(see e.g. https://de.m.wikipedia.org/wiki/Spezial:Mobiler_Unterschied/188172886)

Developer notes

includes/diff/DifferenceEngine.php should be used as a guideline:

$timestamp = $lang->userTimeAndDate( $revtimestamp, $user );
$dateofrev = $lang->userDate( $revtimestamp, $user );
$timeofrev = $lang->userTime( $revtimestamp, $user );

$header = $this->msg(
        $rev->isCurrent() ? 'currentrev-asof' : 'revisionasof',
        $timestamp,
        $dateofrev,
        $timeofrev
)->escaped();

In MobileFrontend:

$td = $this->getLanguage()->userTimeAndDate( $ts, $user );

$templateData = [
        "revisionLinkLabel" => $this->msg( 'revisionasof', $td )->escaped(),

QA steps

Check the english ui:

  1. Visit https://readers-web-staging.wmflabs.org/w/index.php?title=Hellooooo&oldid=692&mobileaction=toggle_view_mobile&uselang=en
  2. Make sure there are no weird characters like dollar signs $ present in the revision date. e.g. It should be like Revision as of 15:25, 29 April 2019

Check the german ui:

  1. https://readers-web-staging.wmflabs.org/w/index.php?title=Hellooooo&oldid=692&mobileaction=toggle_view_mobile&uselang=de
  2. Again check that there are no weird characters present in the revision date that shouldn't be there. You should NOT see Version vom $2, $3 Uhr

QA Results

ACStatusDetails
1T222437#5188210
2T222437#5188210

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 3 2019, 10:20 AM
Jdlrobson renamed this task from SpecialMobileDiff does not display proper text for version link in German Wikipedia since 1.34.0-wmf.3 to Regression: SpecialMobileDiff does not display proper text for version link in German Wikipedia since 1.34.0-wmf.3.May 3 2019, 4:27 PM
Jdlrobson triaged this task as High priority.
Jdlrobson added a project: Regression.
Jdlrobson updated the task description. (Show Details)May 8 2019, 4:20 PM
Jdlrobson updated the task description. (Show Details)
Jdlrobson updated the task description. (Show Details)
ovasileva set the point value for this task to 2.May 8 2019, 4:21 PM
Aklapper renamed this task from Regression: SpecialMobileDiff does not display proper text for version link in German Wikipedia since 1.34.0-wmf.3 to Regression: SpecialMobileDiff does not display proper text for version link in several Wikipedias since 1.34.0-wmf.3.May 8 2019, 4:22 PM
Aklapper added subscribers: FredTC, Bdijkstra.

Change 510192 had a related patch set uploaded (by Nray; owner: Nray):
[mediawiki/extensions/MobileFrontend@master] 🐛 Bug: Fix revisionLinkLabel text

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

Change 510192 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] 🐛 Bug: Fix revisionLinkLabel text on SpecialMobileDiff page

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

nray updated the task description. (Show Details)May 15 2019, 4:35 PM
nray updated the task description. (Show Details)
nray reassigned this task from nray to Edtadros.May 15 2019, 4:39 PM
nray added a subscriber: nray.

Test Result

Status: ✅ PASS
OS: macOS Mojave
Browser: Chrome
Device: MBP
Emulated Device: iPhoneX

Test Artifact(s):

QA steps

✅ AC1: Check the english ui:

Visit https://readers-web-staging.wmflabs.org/w/index.php?title=Hellooooo&oldid=692&mobileaction=toggle_view_mobile&uselang=en
Make sure there are no weird characters like dollar signs $ present in the revision date. e.g. It should be like Revision as of 15:25, 29 April 2019

✅ AC2: Check the german ui:

https://readers-web-staging.wmflabs.org/w/index.php?title=Hellooooo&oldid=692&mobileaction=toggle_view_mobile&uselang=de
Again check that there are no weird characters present in the revision date that shouldn't be there. You should NOT see Version vom $2, $3 Uhr

Edtadros reassigned this task from Edtadros to ovasileva.May 16 2019, 10:04 PM
Edtadros updated the task description. (Show Details)
Edtadros added a subscriber: Edtadros.
ovasileva closed this task as Resolved.May 20 2019, 9:24 AM

All done here