GSoC/GCI Archive
Google Code-in 2014 Wikimedia Foundation

Pywikibot: unprotection i18n messages

completed by: Geoffrey Mon

mentors: Fabian, John Vandenberg

Pywikibot (PWB) is a Python-based framework to write bots for MediaWiki. See https://www.mediawiki.org/wiki/Manual:Pywikibot for more information. Patches can be submitted via Gerrit (you need a MediaWiki.org account). More documentation on Gerrit can be found at https://www.mediawiki.org/wiki/Manual:Pywikibot/Gerrit. After you have successfully claimed this task in Google Melange please do use the task in Phabricator for communication instead of Google Melange. This allows more PWB developers to be reached! General development questions can be asked on the Pywikibot mailing list at https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l and the #pywikibot IRC channel (see https://www.mediawiki.org/wiki/MediaWiki_on_IRC).

Pywikibot has internationalisation and localisation (L10n & i18n) support with messages translated on http://translatewiki.net .  See https://www.mediawiki.org/wiki/Localisation for more information.

The Pywikibot script "protect.py" is using i18n messages for protecting pages, however protect.py also has functionality to unprotect pages.  When unprotecting pages, the script is using the inappropriate 'protect' messages.

This task is to create new messages for unprotection (English only required), amend the protect.py script to use those new messages, and build unit tests for protect.py. The Phabricator task is https://phabricator.wikimedia.org/T63312.

The same problem existed for the script delete.py, and the solution can be seen in patches https://gerrit.wikimedia.org/r/#/c/181363/ and https://gerrit.wikimedia.org/r/#/c/181359/ .  Also see task https://phabricator.wikimedia.org/T62572 .