diff options
author | Mike Chen <chagel@gmail.com> | 2009-07-29 00:01:16 +0800 |
---|---|---|
committer | Mike Chen <chagel@gmail.com> | 2009-07-29 00:01:16 +0800 |
commit | b6aa7c847234ed985ec693c53633a7f0f3e2cd9c (patch) | |
tree | 0ec7772b1fa7c1a88bd60c585cc0c8a7adbccc1a /forum/views.py | |
parent | 0173b3d5978a81d785ec1431f09f325e45114709 (diff) | |
download | askbot-b6aa7c847234ed985ec693c53633a7f0f3e2cd9c.tar.gz askbot-b6aa7c847234ed985ec693c53633a7f0f3e2cd9c.tar.bz2 askbot-b6aa7c847234ed985ec693c53633a7f0f3e2cd9c.zip |
merge Evgeny's English and Botum's Spanish translations
Diffstat (limited to 'forum/views.py')
-rw-r--r-- | forum/views.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/forum/views.py b/forum/views.py index 8252304e..08a0e958 100644 --- a/forum/views.py +++ b/forum/views.py @@ -15,6 +15,7 @@ from django.utils import simplejson from django.core import serializers
from django.db import transaction
from django.contrib.contenttypes.models import ContentType
+from django.utils.translation import ugettext as _
from utils.html import sanitize_html
from markdown2 import Markdown
@@ -1722,13 +1723,13 @@ def upload(request): result = xml_template % ('Good', '', default_storage.url(new_file_name))
except UploadPermissionNotAuthorized:
- result = xml_template % ('', u"上传图片只限于积分+60以上注册用户!", '')
+ result = xml_template % ('', _('uploading images is limited to users with >60 reputation points'), '')
except FileTypeNotAllow:
- result = xml_template % ('', u"只允许上传'jpg', 'jpeg', 'gif', 'bmp', 'png', 'tiff'类型的文件!", '')
+ result = xml_template % ('', _("allowed file types are 'jpg', 'jpeg', 'gif', 'bmp', 'png', 'tiff'"), '')
except FileSizeNotAllow:
- result = xml_template % ('', u"只允许上传%sK大小的文件!" % settings.ALLOW_MAX_FILE_SIZE / 1024, '')
- except Exception:
- result = xml_template % ('', u"在文件上传过程中产生了错误,请联系管理员,谢谢^_^", '')
+ result = xml_template % ('', _("maximum upload file size is %sK") % settings.ALLOW_MAX_FILE_SIZE / 1024, '')
+ except Exception as e:
+ result = xml_template % ('', _('Error uploading file. Please contact the site administrator. Thank you. %s' % e), '')
return HttpResponse(result, mimetype="application/xml")
|