From 40f061c638ae125fc6a4170807fa890362050e0f Mon Sep 17 00:00:00 2001 From: rbuj Date: Mon, 9 Nov 2020 18:56:42 +0100 Subject: Fix i18n in backgrounds and emblems dialog --- eel/eel-xml-extensions.c | 40 ---------------------------------------- 1 file changed, 40 deletions(-) (limited to 'eel/eel-xml-extensions.c') diff --git a/eel/eel-xml-extensions.c b/eel/eel-xml-extensions.c index de09b99f..da2cf6b5 100644 --- a/eel/eel-xml-extensions.c +++ b/eel/eel-xml-extensions.c @@ -84,43 +84,3 @@ eel_xml_get_root_child_by_name_and_property (xmlDocPtr document, property_name, property_value); } - -xmlChar * -eel_xml_get_property_translated (xmlNodePtr parent, - const char *property_name) -{ - xmlChar *property, *untranslated_property; - char *untranslated_property_name; - const char *translated_property; - - /* Try for the already-translated version. */ - property = xmlGetProp (parent, property_name); - if (property != NULL) - { - return property; - } - - /* Try for the untranslated version. */ - untranslated_property_name = g_strconcat ("_", property_name, NULL); - untranslated_property = xmlGetProp (parent, untranslated_property_name); - g_free (untranslated_property_name); - if (untranslated_property == NULL) - { - return NULL; - } - - /* Try to translate. */ - translated_property = gettext (untranslated_property); - - /* If not translation is found, return untranslated property as-is. */ - if (translated_property == (char *) untranslated_property) - { - return untranslated_property; - } - - /* If a translation happened, make a copy to match the normal - * behavior of this function (returning a string you xmlFree). - */ - xmlFree (untranslated_property); - return xmlStrdup (translated_property); -} -- cgit v1.2.1