hotosm / website

Other
2 stars 0 forks source link

As a developer, I want to set up a Weblate pipeline for managing the translation of static strings. #16

Open katporks opened 9 months ago

katporks commented 9 months ago

In this task, we aim to establish a Weblate pipeline to manage the translation of static strings. This will allow translators to work on translations directly in Weblate, and the translated strings will be integrated into our codebase through automated pull requests.

Based on the Weblate documentation, we plan to set up an automated workflow for receiving changes from GitHub. This involves installing the Weblate app on our hotosm/website repository, which will enable Weblate to automatically receive updates whenever there's a push to the main branch.

Additionally, we will create a separate component for the website within Weblate. This requires certain permissions, which have been granted.

Lastly, we will configure the method of propagating translation changes from Weblate to our GitHub repository. Instead of pushing changes directly, we will have Weblate create pull requests. This approach, described here, will allow us to review and approve changes before they're merged. This requires configuring the GITHUB_CREDENTIALS setting in Weblate with a username and a token.

Acceptance Criteria:

  1. The Weblate app is installed on the hotosm/website repository.
  2. A separate component for the website is created within Weblate.
  3. Weblate is configured to create pull requests for propagating translation changes.
  4. Translated strings can be successfully integrated into our codebase through automated pull requests.
katporks commented 9 months ago

A Github Action should be added to recompile the strings upon merging the pull request Weblate using make compilemessages unless Weblate recompiles them and updates the compiled .mo files for us - will investigate