[pology] Automatically setting PO header using set-header sieve when merging
Chusslove Illich
caslav.ilic at gmx.net
Wed Jul 11 23:39:55 PDT 2018
> [: Karl Ove Hufthammer :]
> But I can’t figure out what ‘* magic stuff *’ should be to properly run
> the ‘set-header’ sieve. Can anyone help?
There's no direct way to call the set-header sieve itself, but the same
operation can be performed easily enough by writing a short hook function:
def normalize_header (hdr, cat):
hdr.title[:] = ['Translation of %s to MyLangName' % cat.name, '']
hdr.license = None
hdr.copyright = None
hdr.comment[:] = []
return 0
S.hook_on_merge_head.extend([
(normalize_header,),
])
--
Chusslove Illich (Часлав Илић)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.nedohodnik.net/pipermail/pology-nedohodnik.net/attachments/20180712/7f5e511a/attachment.sig>
More information about the pology
mailing list