This file describes some non-obvious points of this project which needs to be known by contributors.
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.
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
.
Text Pieces uses some conventions:
- Conventional Commits for commit messages
- Elementary Codestyle for Vala code
- PEP 8 for Python-based tools
- REUSE licensing conventions
- GNU GPL 3.0 or later license for code, CC0 licencse for metadata and anything else
- Semantic Versioning
- GNOME HIG for user interface
There are some things you should do after making changes in project code:
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
.
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 <[email protected]>' --year CURRENT_YEAR LICENSE_NAME FILE_NAME
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.
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.