Pootle container
This is a custom container that builds Pootle with the workflow specifically for Haiku.
It depends on:
- PostgreSQL (we use postgres:9.6)
- Redis (we use redis:4.0)
On the actual instance, it is good to use a persistent volume mounted at /var/pootle.
The volume should contain the following:
- A configuration file named
settings.conf(this is created automatically the first time) - A configuration file named
sync-config.toml(this file should follow the format of the sync-config.toml.example file that will be inst) - A
logsdirectory - A
catalogsdirectory with the pootle catalogs - A
repositorydirectory that contains the haiku repository - A
syncdirectory that will contain the synchronization status
The pootle-entrypoint.sh contains on specialized run command:
pootlewhich starts an nginx frontend, cron for the weekly sync, a pootle server and a pootle rqworker
Configuring the Haiku Repository
In order to make sure that the catkeys for WebPositive are build, you need to
manually enable the webkit feature. Within the /var/pootle/repository dir,
add a generated/UserBuildConfig file with the line EnableBuildFeatures webkit ;.
Synchronization
Synchronization is a list of actions that need to be taken to roughly:
- Write the latest translations to the disk (using pootle's
sync_storescommand) - Extract the latest catalog templates in English from the source (
jam -q catkeys) - Update the translated files to include new strings, and drop old ones (
import_templates_from_repository.py) - Update the state of the database to represent the merged files (pootle's
update_stores) - Post process the translated files, like remove the empty (untranslated) lines (
finish_output_catalogs.py) - Commit them to the Haiku repository, and push them upstream.
These steps are executed by the /app/synchronize.py script. The steps are configured in the
/var/pootle/sync-config.toml file. Most notably, the list of output languages can be configured there.
The image is set up in such a way that every Saturday at 08:00 AM, the script will run. The script will output all the
console output online (https://i18n.haiku-os.org/pootle/sync-status.html), as well as send an email.