[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Word order in Guix l10n
From: |
Ludovic Courtès |
Subject: |
Re: Word order in Guix l10n |
Date: |
Tue, 22 Dec 2020 16:00:35 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
Hi,
Arun Isaac <arunisaac@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’.
Re: Word order in Guix l10n, Arun Isaac, 2020/12/15