mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 09:10:36 +00:00
pbutils: don't assume LC_MESSAGES is always defined, also check for ENABLE_NLS
Should fix build with mingw32 build bot again.
This commit is contained in:
parent
cd758cdbd9
commit
d1bcdea7dc
1 changed files with 15 additions and 1 deletions
|
@ -412,9 +412,23 @@ serialize_stream_profiles (GKeyFile * out, GstEncodingProfile * sprof,
|
|||
static gchar *
|
||||
get_locale (void)
|
||||
{
|
||||
const char *loc = setlocale (LC_MESSAGES, NULL);
|
||||
const char *loc = NULL;
|
||||
gchar *ret;
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#if defined(LC_MESSAGES)
|
||||
loc = setlocale (LC_MESSAGES, NULL);
|
||||
GST_LOG ("LC_MESSAGES: %s", GST_STR_NULL (loc));
|
||||
#elif defined(LC_ALL)
|
||||
loc = setlocale (LC_ALL, NULL);
|
||||
GST_LOG ("LC_ALL: %s", GST_STR_NULL (loc));
|
||||
#else
|
||||
GST_LOG ("Neither LC_ALL nor LC_MESSAGES defined");
|
||||
#endif
|
||||
#else /* !ENABLE_NLS */
|
||||
GST_LOG ("i18n disabled");
|
||||
#endif
|
||||
|
||||
if (loc == NULL || g_ascii_strncasecmp (loc, "en", 2) == 0)
|
||||
return NULL;
|
||||
|
||||
|
|
Loading…
Reference in a new issue