Git migration: addition of pipeline and gitignore

Philipp Kiemle l10n.daphipz at fastmail.de
Fri Nov 6 11:26:18 GMT 2026


Hi!

> Meaning that any error from msgfmt will be silent for the committer, unless checking comments on some page, right?
> If that's correct, is there any way of sending an email warning of any error? Of course it's possible to always run msgfmt locally on all modified files before committing, but surely is a tedious task ;)

You can implement a git hook locally on your machine to automate this: https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks
Put whatever code you want to run under ".git/hooks/pre-commit" (or pre-push, if you want to run it only when pushing to Invent) and it'll check your files automatically.

Be aware however that these hooks are not under version control (unlike GitLab CI files). So if your team has multiple committers, you need to distribute these hooks by other means.

Cheers,
Philipp

Am Fr, 6. Nov 2026, um 10:43, schrieb Sveinn í Felli:
> Þann 6.11.2026 09:15, skrifaði Johnny Jazeix:
> > Hi,
> > I've added a pipeline to check the po files using msgfmt to all
> > added/updated files on commits.
> > In svn, it was a pre-commit hook preventing the push but we cannot do
> > the same in Git so it is a pipeline that will check, either on MR or
> > on commits on master that the po files are correct.
> 
> Meaning that any error from msgfmt will be silent for the committer, 
> unless checking comments on some page, right?
> If that's correct, is there any way of sending an email warning of any 
> error? Of course it's possible to always run msgfmt locally on all 
> modified files before committing, but surely is a tedious task ;)
> 
> Getting the line number of the error in SVN/msgfmt was crucial.
> 
> Best regards,
> Sveinn í Felli
> 
> > The script is in
> > https://invent.kde.org/sysadmin/ci-utilities/-/blob/master/po-lint.sh?ref_type=heads,
> > maybe we can think of other steps in the pipeline for the future.
> > 
> > After discussion in
> > https://invent.kde.org/teams/localization/issues/-/work_items/1#note_1693853,
> > we also added a default .gitignore to all repos:
> > https://invent.kde.org/localization/l10n-af/-/blob/master/.gitignore?ref_type=heads.
> > If you think it makes sense to add more generic filters on all repos,
> > please tell so we can all benefit of it.
> > 
> > Cheers,
> > Johnny
> 
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-i18n-doc/attachments/20261106/bef5d0a8/attachment.htm>


More information about the kde-i18n-doc mailing list