Wikimedia

Implement lc, lcfirst, uc, and ucfirst magic words in jqueryMsg

mediawiki.jqueryMsg is a JavaScript implementation of a subset of the wikitext syntax used by MediaWiki. It's used to display localisation messages in JavaScript-based parts of the interface. See https://www.mediawiki.org/wiki/Manual:Messages_API#Use_of_the_messages

{{lc:}}, {{lcfirst:}}, {{uc:}}, and {{ucfirst:}} magic words change their input to use lowercase or uppercase letters. Their behavior in wikitext is documented at https://www.mediawiki.org/wiki/Help:Magic_words#Formatting

Your task is to implement the magic words in JavaScript, add a few unit tests verifying their correct behavior, and submit the patch to Gerrit. You might want to look at the implementation and tests of {{ns:}} and {{int:}} magic words as an example.

(This task might be challenging.)

Phabricator task: https://phabricator.wikimedia.org/T46495

Task tags

  • javascript

Students who completed this task

Scimonster

Task type

  • code Code
close

2015