diff options
author | rbuj <[email protected]> | 2020-11-09 18:56:42 +0100 |
---|---|---|
committer | raveit65 <[email protected]> | 2020-11-11 15:50:20 +0100 |
commit | 40f061c638ae125fc6a4170807fa890362050e0f (patch) | |
tree | e89d6d7a2a5544cab45e62efaeba57f444b61229 /eel/eel-xml-extensions.c | |
parent | 02375fa336ce11c0cc5949691babc03d9bfb9023 (diff) | |
download | caja-40f061c638ae125fc6a4170807fa890362050e0f.tar.bz2 caja-40f061c638ae125fc6a4170807fa890362050e0f.tar.xz |
Fix i18n in backgrounds and emblems dialog
Diffstat (limited to 'eel/eel-xml-extensions.c')
-rw-r--r-- | eel/eel-xml-extensions.c | 40 |
1 files changed, 0 insertions, 40 deletions
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); -} |