From ee82c2c105a2c2a9183bcfd3f2811ec5a153c3ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Norman=20J=C3=A4ckel?= Date: Mon, 12 May 2014 21:09:09 +0200 Subject: [PATCH] Fixed English strings concerning agenda items and organizational items and their relation. Fixed #1271. --- openslides/agenda/models.py | 4 ++-- openslides/agenda/views.py | 2 +- tests/agenda/tests.py | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/openslides/agenda/models.py b/openslides/agenda/models.py index a8bfb6b94..459b50547 100644 --- a/openslides/agenda/models.py +++ b/openslides/agenda/models.py @@ -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): diff --git a/openslides/agenda/views.py b/openslides/agenda/views.py index 140838981..4af70752a 100644 --- a/openslides/agenda/views.py +++ b/openslides/agenda/views.py @@ -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'] diff --git a/tests/agenda/tests.py b/tests/agenda/tests.py index cec6a6351..f67eeda6f 100644 --- a/tests/agenda/tests.py +++ b/tests/agenda/tests.py @@ -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()