From: Markus Wichmann <nullplan@gmx.net>
To: musl@lists.openwall.com
Subject: Re: [musl] Selecting locale source format
Date: Wed, 1 Oct 2025 19:21:24 +0200 [thread overview]
Message-ID: <aN1jFOTqHkT-5J0B@voyager> (raw)
In-Reply-To: <ea10842daa12b344be1f24232e3b62e41f673757.camel@postmarketos.org>
Am Wed, Oct 01, 2025 at 03:55:59PM +0200 schrieb Pablo Correa Gomez:
> We got now a few replies from translators, and the most remarkable
> thing that was brought up is how to deal with natural text whose
> translations might change depending on context. Both plural forms and
> declinations were brought up.
>
> Discussing a bit with Rich, it seems that such thing will not be an
> issue for strings related to the libc API, which is what is the biggest
> concern of the work we are doing now. However, there are
> implementation-dependent strings in libc, like dynamic linker messages,
> which could potentially be added in the future. Still, since we are
> setting the file format, it would be important to make sure that
> whatever we come up now is flexible enough to not block future
> development. Any thoughts?
The msgfmt source format specified by POSIX allows multiple plurals and
an arbitrary C expression to select the correct one. So that is one way
to go. The alternative is to stay agnostic to numbers and just always
use all forms in parentheses, e.g. "Loaded %d file(s)".
While I appreciate that the necessity for an expression parser might
increase complexity by a lot, what little I do remember of Russian
suggest that not many simpler alternatives exist. In Russian, just for
example, there are three numbered forms, namely the nominative singular,
the nominative plural, and the genitive plural. The nominative singular
is used whenever the number in question ends in 1 but not 11, the
nominative plural is used for 2-4 but not 12-14, and the genitive plural
is used in all other cases.
That logic is specific to one language (although I suspect a lot might
be shared with other Slavic languages), so it must be specified in the
source format if the feature is desired at all.
Ciao,
Markus
next prev parent reply other threads:[~2025-10-01 17:21 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-17 1:14 Rich Felker
2025-09-17 1:23 ` A. Wilcox
2025-09-17 1:36 ` Rich Felker
2025-09-19 14:06 ` Pablo Correa Gomez
2025-09-17 15:43 ` enh
2025-09-17 17:37 ` Rich Felker
2025-09-17 20:31 ` Rich Felker
2025-09-19 13:59 ` Pablo Correa Gomez
2025-10-01 13:55 ` Pablo Correa Gomez
2025-10-01 17:21 ` Markus Wichmann [this message]
2025-10-01 17:51 ` Demi Marie Obenour
2025-10-02 2:34 ` Rich Felker
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aN1jFOTqHkT-5J0B@voyager \
--to=nullplan@gmx.net \
--cc=musl@lists.openwall.com \
/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.vuxu.org/mirror/musl/
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 NNTP newsgroup(s).