Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Better title for search feeds. bug 581614.
Browse files Browse the repository at this point in the history
  • Loading branch information
Fred Wenzel committed Aug 5, 2010
1 parent d40eb33 commit d0b7b5f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions apps/search/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from django.utils.feedgenerator import Atom1Feed

import jingo
from tower import ugettext as _, ugettext_lazy as _lazy

from feedback import stats
from feedback.models import Term
Expand Down Expand Up @@ -33,7 +34,7 @@ def _get_results(request):

class SearchFeed(Feed):
feed_type = Atom1Feed
subtitle = "Feed of search results."
subtitle = _lazy("Search Results in Firefox Beta Feedback.")

def get_object(self, request):
data = dict(opinions=_get_results(request)[0], request=request)
Expand All @@ -46,10 +47,9 @@ def title(self, obj):
request = obj['request']
query = request.GET.get('q')

if query:
return "Search for '%s'" % query

return "Search for input"
# L10n: This is the title to the Search ATOM feed.
return (_("Firefox Input: '{query}'").format(query=query) if query else
_('Firefox Input'))

def items(self, obj):
return obj['opinions']
Expand Down

0 comments on commit d0b7b5f

Please sign in to comment.