Skip to content

Latest commit

 

History

History
63 lines (39 loc) · 3.36 KB

CONTRIBUTING.md

File metadata and controls

63 lines (39 loc) · 3.36 KB

Contributing tips

This file describes some non-obvious points of this project which needs to be known by contributors.

Technology stack

Text Pieces is written in Vala using GTK 4 and libadwaita as GUI libraries. Text Pieces is designed to comply GNOME HIG guidelines. It also uses gtksourceview for text editor widget and json-glib for JSON serialization and deserialization.

Text Pieces' built-in tools uses Python and Bash as interpreters, pyyaml for JSON to YAML and YAML to JSON conversion and gettext for translations.

It also uses shebang for script executing, so it can work only on UNIX-like OSes.

Build system

Text Pieces uses Meson as build system and Flatpak as packaging system. Flatpak manifest is stored at build-aux/flatpak/com.github.liferooter.textpieces.yaml.

Conventions

Text Pieces uses some conventions:

Post-commit checks

There are some things you should do after making changes in project code:

Update translation templates

If you've changed any translatable strings in application, you should update translations:

./po/update-po.sh

If you've changed translatable strings in data/tools.json, please add your changes manually to po/tools.pot.

Licensing checks

As Text Pieces is REUSE-compilant project, you have to copyright headers in any file you create or edit. The simpliest way to do it is:

pip install --user reuse
reuse addheader --copyright 'YOUR NAME <YOUR@EMAIL.ADDRESS>' --year CURRENT_YEAR LICENSE_NAME FILE_NAME

Copyright policy

Text Pieces is open-source project and will stay open-source forever. To make this rule non-breakable, you should add your copyright to any file you change or create. This makes license changing impossible without permission from everyone who ever contributes to the project.

Creating translation

Text Pieces uses gettext for localization. Translations can be suggested by PR. The only important point is po/tools.pot. It's manually-written translate template for tools metadata (gettext can't extract translatable strings from JSON files). Translators have to insert its translation right after po/textpieces.pot translation. Also translator should place their copyright note in translation file.