[gnome-software: 2/11] gs-appstream: Use setlocale() to get locale
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software: 2/11] gs-appstream: Use setlocale() to get locale
- Date: Thu, 10 Jun 2021 12:20:05 +0000 (UTC)
commit 179b64a0ece900c55a1ad47c5fe9a5ac414935d4
Author: Philip Withnall <pwithnall endlessos org>
Date: Wed May 19 13:58:16 2021 +0100
gs-appstream: Use setlocale() to get locale
Use the system locale directly, rather than a copy indirected via
`GsPlugin`.
Signed-off-by: Philip Withnall <pwithnall endlessos org>
plugins/core/gs-appstream.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/plugins/core/gs-appstream.c b/plugins/core/gs-appstream.c
index cfaedf898..717a26bbf 100644
--- a/plugins/core/gs-appstream.c
+++ b/plugins/core/gs-appstream.c
@@ -10,6 +10,7 @@
#include "config.h"
#include <gnome-software.h>
+#include <locale.h>
#include "gs-appstream.h"
@@ -1037,7 +1038,7 @@ gs_appstream_refine_app (GsPlugin *plugin,
/* add kudos */
if (refine_flags & GS_PLUGIN_REFINE_FLAGS_REQUIRE_KUDOS) {
g_autoptr(GPtrArray) kudos = NULL;
- tmp = gs_plugin_get_locale (plugin);
+ tmp = setlocale (LC_MESSAGES, NULL);
if (!_gs_utils_locale_has_translations (tmp)) {
gs_app_add_kudo (app, GS_APP_KUDO_MY_LANGUAGE);
} else {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]