Ticket #10691: comments.feed.trans-revised.diff

File comments.feed.trans-revised.diff, 1.2 KB (added by Jarek Zgoda, 16 years ago)

revised patch with named placeholders

  • django/contrib/comments/feeds.py

     
    22from django.contrib.syndication.feeds import Feed
    33from django.contrib.sites.models import Site
    44from django.contrib import comments
     5from django.utils.translation import ugettext_lazy as _
    56
    67class LatestCommentFeed(Feed):
    78    """Feed of latest comments on the current site."""
     
    910    def title(self):
    1011        if not hasattr(self, '_site'):
    1112            self._site = Site.objects.get_current()
    12         return u"%s comments" % self._site.name
     13        return _("%(site_name)s comments") % dict(site_name=self._site.name)
    1314
    1415    def link(self):
    1516        if not hasattr(self, '_site'):
     
    1920    def description(self):
    2021        if not hasattr(self, '_site'):
    2122            self._site = Site.objects.get_current()
    22         return u"Latest comments on %s" % self._site.name
     23        return _("Latest comments on %(site_name)s") % dict(site_name=self._site.name)
    2324
    2425    def items(self):
    2526        qs = comments.get_model().objects.filter(
Back to Top