[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Fwd: [gnu.org #360648] patch for gettext - reading multiline from P
From: |
Bruno Haible |
Subject: |
Re: [Fwd: [gnu.org #360648] patch for gettext - reading multiline from PHP] |
Date: |
Mon, 14 Jul 2008 00:44:25 +0200 |
User-agent: |
KMail/1.5.4 |
Hello,
Martin Edlman wrote:
> I've made a hack for x-php.c in the gettext package. It allows
> extracting multiline strings concatenated with the "." from PHP scripts.
This is already possible with xgettext version 0.17.
> The patch has few limitations, please see it on this URL:
> http://an.y-co.de/en/software/xgettext-php-patch.php.
xgettext 0.17 does not have these limitations. Try:
$ cat > foo.php <<EOF
<?
gettext("foo" . "bar");
gettext ("part1" . // here is some comment
" and part2");
gettext ('single' . "doublequoted");
?>
EOF
$ xgettext -o - --omit-header foo.php
#: foo.php:2
msgid "foobar"
msgstr ""
#: foo.php:3
msgid "part1 and part2"
msgstr ""
#: foo.php:5
msgid "singledoublequoted"
msgstr ""
Thanks for this suggestion. It just happens that someone else (Jan Engelhardt)
reported the same feature as missing already, so it was implemented.
Bruno