mirror of
https://github.com/Hopiu/django-rosetta.git
synced 2026-04-10 16:50:59 +00:00
Add search in msgctxt
This commit is contained in:
parent
710da65f04
commit
a73e7edc8e
3 changed files with 7 additions and 1 deletions
|
|
@ -2,7 +2,7 @@
|
|||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Rosetta\n"
|
||||
|
|
@ -166,5 +166,6 @@ msgstr ""
|
|||
|
||||
#. Translators: consectetur adipisicing
|
||||
#: templates/eiusmod/tempor.html:43
|
||||
msgctxt "purus pellentesque"
|
||||
msgid "Lorem ipsum"
|
||||
msgstr "dolor sit amet"
|
||||
|
|
|
|||
|
|
@ -943,6 +943,10 @@ class RosettaTestCase(TestCase):
|
|||
r = self.client.get(url % 'adipisicing')
|
||||
self.assertContains(r, 'Lorem')
|
||||
|
||||
# Search context
|
||||
r = self.client.get(url % 'pellentesque')
|
||||
self.assertContains(r, 'Lorem')
|
||||
|
||||
def test_45_issue186_plural_msg_search(self):
|
||||
"""Confirm that search of the .po file works for plurals.
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -601,6 +601,7 @@ class TranslationFormView(RosettaFileLevelMixin, TemplateView):
|
|||
def concat_entry(e):
|
||||
return (six.text_type(e.msgstr) +
|
||||
six.text_type(e.msgid) +
|
||||
six.text_type(e.msgctxt) +
|
||||
six.text_type(e.comment) +
|
||||
u''.join([o[0] for o in e.occurrences]) +
|
||||
six.text_type(e.msgid_plural) +
|
||||
|
|
|
|||
Loading…
Reference in a new issue