Merge pull request #174 from torchingloom/develop

Update views.py
This commit is contained in:
Marco Bonetti 2016-12-11 12:48:16 +01:00 committed by GitHub
commit 8a35c2e210

View file

@ -207,7 +207,7 @@ def home(request):
if _request_request('query', False) and _request_request('query', '').strip():
query = _request_request('query', '').strip()
rx = re.compile(re.escape(query), re.IGNORECASE)
paginator = Paginator([e_ for e_ in rosetta_i18n_pofile if not e_.obsolete and rx.search(six.text_type(e_.msgstr) + six.text_type(e_.msgid) + u''.join([o[0] for o in e_.occurrences]))], rosetta_settings.MESSAGES_PER_PAGE)
paginator = Paginator([e_ for e_ in rosetta_i18n_pofile if not e_.obsolete and rx.search(six.text_type(e_.msgstr) + six.text_type(e_.msgid) + six.text_type(e_.comment) + u''.join([o[0] for o in e_.occurrences]))], rosetta_settings.MESSAGES_PER_PAGE)
else:
if rosetta_i18n_filter == 'untranslated':
paginator = Paginator(rosetta_i18n_pofile.untranslated_entries(), rosetta_settings.MESSAGES_PER_PAGE)