From: "A. Wilcox" <awilfox@adelielinux.org>
To: musl@lists.openwall.com
Subject: Re: Bikeshed invitation for nl_langinfo ambiguities
Date: Sun, 26 Nov 2017 20:57:25 -0600 [thread overview]
Message-ID: <5A1B7F15.4050808@adelielinux.org> (raw)
In-Reply-To: <20171127010700.GW1627@brightrain.aerifal.cx>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
On 26/11/17 19:07, Rich Felker wrote:
>> I would personally recommend actually using the enum values as
>> the strings to translate. _("MON_5"), _("ABMON_5"), etc; this
>> is non-ambiguous, easily understandable and describable for
>> translators, and does not require weird hacks at the
>> implementation or ABI level.
>
> This is certainly one possibility, but it does result in embedding
> a number of "useless" strings that are never used themselves, only
> as translation keys, in the binary. One nice property of it
> (especially if we did the same for strerror keys) is that it
> eliminates the need for translation files to care about changes in
> the text in musl.
That was the idea, yes. This would work for *all* translatable
strings, not just the nl_langinfo ones.
>> Of course, then a "C" / "POSIX" strings file must be present.
>> But this is, in my opinion, a very small sacrifice to ensure full
>> purity and ease of translation.
>
> This is of course not acceptable.
"Of course"? Why not? The reason this wouldn't be acceptable is not
obvious to me.
> I have in mind a way we could potentially avoid this: passing keys
> like "ABMON_5" to __lctrans, and if it returns back the key (which
> is what happens with the stub implementation or with no translation
> present), use the builtin C locale strings instead.
That would work.
> I don't follow; there are only two duplicate strings and they are
> "May" and "%H:%M:%S". The number does not grow with the number of
> translations because it's a property of the untranslated strings
> not the translated ones.
If you are returning (string+1), then all strings need to have the " "
at the beginning, or else you are going to return "ai" instead of
"mai" for French and so on.
Best,
- --arw
- --
A. Wilcox (awilfox)
Project Lead, Adélie Linux
http://adelielinux.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAEBCAAGBQJaG38SAAoJEMspy1GSK50UblkQAMqHOuqFTrgbV6k5+6scBc2y
a6IcldAupt6swk1b/+Bzro7n3DVcVhoBOV97ofyPSlwT1OOzFCoc6ljeqR1+TUgZ
ZaFyOPICpS/1xnBqiipiQgQjn0a9/ZH7fDeb54aP3F0Jp18hrjwpvFduWcNItx/D
AonDoUGecrahwwBYUYjk7GJ6Hp2hqeVGPLTpNWKwDkXTvN1CQ9HTCTRsBdaBkuFh
CevzYbt4m+BQblcr4IdCHlKr5Yenb8s5aHCvV8ag/PhC1uFD6/MFu6kgKQbyqjfr
ji9mD4xoX/l0rrUXqPGpdLRs5OwCpda42lGxUu9gGIUDrMt3v3YAPXTbsePTa6H6
+9cPNd562OqTqoCDiG6V7pWSapyDK+eR7swwnqNDe1Z8AyHZN3/2tJ3Gr/jH98Ko
Vvjyv4sybiAgqdiu5Q/v1kKX0hVafOz7KNRKQuFt9kiUG8bj6S714CYg3WCFW7uk
30KdhI02Iy888y/nZIn6ApzmCsmx42ZZeG16CqgsbizXuyZK1kndXSaPuE7TG7Ot
0vxiz5B1Zv0ftqgEMaFeG1yqNpCPINhyYRjWMMohfrm9hi7gXQEtYWb4o+ibmb52
I/iCYdvRCcfPll48p3MNIc3w8zUDVs2vF86WQhX0nrWNnwI6urTmOdnC3L5fM4zz
CzCoHkaHJIj2HEPE0V2o
=MtiD
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2017-11-27 2:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-11 2:06 Rich Felker
2017-11-26 23:19 ` A. Wilcox
2017-11-27 1:07 ` Rich Felker
2017-11-27 2:57 ` A. Wilcox [this message]
2017-11-27 5:09 ` Rich Felker
2018-03-03 5:08 ` Rich Felker
2018-03-05 17:10 ` 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=5A1B7F15.4050808@adelielinux.org \
--to=awilfox@adelielinux.org \
--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).