Skip to content

Commit 8ad5e2f

Browse files
committed
Fixed #51 -- Fixed validation msg and added DE translation
1 parent 53a4313 commit 8ad5e2f

File tree

4 files changed

+52
-3
lines changed

4 files changed

+52
-3
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
*.pyc
2+
*.mo
23
django_stdimage.egg-info
34
build/
45
dist/

setup.py

+12-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
3+
import os
34
from setuptools import setup, Command, find_packages
5+
import sys
46

57

68
class PyTest(Command):
@@ -20,9 +22,18 @@ def run(self):
2022
raise SystemExit(errno)
2123

2224

25+
if 'sdist' in sys.argv or 'develop' in sys.argv:
26+
try:
27+
os.chdir('stdimage')
28+
from django.core import management
29+
management.call_command('compilemessages')
30+
finally:
31+
os.chdir('..')
32+
33+
2334
setup(
2435
name='django-stdimage',
25-
version='2.0.2',
36+
version='2.0.3',
2637
description='Django Standarized Image Field',
2738
author='codingjoe',
2839
url='https://github.com/codingjoe/django-stdimage',
+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# SOME DESCRIPTIVE TITLE.
2+
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3+
# This file is distributed under the same license as the PACKAGE package.
4+
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5+
#
6+
msgid ""
7+
msgstr ""
8+
"Project-Id-Version: \n"
9+
"Report-Msgid-Bugs-To: \n"
10+
"POT-Creation-Date: 2015-08-06 12:13+0200\n"
11+
"PO-Revision-Date: 2015-08-06 12:15+0200\n"
12+
"Language: de\n"
13+
"MIME-Version: 1.0\n"
14+
"Content-Type: text/plain; charset=UTF-8\n"
15+
"Content-Transfer-Encoding: 8bit\n"
16+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
17+
"Last-Translator: \n"
18+
"Language-Team: \n"
19+
"X-Generator: Poedit 1.8.3\n"
20+
21+
#: validators.py:48
22+
#, python-format
23+
msgid ""
24+
"The image you uploaded is too large. The required maximum resolution is: "
25+
"%(with)sx%(height)s px."
26+
msgstr ""
27+
"Das hochgeladene Bild ist zu groß. Die maximale erlaube Größe ist: "
28+
"%(with)sx%(height)s px."
29+
30+
#: validators.py:64
31+
#, python-format
32+
msgid ""
33+
"The image you uploaded is too small. The required minimum resolution is: "
34+
"%(with)sx%(height)s px."
35+
msgstr ""
36+
"Das hochgeladene Bild ist zu klein. Die minimale erlaube Größe ist: "
37+
"%(with)sx%(height)s px."

stdimage/validators.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class MaxSizeValidator(BaseSizeValidator):
4646
compare = lambda self, img_size, max_size:\
4747
img_size[0] > max_size[0] or img_size[1] > max_size[1]
4848
message = _('The image you uploaded is too large.'
49-
' The required minimal resolution is:'
49+
' The required maximum resolution is:'
5050
' %(with)sx%(height)s px.')
5151
code = 'max_resolution'
5252

@@ -62,5 +62,5 @@ class MinSizeValidator(BaseSizeValidator):
6262
compare = lambda self, img_size, min_size:\
6363
img_size[0] < min_size[0] or img_size[1] < min_size[1]
6464
message = _('The image you uploaded is too small.'
65-
' The required minimal resolution is:'
65+
' The required minimum resolution is:'
6666
' %(with)sx%(height)s px.')

0 commit comments

Comments
 (0)