gtk: use setlocale() for LC_MESSAGES only
commit5644f6f9242895db837d2c825cfe083f2a1d71ab
authorAlberto Garcia <berto@igalia.com>
Thu, 10 Sep 2015 15:19:32 +0000 (10 18:19 +0300)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Wed, 21 Oct 2015 03:51:42 +0000 (20 22:51 -0500)
tree924e863eb5ab5877dde181364f3ffecb886b1e56
parent63d761388d6fea994ca498c6e7a210851a99ad93
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>
(cherry picked from commit 2cb5d2a47c655331bcf0ab16bab8fe4701182c58)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
ui/gtk.c