MediaWiki talk:Gadget-Numerakri.js

Needed Features

 * Easily visible dropdown box to select numeral system, availaible for both logged-in and logged-out users
 * Remembering user preference for numeral system and changing numerals on document.ready for all pages automatically once the preference is set
 * Changing all numerals in the page (including list numbering) without changing any anchor urls, image src properties, hyperlink urls etc.
 * Changing title text and alt text properties for images, anchors etc.
 * Not changing the numerals in the editbox in the editpage or the previewpage, not changing any input numerals
 * Providing an html class, numerals inside which would not be changed. This is to be for places where the numerals are to be specifically differentiated, and possibly will be used for ContentSub (Redirected from blah) which may contain numerals.
 * Not change numerals in the mailto link for emailing users
 * Not changing the numerals in the source for anchors for the book sources (such as ISBN) (The visible ISBN may be changed, but the link should not be changed)--Siddhartha Ghai (talk) 03:35, 5 July 2012 (UTC)

Icon
When implementing the dropdown, you'll probably want to implement that as a portlet link via mw.util.addPortletLink, and use a click event handler to show/hide the dropdown menu, and use CSS to show an icon (just like the user page link with icon). Krinkle (talk) 20:32, 8 July 2012 (UTC)

Revision 2012-12-19
Krinkle (talk) 03:18, 19 December 2012 (UTC)
 * Merged in changes by Siddhartha Ghai from hi:MediaWiki:Gadget-Numeral converter.js and hi:MediaWiki:Gadget-Numeral converter.css
 * Fallback was broken (ReferenceError: walkTextNodes is not defined)
 * Use CSS instead of inline styles.
 * Use variable references instead of using string selectors in  constantly (it is much faster to reference the nodes directly then querying the document to find the element). This phased out a lot of unneeded IDs from the document.
 * Build the interface inside out, this is faster because now there is only 1 insertion into the document and thus only 1 "paint" action in the browser.
 * Add basic messaging system.
 * Minor redesign for "Modern" skin: Icon was 50px, which equals the height of the toolbar (leaving no padding, edge of icon touched edge of toolbar). Reduced to 40px and also made white.
 * Refactored skip-class code
 * Using  instead of   so that it also works on elements that have more classes.
 * Moved check from  to TreeWalker's   callback so that it can be used on a container element (not just on the direct parent of the text node). In this case it is used on the SELECT element that contains the OPTION elements.
 * Fixed bug in options. Use  (or   or  . Attributes control initial state from HTML. Once in the DOM, the property controls live state, the attributes can be stale.
 * Factored any MediaWiki-specific code out into a new  method. This way one can extend the
 * Optimised initialisation by defining and instantiating the constructor outside "document-ready" and only calling "setupInterface" inside of the domready handler.
 * Various clean up and coding styles (more comments and spacing, delivery from ResourceLoader trims all this).
 * Passes JSHint!
 * Uh, firstly, thanks for the update; and, I'd tried to improve the code myself at w:hi:सदस्य:Siddhartha_Ghai/Numeral_converter.js. That supports multiple numeral systems. Maybe you should have a look and incorporate improvements? Thanks--Siddhartha Ghai (talk) 19:48, 25 December 2012 (UTC)
 * Clarification:I'm only referring to code changes (auto-generation of the regex). Support for multiple systems isn't needed on hi-wp as of now.--Siddhartha Ghai (talk) 19:54, 27 December 2012 (UTC)
 * ✅, . Krinkle (talk) 23:55, 30 December 2012 (UTC)
 * Thanks for the script. I have implemented it in Telugu wikipedia for telugu numerals. If someone can make the icon for Telugu that will be great. --వైజాసత్య (talk) 06:40, 13 April 2013 (UTC)

Documentation, standardization and cookie
So we now have usage of the gadget on te-wp.

For the use on this wiki, maybe add the relevant UI to this gadget itself, i.e reference to the doc page, te numerals, teUI when using the te interface lang etc and then show only two numeral sets, the arabic (international) one, and the one from the user's interface language?

Also, te-wp is using the cookie value 1 for te numerals, while here and on hi-wp that's for deva numerals. IMHO that's bad. Maybe the te version should be changed to use 2 (or something else)?

Regards--Siddhartha Ghai (talk) 05:42, 4 October 2013 (UTC)

Also, the telugu wikipedia is using the December 2012 version. Once these issues and the ones at Mediawiki talk:Gadget-Numerakri.css are fixed, it should probably be updated (along with the version on the hindi wikipedia).--Siddhartha Ghai (talk) 05:49, 4 October 2013 (UTC)