Since you are trying to do it in some .py file (as i understood), then why do you bother with templatetags - use python.
injected_html = u"<p class='add'><a href='%(url)s'>%(translation)s</a></p>" % {'url':some_get_url_method(), 'translation':_(u"Add a category")}
HTML(injected_html)