[postgis-devel] Weblate/Transifex status

Regina Obe lr at pcorp.us
Mon Jan 10 20:15:42 PST 2022


> I saw commits generated by Weblate have been pushed to the master
> branch, how does this change the workflow recommended in
> doc/po/README ? There's no edit of that file so I'm wondering.
> 
> The workflow for Transifex was all manual, and was recommended to avoid
> *overriding* changes done on Transifex (ie: pull-tx, edit/update, push-tx)
--
> how does weblate change this ?
> 
[Regina Obe] 
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.

So workflow
1) Webhook for weblate to pull changes on each commit (I have that on my
fork (and postgis-workshop which is live) )
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) ).

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.
b) Age of commit (I have set to 0), but can up to like an hour or more again
to reduce small commits.
c) For extra caution, we could require dedicated reviewers to approve
translations and source strings.

#for access I currently have (Public)
https://weblate.osgeo.org/settings/postgis/#access
which means any authenticated user can contribute and all can see.
We could change to Protected (visible to all, but only chosen users can
contribute -- this is essentially the model we follow on transifex)
Except in case of OSGeo Weblate, since we only have it open to users with an
OSGeo account, we might not need that level of control.

> If we want to retain the ability to edit on any of the places (direct
commits in
> git, edits on Transifex, edits on Weblate) we should make sure any git
change
> is always pushed to the other platforms, and viceversa.
> 
> --strk;
> 
>   Libre GIS consultant/developer
>   https://strk.kbt.io/services.html
[Regina Obe] 

I have it just pointing at my fork since we are not live yet.
Want to get more traction on postgis-workshop to get a better feel.

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

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

There are additional behaviors we can configure here -
https://weblate.osgeo.org/addons/postgis/postgis/
But this is what I set
Component discovery

* Automatically adds or removes project components based on file changes in
the version control system.
* Regular expression to match translation files against
doc/po/(?P<language>[^/.]*)/(?P<component>[^/]*)\.xml.po File format gettext
PO file 
* Customize the component name {{ component }} Define the base file for new
translations doc/po/templates/{{component}}.xml.pot Language filter ^[^.]+$ 
* Clone addons from the main component to the newly created ones enabled 
* Remove components for inexistant files enabled

BTW looks like we have a bunch of dupe files in transifex. I'm not sure how
this happened.
I've just deleted some of the older dated ones.



More information about the postgis-devel mailing list