Commit 07e9d679 authored by Philip Withnall's avatar Philip Withnall Committed by Richard Hughes

gs-details-page: Drop workarounds for locales with codesets

gs_utils_content_rating_system_from_locale() correctly parses locales
now.
Signed-off-by: Philip Withnall's avatarPhilip Withnall <withnall@endlessm.com>
parent ed84b7a3
...@@ -1662,18 +1662,11 @@ gs_details_page_refresh_content_rating (GsDetailsPage *self) ...@@ -1662,18 +1662,11 @@ gs_details_page_refresh_content_rating (GsDetailsPage *self)
AsContentRating *content_rating; AsContentRating *content_rating;
GsContentRatingSystem system; GsContentRatingSystem system;
guint age = 0; guint age = 0;
gchar *str;
const gchar *display = NULL; const gchar *display = NULL;
g_autofree gchar *locale = NULL; const gchar *locale;
/* get the content rating system from the locale */ /* get the content rating system from the locale */
locale = g_strdup (setlocale (LC_MESSAGES, NULL)); locale = setlocale (LC_MESSAGES, NULL);
str = g_strstr_len (locale, -1, ".UTF-8");
if (str != NULL)
*str = '\0';
str = g_strstr_len (locale, -1, ".utf8");
if (str != NULL)
*str = '\0';
system = gs_utils_content_rating_system_from_locale (locale); system = gs_utils_content_rating_system_from_locale (locale);
g_debug ("content rating system is guessed as %s from %s", g_debug ("content rating system is guessed as %s from %s",
gs_content_rating_system_to_str (system), gs_content_rating_system_to_str (system),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment