Ajuda:Extensão:Translate/Primeiros passos no desenvolvimento

This page is a translated version of the page Help:Extension:Translate/Getting started with development and the translation is 28% complete.

Obrigado pelo seu interesse em contribuir para a extensão 'Translate'. O objetivo deste documento é facilitar o início do desenvolvimento na extensão 'Translate'.

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

Familiarizar-se com o código

The following pages should help you get an overview of the code:

  1. Various components of the Translate extension
  2. Glossary: Describes the terminology used
  3. PHP Namespace structure
  4. Various configuration options supported by Translate
  5. MediaWiki jobs used in Translate

Configuração do desenvolvimento local

The easiest way to get started with development on Translate extension is to use the MediaWiki-Docker . Por favor, veja as instruções aqui.

To run some code sniffs specific to Translate extension, you can run composer install inside the Translate extension directory. You can use the following command: docker-compose exec mediawiki sh -c "cd extensions/Translate && composer install"

Convenções de programação

'Translate' segue as convenções de programação do MediaWiki existentes. 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.

Escolher o que trabalhar

Go to the Translate Phabricator Board and look for tasks with the tag: good first tasks.

Because the extension is actively being worked on, before you start work on a task, we recommend leaving a comment about any additional concerns that are not reflected in the task currently.

After you receive the green light, you can go ahead and assign the task to yourself and start working.

Lista de verificação da submissão de correções

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, it's recommended to run linting tools and test cases locally to ensure that simple issues can be identified and fixed early. This helps reduce the back and forth during code reviews.

  1. Run phpcbf to fix easily fixable linting issues locally. This can be done using: docker-compose exec mediawiki composer fix extensions/Translate
  2. Run other linters to identify any issues that could not be fixed automatically. This can be done using: docker-compose exec mediawiki sh -c "cd extensions/Translate && composer test"
  3. Run Translate extension test cases: docker-compose exec mediawiki sh -c "composer phpunit:entrypoint -- extensions/Translate/tests/phpunit/"

Outras hiperligações úteis