From 65759c762f05e9d1c4921cdfe9655cc6a1065ae6 Mon Sep 17 00:00:00 2001 From: Hidden Z Date: Sat, 19 Feb 2011 14:58:51 +0000 Subject: [PATCH] pyi2phosts/postkey/views.py: add i18n --- pyi2phosts/postkey/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyi2phosts/postkey/views.py b/pyi2phosts/postkey/views.py index f5e4402..66b8458 100644 --- a/pyi2phosts/postkey/views.py +++ b/pyi2phosts/postkey/views.py @@ -8,6 +8,7 @@ from django import forms from django.shortcuts import render_to_response from django.shortcuts import redirect from django.template import RequestContext +from django.utils.translation import ugettext_lazy as _ import settings from pyi2phosts.postkey.models import i2phost @@ -35,7 +36,7 @@ class AddForm(forms.ModelForm): data = validate_hostname(data) # Another set of reserved hostnames (suggested by zzz) if re.search(r'(^|\.)(i2p|i2p2|geti2p|mail|project|i2project|i2pproject|i2p-project).i2p$', data): - raise forms.ValidationError('Trying to use hostname from additional reserved set') + raise forms.ValidationError(_('Trying to use hostname from additional reserved set')) return data def clean_b64hash(self): """Validate base64 hash"""