Help:Extension:Translate/Getting started with development

Thank you for your interesting in contributing to the Translate extension. The aim of this document is to make it easier to get started with development on the Translate extension.

Developing the Translate extension requires knowledge of PHP, JavaScript/jQuery and CSS/LESS. Some knowledge in MySQL maybe required depending on the task that you choose to work on.

Getting familiar with the code
The following pages should help you get an overview of the code:
 * 1) Various components of the Translate extension
 * 2) Glossary: Describes various terminologies used
 * 3) PHP Namespace structure
 * 4) Various configuration options supported by Translate
 * 5) MediaWiki jobs used in Translate

Local development setup
The easiest way to get started with development on Translate extension is to use the MediaWiki Docker. Please see the instructions here.

To run some code sniffs specific to Translate extension, we will run  inside the Translate extension. This can be done using the following command:

Coding conventions
We following the existing MediaWiki Coding conventions. These differ based on the programming languages, so ensure you go through the appropriate pages.

There are a few other guidelines specific to Translate to keep in mind.

Picking what to work on
Go to the Translate Phabricator Board and look for tickets with the tag: good first tasks.

We recommend that you assign the ticket to yourself, and comment how you are planning to tackle the ticket.

Patch submission checklist
It is important to be familiar with how to work with Gerrit. It is also important to be familiar with the commit message guidelines.

Before submitting the patch:
 * 1) Run   to fix any linting issues locally. This can be done using:
 * 2) Run   to identify any issues that could not be fixed automatically. This can be done using:
 * 3) Run Translate extension test cases:

After submitting the patch:
 * 1) You should see a Verified: +2 from jenkins-bot. If not, you can check the comments from jenkin-bot where one of the build links would have failed. Opening that link and going through the logs should help you identify what that issue is.