[gnome-software/1649-support-appstream-merging: 10/13] gs-details-page: Use gs_appstream_add_current_locales()




commit 71ef9351fb5b67ee3fbcdfc546f82f9abce270f7
Author: Milan Crha <mcrha redhat com>
Date:   Thu Mar 31 12:09:46 2022 +0200

    gs-details-page: Use gs_appstream_add_current_locales()

 src/gs-details-page.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
---
diff --git a/src/gs-details-page.c b/src/gs-details-page.c
index dd1591087..26779fd7c 100644
--- a/src/gs-details-page.c
+++ b/src/gs-details-page.c
@@ -2480,7 +2480,6 @@ gs_details_page_metainfo_thread (GTask *task,
                                 gpointer task_data,
                                 GCancellable *cancellable)
 {
-       const gchar *const *locales;
        g_autofree gchar *xml = NULL;
        g_autofree gchar *path = NULL;
        g_autofree gchar *icon_path = NULL;
@@ -2516,12 +2515,8 @@ gs_details_page_metainfo_thread (GTask *task,
        }
 
        builder = xb_builder_new ();
-       locales = g_get_language_names ();
 
-       /* add current locales */
-       for (guint i = 0; locales[i] != NULL; i++) {
-               xb_builder_add_locale (builder, locales[i]);
-       }
+       gs_appstream_add_current_locales (builder);
 
        xb_builder_import_source (builder, builder_source);
 


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