From: Markus Armbruster <armbru@redhat.com>
To: "Daniel P. Berrange" <berrange@redhat.com>
Cc: Alberto Garcia <berto@igalia.com>,
Gerd Hoffmann <kraxel@redhat.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] QEMU produces invalid JSON due to locale-dependent code
Date: Wed, 26 Aug 2015 14:04:12 +0200 [thread overview]
Message-ID: <87d1yap877.fsf@blackfin.pond.sub.org> (raw)
In-Reply-To: <20150826095752.GD21787@redhat.com> (Daniel P. Berrange's message of "Wed, 26 Aug 2015 10:57:52 +0100")
"Daniel P. Berrange" <berrange@redhat.com> writes:
> On Wed, Aug 26, 2015 at 08:46:35AM +0200, Gerd Hoffmann wrote:
>> Hi,
>>
>> > > It seems the only thing that we really care about being localized is
>> > > the messages catalogue, so the GTK UI gets internationalization in
>> > > its menus / dialogs / etc. As such I think that we should do the
>> > > opposite of (C). ie run every LC_* in the C locale, except for
>> > > LC_MESSAGES which we allow to be localized.
>> > >
>> > > This avoids any unpredictable functional consequences (like number
>> > > formatting) while still giving user decent localization in the UI
>> >
>> > Except that the LC_MESSAGES catalog may include messages such as "blah
>> > %d blah" that get translated for use as a printf argument, and the lack
>> > of matching LC_NUMERIC will make the translation look wrong.
>> > Translators often assume that their translation is being used with
>> > everything else about the locale matching the locale of the translation.
>>
>> I don't think this is a big issue in practice. The menu item names are
>> pretty much the only thing translated in the qemu gtk ui ...
>
> Also we're talking about a tradeoff between functionally incorrect
> formatting of JSON, vs "wrong looking" translations with no functional
> impact, which probably won't even affect QEMU in reality.
>
> In terms of minimizing hacks to QEMU, it seems like only localizing
> LC_MESSAGES is a simple enough tradeoff to avoid functionally
> incorrect behaviour with minimal downside and no code complexity
> messing around with thread-locales, etc
It's a hack, and as such it needs a fat comment explaining it.
prev parent reply other threads:[~2015-08-26 12:04 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-18 23:57 [Qemu-devel] QEMU produces invalid JSON due to locale-dependent code Alberto Garcia
2015-08-24 8:58 ` Daniel P. Berrange
2015-08-24 10:05 ` Markus Armbruster
2015-08-24 10:29 ` Alberto Garcia
2015-08-24 17:07 ` Markus Armbruster
2015-08-24 17:18 ` Eric Blake
2015-08-25 7:54 ` Markus Armbruster
2015-08-25 8:15 ` Alberto Garcia
2015-08-25 12:51 ` Markus Armbruster
2015-08-26 9:13 ` Alberto Garcia
2015-08-26 9:22 ` Daniel P. Berrange
2015-08-26 9:47 ` Markus Armbruster
2015-08-24 17:56 ` Daniel P. Berrange
2015-08-24 20:27 ` Eric Blake
2015-08-26 6:46 ` Gerd Hoffmann
2015-08-26 9:57 ` Daniel P. Berrange
2015-08-26 12:04 ` Markus Armbruster [this message]
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=87d1yap877.fsf@blackfin.pond.sub.org \
--to=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=berto@igalia.com \
--cc=kraxel@redhat.com \
--cc=qemu-devel@nongnu.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.