[postgis-devel] Proposal for workflow of translations

Sandro Santilli strk at kbt.io
Fri Jan 28 07:00:43 PST 2022


I've just pushed a configuration of Drone CI bots so they will
test that localized documentation can be built. This means
that bots will become RED if translations break in some structural
way (ie: malformed tags).

This kind of breakage actually happens, pretty frequently, because
Weblate isn't performing *any* test prior to pushing commits to
the official repository. For example:
https://trac.osgeo.org/postgis/ticket/5071

In order to reduce the broken commits pushed to the master branch
I'd like to propose a different workflow, closer to the one we
had before we switched from Transifex to Weblate.

The workflow was more or less:

  [ Get translations from platform ]

  - A Developer decides when to fetch translations from
    the crowd-sourced platform

  - The developer takes the responsibility to ensure
    localized documentation can be built

  [ Update translation templates and acutal translations in platform ]

  - A Developer decides when to update templates (needed when the
    source string change), pushes updates to platform

  - A Developer decides when to update translations and
    pushes updates to platform

To support the above workflow we used to have two Makefile rules:

  - make pull-tx
  - make push-tx

Now, I'm happy with the automated way Weblate receives the updates
doen in the repository, which drops the need for the `make push-tx`
rule, but I'm not very happy with the automated wey Weblate pushes
the platform-mediated updates to our repository.

So my proposal is: make _pulling_ translation from platoform
a manual operation while keeping the the push automated.

The simplest way to manually pull from Weblate would be using
git itself:

  git checkout new_translations
  git pull https://weblate.osgeo.org/git/postgis/postgis
  make docs-localized # until all works
  git rebase -i master # squash/edit as appropriate
  git checkout master && git branch new_translations && git push

If needed, the `pull-tx` Makefile rule could be added back, to
take care of the pull from Weblate.

What's your opinion on this proposed workflow ?

NOTE: to implement such workflow we would basically only drop the
      automated push from Weblate to Gitea, which is also more
      secure as we wouldn't need to grant Weblate write access
      to the repo

--strk; 

  Libre GIS consultant/developer
  https://strk.kbt.io/services.html


More information about the postgis-devel mailing list