gtk: use setlocale() for LC_MESSAGES only
commit2cb5d2a47c655331bcf0ab16bab8fe4701182c58
authorAlberto Garcia <berto@igalia.com>
Thu, 10 Sep 2015 15:19:32 +0000 (10 18:19 +0300)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 15 Sep 2015 10:27:41 +0000 (15 12:27 +0200)
tree356a5f0efc67349a411cd7bde7e47aff18d8a1d3
parent78aee081122837cb488b12657a00deeb676b4730
gtk: use setlocale() for LC_MESSAGES only

The QEMU code is not internationalized and assumes that it runs under
the C locale, but if we use the GTK+ UI we'll end up importing the
locale settings from the environment. This can break things, such as
the JSON generator and iotest 120 in locales that use a decimal comma.

We do however have translations for a few simple strings for the GTK+
menu items, so in order to run QEMU using the C locale, and yet have a
translated UI let's use setlocale() for LC_MESSAGES only.

Cc: qemu-stable@nongnu.org
Signed-off-by: Alberto Garcia <berto@igalia.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
ui/gtk.c