Subject: | xgettext doesn't handle concatenated strings |
I'm running perl-5.8.7 on Windows XP.
If I place the following in "foo.pm":
print loc('String one');
print loc('String' . ' two');
and then run the command:
xgettext foo.pm
then a "messages.po" file containing these msgid/msgstr pairs is created:
#: foo.pm:2
#. ( . ' two')
msgid "String"
msgstr ""
#: foo.pm:1
msgid "String one"
msgstr ""
Clearly this is not what I wanted.
Personally, I always wrap long lines at 80 characters, which often means breaking up a long text string into several concatenated pieces, so this failure renders xgettext just about unusable on my code.
I have a workaround -- use Cygwin's xgettext.exe instead -- but I would prefer to use the Perl one if possible because Cygwin's version needs more arguments to work and I don't always have Cygwin available anyway:
\cygwin\bin\xgettext -L perl --keyword=loc foo.pm