develooper Front page | perl.i18n | Postings from October 2003

Re: xgettext and parameter reordering

Thread Previous | Thread Next
From:
Christophe Chisogne
Date:
October 6, 2003 08:01
Subject:
Re: xgettext and parameter reordering
Message ID:
3F81839F.4020101@publicityweb.com
Guido Flohr wrote:
> I don't think that this is an option because xgettext.pl will also 
> double the backslash in the original string (like "xgettext --lang=C" 
> which doesn't know that a dollar sign has to be escaped in double-quoted 
> Perl strings).

That's right.
xgettext.pl gives wrong ..%2\\$d.. with src code like "..%2$d.."
It works with single quotes
xgettext.pl gives right ..%2$d..   with src code like '..%2$d..'
but then std xgettext dont work
(need "" until perl is natively supported by xgettext)

BTW I join a (very) simple patch for xgettext.pl to recognize
the std form gettext() and not only _().
(patch for rev #22 Change: 7746 2003/08/28 10:18:18)

> BTW: The new "xgettext --lang=perl" will extract *all* kinds of strings 

Native xgettext Perl support, exactly what I was looking for :)
Thanks, but...

I got the latest CVS snapshot of GNU gettext via savannah.gnu.org with
cvs -z3 -d :pserver:anoncvs@sources.redhat.com:/cvs/gettext co gettext
but it seems the added Perl support for xgettext is not there :(

$ ./xgettext --lang=perl /path/to/file.pl
xgettext: language `perl' unknown
... and in xgettext.c extension_to_language() I only see
/* Here will follow more file extensions: sh, pl ... */

Am I missing something ? (wrong cvs server?)

Christophe

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About