raiseforms.ValidationError(ugettext('While you were editing, someone else changed the revision. Your contents have been automatically merged with the new contents. Please review the text below.'))
raiseforms.ValidationError(_('While you were editing, someone else changed the revision. Your contents have been automatically merged with the new contents. Please review the text below.'))
recursive=forms.BooleanField(label=_('Inherit permissions'),help_text=_('Check here to apply the above permissions (excluding group and owner of the article) recursively to articles below this one.'),
required=False)
...
...
@@ -403,7 +403,7 @@ class PermissionsForm(PluginSettingsFormMixin, forms.ModelForm):
kwargs={User.USERNAME_FIELD:username}
user=User.objects.get(**kwargs)
exceptUser.DoesNotExist:
raiseforms.ValidationError(ugettext('No user with that username'))
raiseforms.ValidationError(_('No user with that username'))
@@ -17,7 +16,9 @@ class SidebarForm(PluginSidebarFormMixin):
self.fields['image'].required=True
defget_usermessage(self):
returnugettext("New image %s was successfully uploaded. You can use it by selecting it from the list of available images.")%self.instance.get_filename()
return_("New image {image_name} was successfully uploaded. You can use it by selecting it from the list of available images.").format(
image_name=self.instance.get_filename()
)
defsave(self,*args,**kwargs):
ifnotself.instance.id:
...
...
@@ -66,5 +67,5 @@ class PurgeForm(forms.Form):
defclean_confirm(self):
confirm=self.cleaned_data['confirm']
ifnotconfirm:
raiseforms.ValidationError(ugettext('You are not sure enough!'))
raiseforms.ValidationError(_('You are not sure enough!'))