Translated voucher messages, added filename help_text.

This commit is contained in:
Marcus Scholz 2020-10-11 01:39:38 +02:00
parent bac61d5cdc
commit e52c3f4d4b
4 changed files with 24 additions and 7 deletions

View File

@ -25,11 +25,11 @@ class ExplorerCreationForm(UserCreationForm):
try:
fetched_voucher = Voucher.objects.get(code=submitted_voucher)
except Voucher.DoesNotExist:
self.add_error('voucher', 'Invalid voucher')
self.add_error('voucher', _('Invalid voucher'))
return False
if not submitted_voucher.valid:
self.add_error('voucher', 'Expired voucher')
self.add_error('voucher', _('Expired voucher'))
return False
fetched_voucher.delete()

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-10-11 00:35+0200\n"
"POT-Creation-Date: 2020-10-11 01:36+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Commander1024 <commander@commander1024.de>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -22,6 +22,14 @@ msgstr ""
msgid "The Voucher you got from an administrator"
msgstr "Der Einladungs-Code, den Dir ein Administrator gegeben hat"
#: forms.py:28
msgid "Invalid voucher"
msgstr "Ungültiger Voucher"
#: forms.py:32
msgid "Expired voucher"
msgstr "Abgelaufener Voucher"
#: models/abstract_models.py:32
msgid "Latitude in decimal format: e. g. 41.40338"
msgstr "Breitengrad in dezimaler Form: z. B. 51.95021"
@ -38,6 +46,10 @@ msgstr "Ort"
msgid "Description"
msgstr "Beschreibung"
#: models/place.py:81
msgid "Optional: One or more images to upload"
msgstr "Optional: Ein oder mehrere Bilder zum Hochladen"
#: templates/403.html:4
msgid "Forbidden"
msgstr "Nicht Erlaubt"
@ -180,7 +192,7 @@ msgstr "Start"
#: templates/partials/welcome.html:8
msgid "Welcome to our Urban Exploration community catalogue,"
msgstr "Willkommen auf unserem Urban Exploration Communitykatalog,"
msgstr "Willkommen auf unserem Urban Exploration Community-Katalog,"
#: templates/partials/welcome.html:12
msgid "explorer"
@ -277,3 +289,7 @@ msgstr "Noch kein Konto?"
#: templates/signup.html:6
msgid "Sign up"
msgstr "Registrieren"
#: views/base_views.py:25
msgid "Please login to proceed"
msgstr "Bitte log Dich ein um fortzufahren."

View File

@ -7,7 +7,7 @@ from taggit.managers import TaggableManager
class Taggable(models.Model):
'''
This abstract model represtens an object that is taggalble
This abstract model represtens an object that is taggable
using django-taggit
'''
class Meta:
@ -61,4 +61,4 @@ class Expireable(models.Model):
Base class for things that can expire, i.e. VouchersAv
"""
created_when = models.DateTimeField(auto_now_add=True)
expires_when = models.DateTimeField()
expires_when = models.DateTimeField()

View File

@ -77,7 +77,8 @@ class PlaceImage (Submittable):
filename = ThumbnailerImageField(
upload_to=generate_image_upload_path,
resize_source=dict(size=(2560, 2560),
sharpen=True)
sharpen=True),
help_text=_('Optional: One or more images to upload')
)
place = models.ForeignKey(
Place,