[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Quote usage in gettexted WML



Hi,

On Thu, Sep 01, 2011 at 04:56:34PM +0200, David Prévot wrote:
> Le 16/08/2011 11:35, Jeroen Schot a écrit :
> […]
> > I think the right solutions is to simply replace
> > the single quotation marks with double quotation marks.
> 
> > I have attached a patch that does this. I can commit it myself if
> > there are no objections to it, but would be more confident if a
> > regular committer would do this.
> 
> Does your patch works ? I mean extracting the PO string *and* building
> the resulting page (I would be surprised, in an happy way: I can
> remember some headaches over there).

Yes, I have tested it with the translation statistics, stattrans.pl
+ make in {english,dutch}/devel/website. No errors and the resulting
pages look OK.

This same format is already used in template/debian/wnpp.wml:

    <: printf "<gettext domain="wnpp">%s days in adoption.</gettext>", %0; :>
    
    <: printf "<gettext domain="wnpp">%s days in adoption, last activity today.</gettext>", %0 :>
	
    <: printf "<gettext domain="wnpp">%s days in adoption, last activity yesterday.</gettext>", %0 :>

> > Index: english/template/debian/legal.wml
> > ===================================================================
> > RCS file: /cvs/webwml/webwml/english/template/debian/legal.wml,v
> > retrieving revision 1.13
> > diff -u -r1.13 legal.wml
> > --- english/template/debian/legal.wml	16 Aug 2008 12:25:43 -0000	1.13
> > +++ english/template/debian/legal.wml	16 Aug 2011 15:32:04 -0000
> > @@ -46,10 +46,10 @@
> >  <h1>\
> >  <ifeq "<license-version/>" ""
> >  # title string without version, on the form "dls-xxx - license name: status"
> > -"<: printf( '<gettext domain="legal">%s  &ndash; %s: %s</gettext>',
> > +"<: printf( "<gettext domain="legal">%s  &ndash; %s: %s</gettext>",
> 
> Doesn't printf consider the “<gettext domain=” string only, and the
> build brake because of the extra arguments or something like that ?

I have no idea how the gettext string extraction works, but apparently
not.

> Escaping the extra double quote would brake the gettext string
> extraction IIRC: “<gettext domain=\"legal\">[…]” won't be recognize, or
> worse.
> 
> Anyway, a proper solution would be welcome here (if you've double
> checked your patch, I'll test it too ;-).

I have double checked the patch, so I would really appreciate it if
you could test it.

Regards,
-- 
Jeroen Schot


Reply to: