From: "Miguel Ángel Arruga Vivas" <rosen644835@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org, Zhu Zihao <all_but_last@163.com>
Subject: Re: Word order in Guix l10n
Date: Tue, 22 Dec 2020 16:45:12 +0100 [thread overview]
Message-ID: <87lfdpyhdj.fsf@gmail.com> (raw)
In-Reply-To: <871rfh28do.fsf@gnu.org> ("Ludovic Courtès"'s message of "Tue, 22 Dec 2020 16:00:35 +0100")
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
next prev parent reply other threads:[~2020-12-22 15:45 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-15 10:53 Word order in Guix l10n Zhu Zihao
2020-12-15 12:25 ` Julien Lepiller
2020-12-18 15:04 ` Ludovic Courtès
2020-12-18 18:03 ` Arun Isaac
2020-12-22 15:00 ` Ludovic Courtès
2020-12-22 15:06 ` Julien Lepiller
2020-12-23 12:22 ` Miguel Ángel Arruga Vivas
2020-12-27 22:13 ` Ludovic Courtès
2020-12-22 15:45 ` Miguel Ángel Arruga Vivas [this message]
2020-12-15 13:11 ` Arun Isaac
2020-12-15 13:51 ` Zhu Zihao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lfdpyhdj.fsf@gmail.com \
--to=rosen644835@gmail.com \
--cc=all_but_last@163.com \
--cc=guix-devel@gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).