[gnome-software/1649-support-appstream-merging: 4/10] gs-plugin-appstream: Use gs_appstream_add_current_locales()




commit 2597511a1ee0c2856e321a10b444820c3400d11b
Author: Milan Crha <mcrha redhat com>
Date:   Thu Mar 31 12:08:44 2022 +0200

    gs-plugin-appstream: Use gs_appstream_add_current_locales()

 plugins/core/gs-plugin-appstream.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
---
diff --git a/plugins/core/gs-plugin-appstream.c b/plugins/core/gs-plugin-appstream.c
index 176d52b84..434d1a040 100644
--- a/plugins/core/gs-plugin-appstream.c
+++ b/plugins/core/gs-plugin-appstream.c
@@ -504,7 +504,6 @@ gs_plugin_appstream_check_silo (GsPluginAppstream  *self,
        g_autoptr(GRWLockWriterLocker) writer_locker = NULL;
        g_autoptr(GPtrArray) parent_appdata = g_ptr_array_new_with_free_func (g_free);
        g_autoptr(GPtrArray) parent_appstream = NULL;
-       const gchar *const *locales = g_get_language_names ();
        g_autoptr(GMainContext) old_thread_default = NULL;
 
        reader_locker = g_rw_lock_reader_locker_new (&self->silo_lock);
@@ -535,9 +534,7 @@ gs_plugin_appstream_check_silo (GsPluginAppstream  *self,
                                              XB_SILO_PROFILE_FLAG_DEBUG);
        }
 
-       /* add current locales */
-       for (guint i = 0; locales[i] != NULL; i++)
-               xb_builder_add_locale (builder, locales[i]);
+       gs_appstream_add_current_locales (builder);
 
        /* only when in self test */
        test_xml = g_getenv ("GS_SELF_TEST_APPSTREAM_XML");


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]