Ticket #8610: t8610-8626.diff

File t8610-8626.diff, 1.6 KB (added by Jannis Leidel, 16 years ago)

small patch to mark alt attributes for i18n

  • django/contrib/admin/widgets.py

    diff --git a/django/contrib/admin/widgets.py b/django/contrib/admin/widgets.py
    index 2bfbc97..d5ece3f 100644
    a b class ForeignKeyRawIdWidget(forms.TextInput):  
    112112        # API to determine the ID dynamically.
    113113        output.append('<a href="%s%s" class="related-lookup" id="lookup_id_%s" onclick="return showRelatedObjectLookupPopup(this);"> ' % \
    114114            (related_url, url, name))
    115         output.append('<img src="%simg/admin/selector-search.gif" width="16" height="16" alt="Lookup" /></a>' % settings.ADMIN_MEDIA_PREFIX)
     115        output.append('<img src="%simg/admin/selector-search.gif" width="16" height="16" alt="%s" /></a>' % (settings.ADMIN_MEDIA_PREFIX, _('Lookup')))
    116116        if value:
    117117            output.append(self.label_for_value(value))
    118118        return mark_safe(u''.join(output))
    class RelatedFieldWidgetWrapper(forms.Widget):  
    192192            # API to determine the ID dynamically.
    193193            output.append(u'<a href="%sadd/" class="add-another" id="add_id_%s" onclick="return showAddAnotherPopup(this);"> ' % \
    194194                (related_url, name))
    195             output.append(u'<img src="%simg/admin/icon_addlink.gif" width="10" height="10" alt="Add Another"/></a>' % settings.ADMIN_MEDIA_PREFIX)
     195            output.append(u'<img src="%simg/admin/icon_addlink.gif" width="10" height="10" alt="%s"/></a>' % (settings.ADMIN_MEDIA_PREFIX, _('Add Another')))
    196196        return mark_safe(u''.join(output))
    197197
    198198    def build_attrs(self, extra_attrs=None, **kwargs):
Back to Top