libmalcontent-ui: Update content rating formatting code

This incorporates commit 7d00c4d84b2a47dd815dc88da1a82dc54800d4b6 from
gnome-software, which allows the ESRB strings to be localised.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
Philip Withnall 2020-05-21 12:30:05 +01:00
parent 77b8704cb4
commit 396dd3c039
3 changed files with 89 additions and 74 deletions

View file

@ -374,7 +374,7 @@ static void
update_oars_level (MctUserControls *self)
{
GsContentRatingSystem rating_system;
const gchar *rating_age_category;
g_autofree gchar *rating_age_category = NULL;
guint maximum_age;
gsize i;
gboolean all_categories_unset;
@ -407,7 +407,10 @@ update_oars_level (MctUserControls *self)
/* Unrestricted? */
if (rating_age_category == NULL || all_categories_unset)
rating_age_category = _("All Ages");
{
g_clear_pointer (&rating_age_category, g_free);
rating_age_category = g_strdup (_("All Ages"));
}
gtk_label_set_label (self->oars_button_label, rating_age_category);
}