[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Word order in Guix l10n
From: |
Miguel Ángel Arruga Vivas |
Subject: |
Re: Word order in Guix l10n |
Date: |
Tue, 22 Dec 2020 16:45:12 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
Hi Ludo,
Ludovic Courtès <ludo@gnu.org> writes:
> 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).
I wouldn't think of absolute goto directive jumping to the previous
argument, it's just another chapter of the eternal debate regarding the
first ordinal: Common Lisp/SLIB/ice-9 use the '0' convention for the
'first' position---the smallest element from the set of natural
numbers---, instead of '1'. C-style arrays can be interpreted like this
too.
> Does xgettext support that syntax? We’ve had troubles before with ~*.
These troubles are related to plural forms[1]. Singular forms don't
have any issue because the type and number of format specifiers must
match always.
> If it does, where should we use this syntax in lieu of the simpler
> forms? Everywhere?
Yup, for singular forms (non-ngettext) it can be used everywhere right
now. The translation of plural forms could, at most, omit one numeric
directive (the one used for the ngettext call) to allow a more natural
way of expressing implicitly the numeral, but this will need to wait for
the next release of GNU gettext---the patch is almost there[2].
Nonetheless, the current version of msgfmt works correctly when no
format directive is omitted.
Happy hacking!
Miguel
[1] https://lists.gnu.org/archive/html/bug-gettext/2020-11/msg00027.html
[2] https://lists.gnu.org/archive/html/bug-gettext/2020-12/msg00041.html
- Word order in Guix l10n, Zhu Zihao, 2020/12/15
- Re: Word order in Guix l10n, Julien Lepiller, 2020/12/15
- Re: Word order in Guix l10n, Ludovic Courtès, 2020/12/18
- Re: Word order in Guix l10n, Arun Isaac, 2020/12/18
- Re: Word order in Guix l10n, Ludovic Courtès, 2020/12/22
- Re: Word order in Guix l10n, Julien Lepiller, 2020/12/22
- Re: Word order in Guix l10n, Miguel Ángel Arruga Vivas, 2020/12/23
- Re: Word order in Guix l10n, Ludovic Courtès, 2020/12/27
- Re: Word order in Guix l10n,
Miguel Ángel Arruga Vivas <=
Re: Word order in Guix l10n, Arun Isaac, 2020/12/15