Last modified: 2011-04-07 11:35:37 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T22756, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 20756 - Thousands separator missing for mw-plusminus-pos class numbers
Thousands separator missing for mw-plusminus-pos class numbers
Status: RESOLVED FIXED
Product: Wikimedia
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Normal normal with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
http://de.wikipedia.org/wiki/Spezial:...
: code-update-regression, shell
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-09-21 13:51 UTC by Melancholie
Modified: 2011-04-07 11:35 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Melancholie 2009-09-21 13:51:49 UTC
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).
Comment 1 Alexandre Emsenhuber [IAlex] 2009-09-21 17:52:09 UTC
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.
Comment 2 Brion Vibber 2009-09-23 18:26:28 UTC
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?
Comment 3 Chad H. 2009-09-23 18:39:20 UTC
Change to WM, not an issue with Mediawiki.
Comment 4 Krinkle 2011-04-07 11:31:24 UTC
So what's the action required here ?

Remove 1 single no-longer-supposed-to-be file and it's done ?
Comment 5 Krinkle 2011-04-07 11:35:37 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links