Last modified: 2011-03-13 18:06:13 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 T15379, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 13379 - Allow non-Arabic numerals in {{#expr:}}
Allow non-Arabic numerals in {{#expr:}}
Status: RESOLVED WONTFIX
Product: MediaWiki extensions
Classification: Unclassified
ParserFunctions (Other open bugs)
unspecified
All All
: Lowest enhancement with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
http://mr.wikipedia.org
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-03-15 08:45 UTC by subhash
Modified: 2011-03-13 18:06 UTC (History)
5 users (show)

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


Attachments

Description subhash 2008-03-15 08:45:19 UTC
Hi
I am trying to use a parser function {{#expr but it works only for english numbers. is there a way we can add functionality to do calculation with marathi numbers i.e. १ २ ३ ४ ......

is this possible.

thanks

Subhash
Comment 1 Huji 2008-03-15 21:14:06 UTC
Actually, if this is going to be possible, I propose this to be generalize to all other scripts such as Arabic, Hebrew, Persian, Chinese, etc.
Comment 2 Kaustubh 2008-03-16 09:45:25 UTC
Yes, this is much needed enhancement. If we can get this working, it will be helpful in creating various complex templates in all devanagari language wikipedias (or in the wikis which use numbers other than english).

Best regards,

Kaustubh
Comment 3 Niklas Laxström 2008-03-16 09:53:07 UTC
I recently added {{formatnum:...|R}} in r32012 which accepts numbers in format that formatnum produces (depending on the language!) and formats them suitable for math. It may or may not be suitable solution for this.
Comment 4 Huji 2008-03-17 20:55:05 UTC
Correct me if I'm wrong, but {{formatnum:...|R}} doesn't help here. For example, {{formatnum:۱۹۷۸|R}} doesn't return 1978 (the English writing of the same number writtenin Arabic), and can't be helpful in this case.
Comment 5 Brion Vibber 2008-03-17 22:14:33 UTC
There are a couple of basic issues. Some are easy, some aren't.

In theory, it should be very easy to automatically translate non-ASCII decimal digit characters; as long as they're clean decimal digits, that's a simple matter of having a list of known Unicode digits.

Dealing with place and decimal separators that might be embedded in those numbers is more likely to be a problem.
Comment 6 Huji 2008-03-19 10:39:22 UTC
(In reply to comment #5)
> 
> Dealing with place and decimal separators that might be embedded in those
> numbers is more likely to be a problem.
> 

Not if a find and replace using $digitTransformTable takes place?
Comment 7 Brion Vibber 2008-03-19 19:45:37 UTC
Whose digitTransformTable? What does 100,000 mean, without context? What does 100.000 mean, without context?
Comment 8 Huji 2008-03-19 21:45:14 UTC
(In reply to comment #7)
> Whose digitTransformTable? What does 100,000 mean, without context? What does
> 100.000 mean, without context?
> 

I was under the impression that the digitTransformTable for the "content" language of the wiki would be used..

(In reply to comment #4)
> Correct me if I'm wrong, but {{formatnum:...|R}} doesn't help here. For
> example, {{formatnum:۱۹۷۸|R}} doesn't return 1978 (the English writing of
> the same number writtenin Arabic), and can't be helpful in this case.
> 

I was wrong. It works as desired.
Comment 9 Huji 2010-10-26 19:13:50 UTC
{{formatnum:...|R}} has been widely used to tackle this problem for more than a year now. In the existence of that workaround, I'm marking this bug as WONTFIX.

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


Navigation
Links