[gnome-software: 2/10] gs-appstream: Set has-translations on apps which have translation data




commit 8cc67700d410fbe6460accc50e97c13e55e7f604
Author: Philip Withnall <pwithnall endlessos org>
Date:   Wed Aug 11 15:25:14 2021 +0100

    gs-appstream: Set has-translations on apps which have translation data
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>
    
    Helps: #1354

 lib/gs-appstream.c | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/lib/gs-appstream.c b/lib/gs-appstream.c
index b5dbfb2df..6bd00fb73 100644
--- a/lib/gs-appstream.c
+++ b/lib/gs-appstream.c
@@ -1163,6 +1163,11 @@ gs_appstream_refine_app (GsPlugin *plugin,
                                gs_app_add_kudo (app, GS_APP_KUDO_MY_LANGUAGE);
                }
 
+               /* Set this under the FLAGS_REQUIRE_KUDOS flag because it’s
+                * only useful in combination with KUDO_MY_LANGUAGE */
+               if (xb_node_query_text (component, "languages/lang", NULL) != NULL)
+                       gs_app_set_has_translations (app, TRUE);
+
                /* any keywords */
                if (xb_node_query_text (component, "keywords/keyword", NULL) != NULL)
                        gs_app_add_kudo (app, GS_APP_KUDO_HAS_KEYWORDS);


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