Last modified: 2013-06-06 18:52:48 UTC
This is an example bug for tracking patches generated during a 'hacking mediwaiki' tutorial during the 2012 hackathon in Pune.
Created attachment 9980 [details] Example patch submission These are some changes to make the example extension way more awesome. This patch makes it possible to dynamically generate a 'Hello world' message. It can take an optional 'name' parameter to say 'Hello $name'. If 'name' is not present, it will randomly select a name from a list of names in code.
Created attachment 9981 [details] echoes the name taken from url this newly made changes allow us to print the name parameter passed in url along with the word 'Hello'
Created attachment 9982 [details] Patch which extends the funtionality of special page 1. I have added some messages in special pages.
Comment on attachment 9982 [details] Patch which extends the funtionality of special page >Index: Example/Example.i18n.php >=================================================================== >--- Example/Example.i18n.php (revision 111148) >+++ Example/Example.i18n.php (working copy) >@@ -6,8 +6,10 @@ > // English > $messages[ 'en' ] = array( > 'example-example' => 'This is an example!', >+ 'example-hello_world'=> 'hello $1', > ); > >+ > // Message documentation for translators > $messages[ 'qqq' ] = array( > 'example-example' => 'This is just an example message. Nothing special.', >Index: Example/Example.body.php >=================================================================== >--- Example/Example.body.php (revision 111148) >+++ Example/Example.body.php (working copy) >@@ -9,9 +9,23 @@ > /** > * Make your magic happen! > */ >+ function getRandomName(){ >+ $name_array=array(); >+ $name_array ['en'] = array ( >+ 'first'=> 'Ashwini', >+ 'second'=> 'Arthur', >+); >+} > function execute( $par ) { > global $wgOut; >+ global $wgRequest; >+ $wgOut->addWikiMsg( 'example-hello_world' ); >+ echo "Hello wikimedia"; > >- $wgOut->addWikiMsg( 'example-example' ); >+ >+ $wgOut->addwikimsg('example-hello_world',$this->getRandomName()); >+ $wgOut->addwikimsg('example-hello_world',$wgRequest->getText('Ashwini')); >+ >+ > } > }
Created attachment 10017 [details] prints the name specified in the url this newly made changes can display the value of the name parameter passed in the url if it is mentioned otherwise it displays a random name
Can somebody please review the patches and afterwards replace the "patch-need-review" keyword by "patch-reviewed"?
(In reply to comment #6) > Can somebody please review the patches and afterwards replace the > "patch-need-review" keyword by "patch-reviewed"? done