Wikinews:Water cooler/technical/archives/2014/September

From Wikinews, the free news source you can write!
Jump to navigation Jump to search

Migrating site-wide JS to default-on gadgets

There's a heck of a lot of JavaScript on English Wikinews, and a lot of it is convoluted, esoteric, and crammed into a few massive files (e.g. Mediawiki:Common.js); and Gadgets has had the functionality to have default-on, hidden, and right-restricted gadgets for a while now. I think we should consider migrating what we can into Special:Gadgets, to ensure that things are modular (and easier to find!), allow people to turn things off, and so forth. It works well for Commons, and we all know that English Wikinews' JavaScript needs some sort of improvement (ignoring ResourceLoader entirely)…. Thoughts? Microchip08 (talk) 20:39, 13 August 2014 (UTC)[reply]

I've been thinking lately we need to do something about common.js. I made one small addition to it to enable my interactive tools for all users, and I hope eventually that small hook there would obviate the need for the button code, making at least one slightly-less-small reduction in the code, and eventually I'd hope the interactive tools would replace ezpr and make-lead too; but looking at English Wikibooks' common.js has made me envious]]. The biggest challenge, I've been thinking, is that to clean up the existing code one has to figure it out. --Pi zero (talk) 22:12, 13 August 2014 (UTC)[reply]
Many of the things in our common.js are helpfully commented (as far as "this is where it begins" goes), so we should be able to move the sections across fairly simply. If we separate it all into gadgets, we'd could have (as an example) code, user documentation and technical documentation split into a well established structure that's easy to find. I expect that whatever Gadgets does behind the scenes will be more efficient than what we are doing today, anyhow. Microchip08 (talk) 22:44, 13 August 2014 (UTC)[reply]
Yes, this does seem desirable. Not only would it better organize things, it might also make essential elements of our infrastructure somewhat more resistant against uninformed tampering. --Pi zero (talk) 15:27, 21 September 2014 (UTC)[reply]

Grants to improve your project

Greetings! The Individual Engagement Grants program is accepting proposals for funding new experiments from September 1st to 30th. Your idea could improve Wikimedia projects with a new tool or gadget, a better process to support community-building on your wiki, research on an important issue, or something else we haven't thought of yet. Whether you need $200 or $30,000 USD, Individual Engagement Grants can cover your own project development time in addition to hiring others to help you.

Discussion versus Collaboration

I just had to fully-protect Discussion page. I was thinking it was really weird someone would create that, until I looked at the &action=edit URL in a 'Private Browsing' session. Instead of seeing the Talk page tab labelled Discussion, it's coming up as Collaboration.

I'm sure this will just be an extra message or three in the MediaWiki: namespace, which I'm going to try and track down. I think those should be changed to Discussion since, for main namespace at least, "Collaboration" is only appropriate whilst an article is within the active news cycle. --Brian McNeil / talk 11:08, 5 September 2014 (UTC)[reply]

Found messages:
  1. Mediawiki:talk, has localisation to Discussion.
  2. Nope, that's it. 30 minutes looking where this should be, and I can't find it.
Although, having MediaWiki:wikiLove.js as a system message breaks the listing when I try browsing Special:AllMessages; thus, I can't trust that I'm seeing all the messages. --Brian McNeil / talk 12:10, 5 September 2014 (UTC)[reply]

Change in renaming process

Part or all of this message may be in English. Please help translate if possible.

-- User:Keegan (WMF) (talk) 9 September 2014 16.22 (UTC)

Breaking JavaScript changes

Several deprecated methods in MediaWiki's JavaScript modules will be removed in a few weeks' time. Ensure your code no longer uses these methods and update it if needed, and check and fix any gadgets or scripts you or Wikinews rely upon. These methods will be removed in the MediaWiki 1.25 release (scheduled for deployment to WMF wikis October 4th onwards, will hit Wikinews the week after): as such anything relying on them will break. The methods that need replacement are:

  • (deprecated since Mediawiki 1.20 (2012)) – use mw.user.getName() instead gerrit:111422
  • mw.user.anon() (deprecated since 1.20) – use mw.user.isAnon() instead gerrit:111422
  • the mediawiki.api methods' "ok" and "err" callback parameters (since 1.21 (2013)) – use the returned Promise interface instead gerrit:118733
  • the mediawiki.api.category async parameter (use Promise instead) gerrit:118733
  • the jquery.json module (use the standard JSON.stringify() instead) gerrit:40560

If you identify problems but are unsure how to fix them, please ask for help! Microchip08 (talk) 12:22, 21 September 2014 (UTC)[reply]

Well, a simple string search in MediaWiki: space didn't turn up any instances of these for me; if I wasn't looking for the wrong strings, the lack of matches is perhaps a good sign. --Pi zero (talk) 15:30, 21 September 2014 (UTC)[reply]