[postgis-devel] Weblate/Transifex status

Sandro Santilli strk at kbt.io
Tue Jan 11 04:24:29 PST 2022


On Mon, Jan 10, 2022 at 11:15:42PM -0500, Regina Obe wrote:
>
> I was thinking we can have weblate push directly to our repo.  It keeps the
> author details so we know who is pushing what.
> That seems like the easiest workflow.

What I'm not fully comfortable with, in this scenario, is that the
translation MAY break building documentation (I fixed one such case
recently). This happens becauase the message strings DO contain tags
and if those tags are not retained in a correctly balanced way, they
cannot be converted back to proper XML.

I'd like changes to be tested before they are pushed to
the official repository, which at the moment (according to
doc/po/README) is mandated to the developer to do.

> So workflow
> 1) Webhook for weblate to pull changes on each commit (I have that on my
> fork (and postgis-workshop which is live) )

I agree on this part, and I've updated the Weblate configuration to
actually pull from the official "postgis" repository, for the
"postgis" project ("master" branch, meaning it will NOT pull changes
pushed on the "main" branch [pity]).
See https://weblate.osgeo.org/projects/postgis/postgis/#repository

> 2) Deploy key to allow weblate to push changes (I have that on my fork as
> well, for postgis-workshop, can't use deployment key so had to go with a
> dedicated osgeoweblate user which other osgeo projects can invite to commit
> (Daniel Kastl is trying it on one of his projects) ).

I'd be careful with this unless we find a way to have Weblate *test*
the translations by actually building the localized documentation.
At the bare minimum we want to make sure CI turn red if such
event occurs.

> On weblate side workflow -
> https://weblate.osgeo.org/settings/postgis/#workflow ,
> https://weblate.osgeo.org/settings/postgis/postgis/#vcs  
> a) Squash commits by author to minimize on trillions of little commits by
> the same author.

+1

> b) Age of commit (I have set to 0), but can up to like an hour or more again
> to reduce small commits.

If we open up the possibility of CI breaking (recommended by me) we
might actually prefer fine-grained commits, to more easily spot which
commit introduced the problem ?

> c) For extra caution, we could require dedicated reviewers to approve
> translations and source strings.

As long as the reviewer is also able to test if the translation are
still valid (can localized documentation be built?).

> So I just manually merge and push from my fork to master.

At the moment Weblate will pull(merge) from master branch of official
repository, and still push to your fork.

> I think we said we would retire transifex first before going live and that
> would simplify the workflow considerably.
> On weblate, I have autodiscovery addin enabled, which means on every push on
> postgis, it just monitors for new/deleted files here - 
> https://git.osgeo.org/gitea/postgis/postgis/src/branch/master/doc/po/templat
> es  and creates new components accordingly

This is great, I'm just disappointed by the fact that the webhook
based setup will behave differently if people push to "master" or
to "main", annoying fact :/

--strk;

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


More information about the postgis-devel mailing list