Page MenuHomePhabricator

Add a preference option to disable $wgTranslateNumerals when using a language with digit transforms
Open, LowPublic

Description

Author: mohamed.m.k

Description:
Currently, when you use a language which have digit transforms, it is enabled by default. and this is a user preference, they might want the default numerals or they want the transformed numerals. So I'm proposing to add a preference option to disable $wgTranslateNumerals when using a language with digit transforms. e.g. Arabic.

--user:alnokta


Version: unspecified
Severity: enhancement

Details

Reference
bz14145

Event Timeline

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

Component: User preferences -> i18n

Is it likely enough that this warrants adding a new user preference?

bluehairedlawyer wrote:

I take in the numeric transform relates to sortable tables???

If so try putting

var wgSeparatorTransformTable = null;
var wgDigitTransformTable = null;

in you monobook.js file (or whatever that is in Arabic)

bluehairedlawyer wrote:

No never mind, that'll only work for the tables...

mohamed.m.k wrote:

Comment #2 -> yes. keep in mind that it should be visible only in languages with digit transform. ar fa ur etc.

It will be hard to implement, because there is no separation between content and interface number translation.

Psneog added a comment.Oct 5 2011, 8:51 AM

It would have been better if it could be implemented. Se discussion and poll in Assamese wikipedia:
https://secure.wikimedia.org/wikipedia/as/wiki/Wikipedia:Community_Votes#Assamese_Vs_Latin_numerals_in_templates_using_parser_functions

You are asking for an user preference option, but that would not affect the result of magic words at all.

I don't understand why you want to sacrifice usability of readers to get some convenience for advanced editors editing templates. It seems to me that you have not thought out this issue properly.

Psneog added a comment.Oct 5 2011, 4:50 PM

Thanks.

@Niklas: Right, we could have solved the problem by editing some templates or even patching the code related to the magic words like {{CURRENTDAY}} etc. But, we, or at least the Assamese community are accustomed using Latin numerals and symbols in mathematics starting from primary schools and even in our daily lives. Some other Indian language communities, like the Hindi users also follow the same convention. Apart from that English numerals are very common in India and almost everyone can understand them.

Basically this is the reason we have adopted this approach.

(In reply to comment #9)

Thanks.
@Niklas: Right, we could have solved the problem by editing some templates or
even patching the code related to the magic words like {{CURRENTDAY}} etc.
But,
we, or at least the Assamese community are accustomed using Latin numerals
and
symbols in mathematics starting from primary schools and even in our daily
lives. Some other Indian language communities, like the Hindi users also
follow
the same convention. Apart from that English numerals are very common in
India
and almost everyone can understand them.
Basically this is the reason we have adopted this approach.

The numeral problem is a general one for indic languages. The problem is two-fold: inputting different numeral systems (parser function support) and viewing different numerals on a per-user basis.

For users being able to see numerals of their choice, you could try the numeral converter gadget as used on hindi wikipedia [1]. Its a javascript-based gadget which uses a cookie to set preference of a user on a browser. It is also usable for IP users. Code is also availaible on mediawiki[2].

For input support for parsers, the module convert on english wikipedia somewhat solves this problem. See this user discussion on english wikipedia for a possible solution [3].

[1]: http://hi.wikipedia.org/wiki/%E0%A4%AE%E0%A5%80%E0%A4%A1%E0%A4%BF%E0%A4%AF%E0%A4%BE%E0%A4%B5%E0%A4%BF%E0%A4%95%E0%A4%BF:Gadget-Numeral_converter.js and http://hi.wikipedia.org/wiki/%E0%A4%AE%E0%A5%80%E0%A4%A1%E0%A4%BF%E0%A4%AF%E0%A4%BE%E0%A4%B5%E0%A4%BF%E0%A4%95%E0%A4%BF:Gadget-Numeral_converter.css

[2]: http://www.mediawiki.org/wiki/MediaWiki:Gadget-Numerakri.js and http://www.mediawiki.org/wiki/MediaWiki:Gadget-Numerakri.css

[3]: http://en.wikipedia.org/wiki/User_talk:Johnuniq#Module:Convert_and_non-arabic_digits

Krenair added a subscriber: Krenair.Sep 8 2015, 8:10 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 8 2015, 8:10 PM
Restricted Application added a subscriber: alanajjar. · View Herald TranscriptMar 1 2018, 5:31 AM
Meno25 removed a subscriber: Meno25.Nov 23 2018, 8:00 AM