Writing a simple alert code in Jquery

Recently I was fixing a bug in Mediawiki where I had to write the 
confirmation code. I had no idea working with Javascript, I did manage to 
get this one done. Here are a few basic steps on how to get this done.
I 'm having two parameters, title and description and I have to write a
confirmation code to check whether if some data has been changed. 

Declare the two variables title and desciprition.
         var title = 'input title';
         var description = 'input.description';

Check if the data has been changed in the title or description.

   this.$( 'input.title', '.description' ).change( checkEdited ); 
//Here checkEdited is a function to show an alert message.
//change is a selector that you use to chekc if any change has been

Write the function checkEdited.

        var checkEdited = function() {
             alert ('This is a test');

Make sure when you are writing the fucntion write the function before
you call the onChange fucntion.



Adding Gender Support

There are certain bugs which are based on adding gender support for particular messages. Like for example take the case of this certain bug T111944 . This bug is on adding gender support for a particular message. So here are some few tips to how to analyse and do a gender bug.

In a mediawiki code specially in i18n messages, we can see a lot of $1,  $2, $3 parameters. They are basically like parameters, but not exactly parameters. For example: When we go through i18n messages we can find out some messages like “You have been added by $1” , here $1 can be a person.  And we can apply gender for these parameters depending on the user.

Applying  gender was bit confusing for me, and I am gonna show how I have did this particular bug. As the bug say’s we have two parameters $1 and $2 where the$1 refer to the username of the sender and $2 refers to the username of the recipient. We have to apply gender support for these to parameters.Lets see for example a gender support statement: {{GENDER: $1|mentioned}} .  In this statement we are applying gender support for the term mentioned. You might basically have a doubt that as we use English language we do not need gender support, but since we are internalizing we are running this same message in different languages and it can change according to gender of the person.  As we look into the syntax we have:

  1. Its compulsory to enclose GENDER in {{}}
  2. The word Gender  is case sensitive, its can only be in upper case
  3. {{GENDER:parameter|his|her|their}}
  4. It is necessary to apply Gender with proper grammar

Now for our particular issue here on applying gender to $1 we can see {{GENDER:$1|sent}} , here this means in simple if $1 is female,  she sent and if $1 is male, he sent.  But now on going to $2 we have the message saying that $2 has received a mail from $2 so basically we have to write the code accordingly.  So the code goes in as {{GENDER:$1|$2}.  So the final change in the bug would be shown in this link.

This was a very simple bug in mediawiki, but as to say the concept of adding gender support is simple. There are lot of GENDER bugs available in mediawiki that can be assigned and done.