Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Running xgettext on diff/patch files

0 views
Skip to first unread message

Cristian Rigamonti

unread,
Nov 15, 2009, 3:16:04 PM11/15/09
to bug-gnu...@gnu.org
Hi, I'd like to run xgettext on some patches containing PHP code, to create a
.pot file containing only strings contained in the patches, instead of all
strings contained in the patched files.

However, xgettext silently ignores the diff/patch input file, creating an empty
output file. Renaming the input file with a .php extension doesn't help. It
seems that xgettext actually checks the syntax of the input file and refuses to
work on diff/patch files. Is this an intended behaviour or a bug?

So far, the only way I found is to trick xgettext appending a bogus "<?php" line
to the beginning of the patch, and removing any "?>" in it; but I guess if
there is a more orthodox way to do it...

Cri

--
GPG/PGP Key-Id 0x943A5F0E - http://www.linux.it/~cri/cri.asc

signature.asc
0 new messages