[Top][All Lists]

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

Re: [bug-gettext] javascript-format fails to recognize string reordering

From: Daiki Ueno
Subject: Re: [bug-gettext] javascript-format fails to recognize string reordering
Date: Mon, 08 Feb 2016 12:45:55 +0900
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Sean Burke <address@hidden> writes:

> Given a string "%s foo %s", the gjs JavaScript implementation allows these to 
> be reordered in a
> fashion similar to C, that is "%2$s foo %1$s". However, `msgfmt -vc' will 
> error on encountering
> this in a translation when the msgid is marked javascript-format, giving the 
> following:
> 'msgstr' is not a valid JavaScript format string, unlike 'msgid'. Reason: In 
> the directive number 1,
> the character '$' is not a valid conversion specifier.
> javascript-format should be made to understand this form of string 
> formatting, as c-format does.

Thanks for the report (and sorry for the shameless delay).

I have pushed a fix for that:

Numbered arguments in the width and precision part are not supported
yet, but I guess it wouldn't be a problem for gettext as it is ignored
at extraction phase and 'javascript-format' flag is not emitted.

Daiki Ueno

reply via email to

[Prev in Thread] Current Thread [Next in Thread]