Hi,

Arun Isaac <arunis...@systemreboot.net> skribis:
>> This looks like a real issue.  I’m surprised this isn’t already
>> addressed though: after all, ‘printf’ format strings have the same
>> problem, right?  How does everyone else deal with that?
>
> For C's printf format strings, gettext supports special syntax to
> specify argument order. See
> https://www.gnu.org/software/gettext/manual/html_node/c_002dformat-Flag.html

Oh, I see.

> A German example is provided on that page.
>
> "%2$d Zeichen lang ist die Zeichenkette `%1$s'"

With (ice-9 format), as has been suggested before, we should be able to
do away with the “argument jumping” syntax (info "(guile) Formatted
Output"):

  (format #f "~1@*~d Zeichen lang ist die Zeichenkette `~0@*~a'" "ab" 2)

It’s a bit awkward though, in particular because we have to jump to the
previous argument (0 and 1 here instead of 1 and 2).

Does xgettext support that syntax?  We’ve had troubles before with ~*.

If it does, where should we use this syntax in lieu of the simpler
forms?  Everywhere?

Thanks,
Ludo’.

Reply via email to