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




commit 92f48fa5e6e8bcfcb30191a60f468928cb738933
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 05a940273..5251d3f50 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]