도움말:확장기능:번역/Getting started with development
번역자 (주 도움말 페이지 )
번역 관리자
- 번역을 위한 페이지 준비하는 법
- 페이지 번역 관리
- 구조화되지 않은 요소의 번역
- Group management
- Move translatable page
- Import translations via CSV
- Working with message bundles
관리자와 개발자
번역 확장기능에 기여하는 데 관심을 가져주셔서 감사합니다. 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 may be 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:
- Various components of the Translate extension
- Glossary: Describes the terminology used
- PHP Namespace structure
- Various configuration options supported by Translate
- 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 related MediaWiki-Docker instructions.
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"
Coding conventions
Translate follows 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 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.
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, 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.
- Run
phpcbf
to fix easily fixable linting issues locally. This can be done using:docker-compose exec mediawiki composer fix extensions/Translate
- 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"
- Run Translate extension test cases:
docker-compose exec mediawiki sh -c "composer phpunit:entrypoint -- extensions/Translate/tests/phpunit/"
Other useful links
- MediaWiki code search – useful to see how certain hooks, or functions are used in other extensions.
- Open patches on Gerrit – you could help review.