@@ -569,19 +569,19 @@ def validate_child(self, value):
569
569
user = self .context ['request' ].user
570
570
if user not in value .users .all ():
571
571
raise serializers .ValidationError (
572
- 'You do not have permissions on the child project' ,
572
+ _ ( 'You do not have permissions on the child project' ) ,
573
573
)
574
574
575
575
# Check the child project is not a subproject already
576
576
if value .superprojects .exists ():
577
577
raise serializers .ValidationError (
578
- 'Child is already a subproject of another project' ,
578
+ _ ( 'Child is already a subproject of another project' ) ,
579
579
)
580
580
581
581
# Check the child project is already a superproject
582
582
if value .subprojects .exists ():
583
583
raise serializers .ValidationError (
584
- 'Child is already a superproject' ,
584
+ _ ( 'Child is already a superproject' ) ,
585
585
)
586
586
return value
587
587
@@ -590,7 +590,7 @@ def validate_alias(self, value):
590
590
subproject = self .parent_project .subprojects .filter (alias = value )
591
591
if subproject .exists ():
592
592
raise serializers .ValidationError (
593
- 'A subproject with this alias already exists' ,
593
+ _ ( 'A subproject with this alias already exists' ) ,
594
594
)
595
595
return value
596
596
@@ -599,13 +599,13 @@ def validate(self, data):
599
599
# Check the parent and child are not the same project
600
600
if data ['child' ].slug == self .parent_project .slug :
601
601
raise serializers .ValidationError (
602
- 'Project can not be subproject of itself' ,
602
+ _ ( 'Project can not be subproject of itself' ) ,
603
603
)
604
604
605
605
# Check the parent project is not a subproject already
606
606
if self .parent_project .superprojects .exists ():
607
607
raise serializers .ValidationError (
608
- 'Subproject nesting is not supported' ,
608
+ _ ( 'Subproject nesting is not supported' ) ,
609
609
)
610
610
return data
611
611
0 commit comments