From 3a8e5b0cb9cf5bc1fb7c3db7e0548dd9e6305b72 Mon Sep 17 00:00:00 2001 From: deltragon Date: Wed, 7 Aug 2024 15:06:41 +0200 Subject: [PATCH] Document validate_po.py script in readme and github PR template --- .github/pull_request_template.md | 5 +++++ README.md | 8 ++++++++ 2 files changed, 13 insertions(+) create mode 100644 .github/pull_request_template.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..9af2b10 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,5 @@ +## Description + +Describe your changes here, and link to related issues if available. + +Reminder to run `python validate_po.py --extract` if you have added new translatable strings. diff --git a/README.md b/README.md index 0fdc060..fb5f06d 100644 --- a/README.md +++ b/README.md @@ -184,6 +184,14 @@ For more details, please check the issue: [#329](https://github.com/slgobinath/S Thirdparty plugins are available at another GitHub repository: [safeeyes-plugins](https://github.com/slgobinath/safeeyes-plugins). More details about how to write your own plugin and how to install third-party plugin are available there. +## Local development + +When adding new translatable strings in the source code, make sure to run `python validate_po.py --extract` to add them to the translation template. You will need to install `python3-polib` for this. + +Examples for translatable strings are `_("This is a string")` in Python code, or `This is a label` in Glade/xml files. + +To ensure the new strings are well-formed, you can use `python validate_po.py --validate`. + ## How to Release? 0. Run `update-po.sh` to generate new translation files (which will be eventually updated by translators). Commit and push the changes to the master branch.