Last modified: 2013-10-29 05:09:23 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 40587 - Passing minus sign (x2215) to the magicword formatnum blanks pages on Malayalam WIkipedia
Passing minus sign (x2215) to the magicword formatnum blanks pages on Malayal...
Status: NEW
Product: Wikimedia
Classification: Unclassified
General/Unknown (Other open bugs)
All All
: Low normal with 4 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
: i18n
Depends on:
Blocks: 56295
  Show dependency treegraph
Reported: 2012-09-28 06:25 UTC by vssun
Modified: 2013-10-29 05:09 UTC (History)
6 users (show)

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


Description vssun 2012-09-28 06:25:49 UTC
The formatnum magicword works differently in ml and en wikipedia.

Please see a page in english wikipedia using {{formatnum:−5}}. Please note that the minus sign used here is x2215

The same function at ml.wikipedia make the entire page blank

Changing the minus sign to - (x002D), solves the problem.

Please correct it in ml.wikipedia to use the formatnum function with both styles of minus sign.
Comment 1 Raziman T V 2012-09-28 06:37:29 UTC
The behavior of formatnum when there are non-numeric characters passed as argument is in general very different between English and Malayalam.

For example, on trying {{formatnum:x 4200 x}}, the results are:
On enwiki : x 4,200 x
On mlwiki : x, 42

Except for where the commas are placed within numbers (4,20,000 as opposed to 420,000), there shouldn't ideally be any difference between the behavior of formatnum on en and ml.
Comment 2 praveenp 2012-10-03 02:54:59 UTC
Although my interface language in commons is Malayalam, formatnum gives 3,3,3.. grouping there ([[:commons:User:Praveenp/test]]). Per bug 29495 it should be 3,2,2... . Without non-numeric characters formatnum gives correct grouping in ml.wp.
Comment 3 praveenp 2013-01-14 15:39:25 UTC
This is something related to Indian style number grouping feature included in r97793 (Bug 29495). Once I removed $digitGroupingPattern = "##,##,###"; from /languages/messages/MessagesMl.php in my local wiki, bug disappears. So cc'ing Santhosh Thottingal.

I checked languages hi and ta also and both suffer same problem. Indian style number grouping pattern was added to  ml, hi, pa, gu, or, bn, as, te, ta, kn, mr so this bug may affect all these languages.
Comment 4 Niklas Laxström 2013-01-14 15:44:25 UTC
{{formatnum}} is not general number formatting magic word, but mostly intended to be used in interface messages. This is the reason why it gives invalid output when you give it invalid input.

Also, the output of {{formatnum}} in page content does not vary according to the users interface language, that is the intended behavior.
Comment 5 praveenp 2013-01-14 17:32:22 UTC
If I understand correctly, "−" (x2215) is handled in parser functions already. I saw it assigned to "-" in function doExpression() in /parserfuctions/Expr.php

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