diff --git a/libmalcontent-ui/gs-content-rating.c b/libmalcontent-ui/gs-content-rating.c index b8f132a..08eb905 100644 --- a/libmalcontent-ui/gs-content-rating.c +++ b/libmalcontent-ui/gs-content-rating.c @@ -62,316 +62,6 @@ gs_content_rating_system_to_str (GsContentRatingSystem system) return NULL; } -const gchar * -gs_content_rating_key_value_to_str (const gchar *id, MctAppFilterOarsValue value) -{ - guint i; - const struct { - const gchar *id; - MctAppFilterOarsValue value; - const gchar *desc; - } tab[] = { - { "violence-cartoon", MCT_APP_FILTER_OARS_VALUE_NONE, - /* TRANSLATORS: content rating description */ - _("No cartoon violence") }, - { "violence-cartoon", MCT_APP_FILTER_OARS_VALUE_MILD, - /* TRANSLATORS: content rating description */ - _("Cartoon characters in unsafe situations") }, - { "violence-cartoon", MCT_APP_FILTER_OARS_VALUE_MODERATE, - /* TRANSLATORS: content rating description */ - _("Cartoon characters in aggressive conflict") }, - { "violence-cartoon", MCT_APP_FILTER_OARS_VALUE_INTENSE, - /* TRANSLATORS: content rating description */ - _("Graphic violence involving cartoon characters") }, - { "violence-fantasy", MCT_APP_FILTER_OARS_VALUE_NONE, - /* TRANSLATORS: content rating description */ - _("No fantasy violence") }, - { "violence-fantasy", MCT_APP_FILTER_OARS_VALUE_MILD, - /* TRANSLATORS: content rating description */ - _("Characters in unsafe situations easily distinguishable from reality") }, - { "violence-fantasy", MCT_APP_FILTER_OARS_VALUE_MODERATE, - /* TRANSLATORS: content rating description */ - _("Characters in aggressive conflict easily distinguishable from reality") }, - { "violence-fantasy", MCT_APP_FILTER_OARS_VALUE_INTENSE, - /* TRANSLATORS: content rating description */ - _("Graphic violence easily distinguishable from reality") }, - { "violence-realistic", MCT_APP_FILTER_OARS_VALUE_NONE, - /* TRANSLATORS: content rating description */ - _("No realistic violence") }, - { "violence-realistic", MCT_APP_FILTER_OARS_VALUE_MILD, - /* TRANSLATORS: content rating description */ - _("Mildly realistic characters in unsafe situations") }, - { "violence-realistic", MCT_APP_FILTER_OARS_VALUE_MODERATE, - /* TRANSLATORS: content rating description */ - _("Depictions of realistic characters in aggressive conflict") }, - { "violence-realistic", MCT_APP_FILTER_OARS_VALUE_INTENSE, - /* TRANSLATORS: content rating description */ - _("Graphic violence involving realistic characters") }, - { "violence-bloodshed", MCT_APP_FILTER_OARS_VALUE_NONE, - /* TRANSLATORS: content rating description */ - _("No bloodshed") }, - { "violence-bloodshed", MCT_APP_FILTER_OARS_VALUE_MILD, - /* TRANSLATORS: content rating description */ - _("Unrealistic bloodshed") }, - { "violence-bloodshed", MCT_APP_FILTER_OARS_VALUE_MODERATE, - /* TRANSLATORS: content rating description */ - _("Realistic bloodshed") }, - { "violence-bloodshed", MCT_APP_FILTER_OARS_VALUE_INTENSE, - /* TRANSLATORS: content rating description */ - _("Depictions of bloodshed and the mutilation of body parts") }, - { "violence-sexual", MCT_APP_FILTER_OARS_VALUE_NONE, - /* TRANSLATORS: content rating description */ - _("No sexual violence") }, - { "violence-sexual", MCT_APP_FILTER_OARS_VALUE_INTENSE, - /* TRANSLATORS: content rating description */ - _("Rape or other violent sexual behavior") }, - { "drugs-alcohol", MCT_APP_FILTER_OARS_VALUE_NONE, - /* TRANSLATORS: content rating description */ - _("No references to alcohol") }, - { "drugs-alcohol", MCT_APP_FILTER_OARS_VALUE_MILD, - /* TRANSLATORS: content rating description */ - _("References to alcoholic beverages") }, - { "drugs-alcohol", MCT_APP_FILTER_OARS_VALUE_MODERATE, - /* TRANSLATORS: content rating description */ - _("Use of alcoholic beverages") }, - { "drugs-narcotics", MCT_APP_FILTER_OARS_VALUE_NONE, - /* TRANSLATORS: content rating description */ - _("No references to illicit drugs") }, - { "drugs-narcotics", MCT_APP_FILTER_OARS_VALUE_MILD, - /* TRANSLATORS: content rating description */ - _("References to illicit drugs") }, - { "drugs-narcotics", MCT_APP_FILTER_OARS_VALUE_MODERATE, - /* TRANSLATORS: content rating description */ - _("Use of illicit drugs") }, - { "drugs-tobacco", MCT_APP_FILTER_OARS_VALUE_MILD, - /* TRANSLATORS: content rating description */ - _("References to tobacco products") }, - { "drugs-tobacco", MCT_APP_FILTER_OARS_VALUE_MODERATE, - /* TRANSLATORS: content rating description */ - _("Use of tobacco products") }, - { "sex-nudity", MCT_APP_FILTER_OARS_VALUE_NONE, - /* TRANSLATORS: content rating description */ - _("No nudity of any sort") }, - { "sex-nudity", MCT_APP_FILTER_OARS_VALUE_MILD, - /* TRANSLATORS: content rating description */ - _("Brief artistic nudity") }, - { "sex-nudity", MCT_APP_FILTER_OARS_VALUE_MODERATE, - /* TRANSLATORS: content rating description */ - _("Prolonged nudity") }, - { "sex-themes", MCT_APP_FILTER_OARS_VALUE_NONE, - /* TRANSLATORS: content rating description */ - _("No references or depictions of sexual nature") }, - { "sex-themes", MCT_APP_FILTER_OARS_VALUE_MILD, - /* TRANSLATORS: content rating description */ - _("Provocative references or depictions") }, - { "sex-themes", MCT_APP_FILTER_OARS_VALUE_MODERATE, - /* TRANSLATORS: content rating description */ - _("Sexual references or depictions") }, - { "sex-themes", MCT_APP_FILTER_OARS_VALUE_INTENSE, - /* TRANSLATORS: content rating description */ - _("Graphic sexual behavior") }, - { "language-profanity", MCT_APP_FILTER_OARS_VALUE_NONE, - /* TRANSLATORS: content rating description */ - _("No profanity of any kind") }, - { "language-profanity", MCT_APP_FILTER_OARS_VALUE_MILD, - /* TRANSLATORS: content rating description */ - _("Mild or infrequent use of profanity") }, - { "language-profanity", MCT_APP_FILTER_OARS_VALUE_MODERATE, - /* TRANSLATORS: content rating description */ - _("Moderate use of profanity") }, - { "language-profanity", MCT_APP_FILTER_OARS_VALUE_INTENSE, - /* TRANSLATORS: content rating description */ - _("Strong or frequent use of profanity") }, - { "language-humor", MCT_APP_FILTER_OARS_VALUE_NONE, - /* TRANSLATORS: content rating description */ - _("No inappropriate humor") }, - { "language-humor", MCT_APP_FILTER_OARS_VALUE_MILD, - /* TRANSLATORS: content rating description */ - _("Slapstick humor") }, - { "language-humor", MCT_APP_FILTER_OARS_VALUE_MODERATE, - /* TRANSLATORS: content rating description */ - _("Vulgar or bathroom humor") }, - { "language-humor", MCT_APP_FILTER_OARS_VALUE_INTENSE, - /* TRANSLATORS: content rating description */ - _("Mature or sexual humor") }, - { "language-discrimination", MCT_APP_FILTER_OARS_VALUE_NONE, - /* TRANSLATORS: content rating description */ - _("No discriminatory language of any kind") }, - { "language-discrimination", MCT_APP_FILTER_OARS_VALUE_MILD, - /* TRANSLATORS: content rating description */ - _("Negativity towards a specific group of people") }, - { "language-discrimination", MCT_APP_FILTER_OARS_VALUE_MODERATE, - /* TRANSLATORS: content rating description */ - _("Discrimination designed to cause emotional harm") }, - { "language-discrimination", MCT_APP_FILTER_OARS_VALUE_INTENSE, - /* TRANSLATORS: content rating description */ - _("Explicit discrimination based on gender, sexuality, race or religion") }, - { "money-advertising", MCT_APP_FILTER_OARS_VALUE_NONE, - /* TRANSLATORS: content rating description */ - _("No advertising of any kind") }, - { "money-advertising", MCT_APP_FILTER_OARS_VALUE_MILD, - /* TRANSLATORS: content rating description */ - _("Product placement") }, - { "money-advertising", MCT_APP_FILTER_OARS_VALUE_MODERATE, - /* TRANSLATORS: content rating description */ - _("Explicit references to specific brands or trademarked products") }, - { "money-advertising", MCT_APP_FILTER_OARS_VALUE_INTENSE, - /* TRANSLATORS: content rating description */ - _("Users are encouraged to purchase specific real-world items") }, - { "money-gambling", MCT_APP_FILTER_OARS_VALUE_NONE, - /* TRANSLATORS: content rating description */ - _("No gambling of any kind") }, - { "money-gambling", MCT_APP_FILTER_OARS_VALUE_MILD, - /* TRANSLATORS: content rating description */ - _("Gambling on random events using tokens or credits") }, - { "money-gambling", MCT_APP_FILTER_OARS_VALUE_MODERATE, - /* TRANSLATORS: content rating description */ - _("Gambling using “play” money") }, - { "money-gambling", MCT_APP_FILTER_OARS_VALUE_INTENSE, - /* TRANSLATORS: content rating description */ - _("Gambling using real money") }, - { "money-purchasing", MCT_APP_FILTER_OARS_VALUE_NONE, - /* TRANSLATORS: content rating description */ - _("No ability to spend money") }, - { "money-purchasing", MCT_APP_FILTER_OARS_VALUE_MILD, /* v1.1 */ - /* TRANSLATORS: content rating description */ - _("Users are encouraged to donate real money") }, - { "money-purchasing", MCT_APP_FILTER_OARS_VALUE_INTENSE, - /* TRANSLATORS: content rating description */ - _("Ability to spend real money in-game") }, - { "social-chat", MCT_APP_FILTER_OARS_VALUE_NONE, - /* TRANSLATORS: content rating description */ - _("No way to chat with other users") }, - { "social-chat", MCT_APP_FILTER_OARS_VALUE_MILD, - /* TRANSLATORS: content rating description */ - _("User-to-user game interactions without chat functionality") }, - { "social-chat", MCT_APP_FILTER_OARS_VALUE_MODERATE, - /* TRANSLATORS: content rating description */ - _("Moderated chat functionality between users") }, - { "social-chat", MCT_APP_FILTER_OARS_VALUE_INTENSE, - /* TRANSLATORS: content rating description */ - _("Uncontrolled chat functionality between users") }, - { "social-audio", MCT_APP_FILTER_OARS_VALUE_NONE, - /* TRANSLATORS: content rating description */ - _("No way to talk with other users") }, - { "social-audio", MCT_APP_FILTER_OARS_VALUE_INTENSE, - /* TRANSLATORS: content rating description */ - _("Uncontrolled audio or video chat functionality between users") }, - { "social-contacts", MCT_APP_FILTER_OARS_VALUE_NONE, - /* TRANSLATORS: content rating description */ - _("No sharing of social network usernames or email addresses") }, - { "social-contacts", MCT_APP_FILTER_OARS_VALUE_INTENSE, - /* TRANSLATORS: content rating description */ - _("Sharing social network usernames or email addresses") }, - { "social-info", MCT_APP_FILTER_OARS_VALUE_NONE, - /* TRANSLATORS: content rating description */ - _("No sharing of user information with 3rd parties") }, - { "social-info", MCT_APP_FILTER_OARS_VALUE_MILD, /* v1.1 */ - /* TRANSLATORS: content rating description */ - _("Checking for the latest application version") }, - { "social-info", MCT_APP_FILTER_OARS_VALUE_MODERATE, /* v1.1 */ - /* TRANSLATORS: content rating description */ - _("Sharing diagnostic data that does not let others identify the user") }, - { "social-info", MCT_APP_FILTER_OARS_VALUE_INTENSE, - /* TRANSLATORS: content rating description */ - _("Sharing information that lets others identify the user") }, - { "social-location", MCT_APP_FILTER_OARS_VALUE_NONE, - /* TRANSLATORS: content rating description */ - _("No sharing of physical location to other users") }, - { "social-location", MCT_APP_FILTER_OARS_VALUE_INTENSE, - /* TRANSLATORS: content rating description */ - _("Sharing physical location to other users") }, - - /* v1.1 */ - { "sex-homosexuality", MCT_APP_FILTER_OARS_VALUE_NONE, - /* TRANSLATORS: content rating description */ - _("No references to homosexuality") }, - { "sex-homosexuality", MCT_APP_FILTER_OARS_VALUE_MILD, - /* TRANSLATORS: content rating description */ - _("Indirect references to homosexuality") }, - { "sex-homosexuality", MCT_APP_FILTER_OARS_VALUE_MODERATE, - /* TRANSLATORS: content rating description */ - _("Kissing between people of the same gender") }, - { "sex-homosexuality", MCT_APP_FILTER_OARS_VALUE_INTENSE, - /* TRANSLATORS: content rating description */ - _("Graphic sexual behavior between people of the same gender") }, - { "sex-prostitution", MCT_APP_FILTER_OARS_VALUE_NONE, - /* TRANSLATORS: content rating description */ - _("No references to prostitution") }, - { "sex-prostitution", MCT_APP_FILTER_OARS_VALUE_MILD, - /* TRANSLATORS: content rating description */ - _("Indirect references to prostitution") }, - { "sex-prostitution", MCT_APP_FILTER_OARS_VALUE_MODERATE, - /* TRANSLATORS: content rating description */ - _("Direct references to prostitution") }, - { "sex-prostitution", MCT_APP_FILTER_OARS_VALUE_INTENSE, - /* TRANSLATORS: content rating description */ - _("Graphic depictions of the act of prostitution") }, - { "sex-adultery", MCT_APP_FILTER_OARS_VALUE_NONE, - /* TRANSLATORS: content rating description */ - _("No references to adultery") }, - { "sex-adultery", MCT_APP_FILTER_OARS_VALUE_MILD, - /* TRANSLATORS: content rating description */ - _("Indirect references to adultery") }, - { "sex-adultery", MCT_APP_FILTER_OARS_VALUE_MODERATE, - /* TRANSLATORS: content rating description */ - _("Direct references to adultery") }, - { "sex-adultery", MCT_APP_FILTER_OARS_VALUE_INTENSE, - /* TRANSLATORS: content rating description */ - _("Graphic depictions of the act of adultery") }, - { "sex-appearance", MCT_APP_FILTER_OARS_VALUE_NONE, - /* TRANSLATORS: content rating description */ - _("No sexualized characters") }, - { "sex-appearance", MCT_APP_FILTER_OARS_VALUE_MODERATE, - /* TRANSLATORS: content rating description */ - _("Scantily clad human characters") }, - { "sex-appearance", MCT_APP_FILTER_OARS_VALUE_INTENSE, - /* TRANSLATORS: content rating description */ - _("Overtly sexualized human characters") }, - { "violence-worship", MCT_APP_FILTER_OARS_VALUE_NONE, - /* TRANSLATORS: content rating description */ - _("No references to desecration") }, - { "violence-worship", MCT_APP_FILTER_OARS_VALUE_MILD, - /* TRANSLATORS: content rating description */ - _("Depictions or references to historical desecration") }, - { "violence-worship", MCT_APP_FILTER_OARS_VALUE_MODERATE, - /* TRANSLATORS: content rating description */ - _("Depictions of modern-day human desecration") }, - { "violence-worship", MCT_APP_FILTER_OARS_VALUE_INTENSE, - /* TRANSLATORS: content rating description */ - _("Graphic depictions of modern-day desecration") }, - { "violence-desecration", MCT_APP_FILTER_OARS_VALUE_NONE, - /* TRANSLATORS: content rating description */ - _("No visible dead human remains") }, - { "violence-desecration", MCT_APP_FILTER_OARS_VALUE_MILD, - /* TRANSLATORS: content rating description */ - _("Visible dead human remains") }, - { "violence-desecration", MCT_APP_FILTER_OARS_VALUE_MODERATE, - /* TRANSLATORS: content rating description */ - _("Dead human remains that are exposed to the elements") }, - { "violence-desecration", MCT_APP_FILTER_OARS_VALUE_INTENSE, - /* TRANSLATORS: content rating description */ - _("Graphic depictions of desecration of human bodies") }, - { "violence-slavery", MCT_APP_FILTER_OARS_VALUE_NONE, - /* TRANSLATORS: content rating description */ - _("No references to slavery") }, - { "violence-slavery", MCT_APP_FILTER_OARS_VALUE_MILD, - /* TRANSLATORS: content rating description */ - _("Depictions or references to historical slavery") }, - { "violence-slavery", MCT_APP_FILTER_OARS_VALUE_MODERATE, - /* TRANSLATORS: content rating description */ - _("Depictions of modern-day slavery") }, - { "violence-slavery", MCT_APP_FILTER_OARS_VALUE_INTENSE, - /* TRANSLATORS: content rating description */ - _("Graphic depictions of modern-day slavery") }, - { NULL, 0, NULL } }; - for (i = 0; tab[i].id != NULL; i++) { - if (g_strcmp0 (tab[i].id, id) == 0 && tab[i].value == value) - return tab[i].desc; - } - return NULL; -} - /* data obtained from https://en.wikipedia.org/wiki/Video_game_rating_system */ static char * get_esrb_string (gchar *source, gchar *translate) diff --git a/libmalcontent-ui/gs-content-rating.h b/libmalcontent-ui/gs-content-rating.h index a9092b4..3051fd7 100644 --- a/libmalcontent-ui/gs-content-rating.h +++ b/libmalcontent-ui/gs-content-rating.h @@ -50,8 +50,6 @@ typedef enum { gchar *gs_utils_content_rating_age_to_str (GsContentRatingSystem system, guint age); GsContentRatingSystem gs_utils_content_rating_system_from_locale (const gchar *locale); -const gchar *gs_content_rating_key_value_to_str (const gchar *id, - MctAppFilterOarsValue value); const gchar *gs_content_rating_system_to_str (GsContentRatingSystem system); const gchar * const *gs_utils_content_rating_get_values (GsContentRatingSystem system); const guint *gs_utils_content_rating_get_ages (GsContentRatingSystem system);