Page MenuHomePhabricator

Thousands separator missing for mw-plusminus-pos class numbers
Closed, ResolvedPublic

Description

Author: Wiki.Melancholie

Description:
On the German Wikipedia for example, if there have been removed more than 999 kB of text (e.g. 2,000), on Special:RecentChanges the following is shown (HTML source code):
<span class='mw-plusminus-neg'>(-2.000)</span> (correct, with thousands separator)

But if 2,000 kB have been added:
<strong class='mw-plusminus-pos'>(+2000)</strong> (thousands separator missing)

The thousands separator (dot, in this case) is missing in the second case (mw-plusminus-pos).


Version: unspecified
Severity: normal
URL: http://de.wikipedia.org/wiki/Spezial:Letzte_%C3%84nderungen

Details

Reference
bz20756

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:57 PM
bzimport set Reference to bz20756.
bzimport added a subscriber: Unknown Object (MLST).

Hmm, weird, could see the bug, but when setting my language to French the result is displayed correctly. I'm also unable to reproduce it on my local wiki.

The live servers have an obsolete copy of LanguageDe.php class file:

/apache/common/wmf-deployment/languages/classes/LanguageDe.php

This little guy explicitly excepted 4-digit numbers from getting the thousands separator:

<?php
/** German

  • @ingroup Language */

class LanguageDe extends Language {

/*
 * German numeric format is "12 345,67" but "1234,56"
 * Copied from LanguageUk.php
 */

function commafy($_) {
        if (!preg_match('/^\d{1,4}$/',$_)) {
                return strrev((string)preg_replace('/(\d{3})(?=\d)(?!\d*\.)/','$1,',strrev($_)));
        } else {
                return $_;
        }
}

}

It's since been removed from the main code, but it's still on most of our servers -- looks like our sync scripts aren't actually removing files that shouldn't be there anymore.

Rob and/or Fred can you take a peek at our scap, sync-common-all, etc sync scripts and see if we need to tweak the rsync options so these old files get cleared out?

Change to WM, not an issue with Mediawiki.

So what's the action required here ?

Remove 1 single no-longer-supposed-to-be file and it's done ?

http://de.wikipedia.org/wiki/Spezial:Letzte_%C3%84nderungen

(Unterschied | Versionen) . . K Benutzer:Krdbot/RedirectDeeplink‎; 13:34 . . (-1.060) . . Akkakk
(Unterschied | Versionen) . . K Thomas Schipperges‎; 13:34 . . (+3.192) . . Hoo

Looks fixed to me, whatever did it, it's fixed now.