Opened 14 months ago

Last modified 13 months ago

#5381 new defect

Catch errors in weblate with a pre-commit hook

Reported by: robe Owned by: strk
Priority: medium Milestone: Website Management, Bots
Component: documentation Version: master
Keywords: Cc:

Description

This would be to catch issues like this

https://woodie.osgeo.org/postgis/postgis/build/308/1

1212
/usr/bin/xsltproc --novalid --path ../../../../doc/po/fr xsl/postgis_aggs_mm.xml.xsl postgis-out.xml > postgis_aggs_mm.xml
206s
1213
administration.xml:222: parser error : EntityRef: expecting ';'
206s
1214
>Pas de chemin de migration défini pour ... vers &last_release_version ;</progr
206s
1215
^

Where user puts a space before ;

Change History (4)

comment:1 by strk, 14 months ago

I've no idea how weblate would react to a failing pre-commit hook, should be tested on some staging deploy

comment:2 by strk, 14 months ago

From the #weblate IRC channel on libera.chat someone suggested we could write custom checker for weblate: https://docs.weblate.org/en/latest/admin/checks.html#writing-own-checks

comment:3 by strk, 14 months ago

We could also consider using auto-fix for the XML entities — time to experiment a bit on a staging machine (with no automatic push!) ?

comment:4 by robe, 13 months ago

Milestone: PostGIS 3.4.0Website Management, Bots
Owner: changed from robe to strk
Note: See TracTickets for help on using tickets.