All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: Alberto Garcia <berto@igalia.com>
Cc: qemu-devel@nongnu.org, Markus Armbruster <armbru@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] gtk: use setlocale() for LC_MESSAGES only
Date: Fri, 11 Sep 2015 11:12:55 +0200	[thread overview]
Message-ID: <1441962775.29362.15.camel@redhat.com> (raw)
In-Reply-To: <1441898372-32679-1-git-send-email-berto@igalia.com>

>  void early_gtk_display_init(int opengl)
>  {
> +    /* The QEMU code relies on the assumption that it's always run in
> +     * the C locale. Therefore it is not prepared to deal with
> +     * operations that produce different results depending on the
> +     * locale, such as printf's formatting of decimal numbers, and
> +     * possibly others.
> +     *
> +     * Since GTK+ calls setlocale() by default -importing the locale
> +     * settings from the environment- we must prevent it from doing so
> +     * using gtk_disable_setlocale().
> +     *
> +     * QEMU's GTK+ UI, however, _does_ have translations for some of
> +     * the menu items. As a trade-off between a functionally correct
> +     * QEMU and a fully internationalized UI we support importing
> +     * LC_MESSAGES from the environment (see the setlocale() call
> +     * earlier in this file). This allows us to display translated
> +     * messages leaving everything else untouched.
> +     */
> +    gtk_disable_setlocale();

Thanks.  Replacing my version with this one.

cheers,
  Gerd

  reply	other threads:[~2015-09-11  9:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-10 15:19 [Qemu-devel] [PATCH] gtk: use setlocale() for LC_MESSAGES only Alberto Garcia
2015-09-11  9:12 ` Gerd Hoffmann [this message]
2015-12-18 11:38 ` Kevin Wolf
2015-12-18 13:23   ` Gerd Hoffmann
2015-12-18 15:38     ` Kevin Wolf
2015-12-18 18:04     ` Alberto Garcia
2015-12-18 19:55       ` Markus Armbruster
2015-12-21 17:49         ` Eric Blake

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=1441962775.29362.15.camel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=armbru@redhat.com \
    --cc=berto@igalia.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.