2.2 KiB
Contributing
You're welcome to contribute to the code or to the translations!
Contributing to the code
Create a new branch describing what your're working on, for example feature/{name-of-the-feature} or theme/{name-of-the-theme}. When you're done, commit all your changes and create a new merge request. Choose the appropriate merge request template.
Coding style
Please follow the coding style of each file.
Copyright notice
If you make changes to a file, please add your copyright notice at the top of the file, in the form Copyright (C) YEAR Your Name.
Themes and unit tests
If you add support for a theme, please write a unit test for each of its variants, in the tests directory, with the theme name as filename. Unit tests are written for AVA and run with node and npm.
To install the tests dependencies:
npm install
To run the tests:
make test
Contributing to the translations
The extension uses Gettext for its localization. When working on a translation, create a new branch named translation/{language}.
Updating an existing translation
First update all the strings in the source code:
make pot
Then update the translations files:
make update-po
You can then edit the language you want in src/po/, either by hand or with a tool like GNOME Translation Editor.
When you're done, commit both the .pot file and the .po file you've worked on and create a new merge request.
Adding a new translation
First update all the strings in the source code:
make pot
Then run the following command, replacing {language-code} with the actual code of the language you want to add:
make add-po LANGUAGE_CODE={language-code}
You can then edit the new {language-code}.po file in src/po/, either by hand or with a tool like GNOME Translation Editor.
When you're done, commit both the .pot file and the .po file you've worked on and create a new merge request. Choose the appropriate merge request template.