Merge pull request #1283 from normanjaeckel/FixEnglishString
Fixed English strings concerning agenda items and organizational items a...
This commit is contained in:
commit
86ac16dd14
@ -128,9 +128,9 @@ class Item(SlideMixin, AbsoluteUrlMixin, MPTTModel):
|
||||
Ensures that the children of orga items are only orga items.
|
||||
"""
|
||||
if self.type == self.AGENDA_ITEM and self.parent is not None and self.parent.type == self.ORGANIZATIONAL_ITEM:
|
||||
raise ValidationError(_('Agenda items can not be descendents of an organizational item.'))
|
||||
raise ValidationError(_('Agenda items can not be child elements of an organizational item.'))
|
||||
if self.type == self.ORGANIZATIONAL_ITEM and self.get_descendants().filter(type=self.AGENDA_ITEM).exists():
|
||||
raise ValidationError(_('Organizational items can not have agenda items as descendents.'))
|
||||
raise ValidationError(_('Organizational items can not have agenda items as child elements.'))
|
||||
return super(Item, self).clean()
|
||||
|
||||
def __unicode__(self):
|
||||
|
@ -139,7 +139,7 @@ class Overview(TemplateView):
|
||||
if item.type == item.AGENDA_ITEM and parent.type == item.ORGANIZATIONAL_ITEM:
|
||||
transaction.rollback()
|
||||
messages.error(
|
||||
request, _('Agenda items can not be descendents of an organizational item.'))
|
||||
request, _('Agenda items can not be child elements of an organizational item.'))
|
||||
break
|
||||
item.parent = parent
|
||||
item.weight = form.cleaned_data['weight']
|
||||
|
@ -241,7 +241,7 @@ class ViewTest(TestCase):
|
||||
'i2-parent': 1}
|
||||
response = self.adminClient.post('/agenda/', data)
|
||||
self.assertNotEqual(Item.objects.get(pk=2).parent_id, 1)
|
||||
self.assertContains(response, 'Agenda items can not be descendents of an organizational item.')
|
||||
self.assertContains(response, 'Agenda items can not be child elements of an organizational item.')
|
||||
|
||||
def test_delete(self):
|
||||
response = self.adminClient.get('/agenda/%s/del/' % self.item1.pk)
|
||||
@ -301,7 +301,7 @@ class ViewTest(TestCase):
|
||||
response,
|
||||
'form',
|
||||
None,
|
||||
'Agenda items can not be descendents of an organizational item.')
|
||||
'Agenda items can not be child elements of an organizational item.')
|
||||
|
||||
def test_orga_item_with_orga_parent_two(self):
|
||||
item1 = Item.objects.create(title='item1_aeNg4Heibee8ULooneep')
|
||||
@ -314,7 +314,7 @@ class ViewTest(TestCase):
|
||||
response,
|
||||
'form',
|
||||
None,
|
||||
'Organizational items can not have agenda items as descendents.')
|
||||
'Organizational items can not have agenda items as child elements.')
|
||||
|
||||
def test_csv_import(self):
|
||||
item_number = Item.objects.all().count()
|
||||
|
Loading…
Reference in New Issue
Block a user