Compare commits

..

No commits in common. "91a3f3171d5cfd2ae4328caa02ba686e5ba1f6aa" and "dafe7eee3489e3a7c17b6560fc2aa09648773ecd" have entirely different histories.

13 changed files with 66 additions and 86 deletions

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-10-11 21:53+0200\n" "POT-Creation-Date: 2020-10-11 07:48+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Commander1024 <commander@commander1024.de>\n" "Last-Translator: Commander1024 <commander@commander1024.de>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -50,22 +50,6 @@ msgstr "Längengrad"
msgid "Longitude in decimal format: e. g. 2.17403" msgid "Longitude in decimal format: e. g. 2.17403"
msgstr "Breitengrad in dezimaler Form: z. B. 7.4840155" msgstr "Breitengrad in dezimaler Form: z. B. 7.4840155"
#: models/abstract_models.py:59
msgid "Submission date"
msgstr "Einreichungsdatum"
#: models/abstract_models.py:67
msgid "Submitter"
msgstr "Einreicher"
#: models/abstract_models.py:79
msgid "Creation date"
msgstr "Erstellungsdatum"
#: models/abstract_models.py:82
msgid "Expiration date"
msgstr "Ablaufdatum"
#: models/external_links.py:13 #: models/external_links.py:13
msgid "URL" msgid "URL"
msgstr "Adresse (URL)" msgstr "Adresse (URL)"
@ -112,7 +96,7 @@ msgstr "Zurück"
#: templates/global.html:32 #: templates/global.html:32
msgid "Logout" msgid "Logout"
msgstr "Ausloggen" msgstr "Abmelden"
#: templates/global.html:34 #: templates/global.html:34
msgid "Admin" msgid "Admin"
@ -124,8 +108,8 @@ msgid "Login"
msgstr "Anmelden" msgstr "Anmelden"
#: templates/global.html:40 templates/registration/login.html:29 #: templates/global.html:40 templates/registration/login.html:29
#: templates/signup.html:6 templates/signup.html:12 templates/signup.html:41 #: templates/signup.html:12 templates/signup.html:41
msgid "Sign up" msgid "Sign Up"
msgstr "Registrieren" msgstr "Registrieren"
#: templates/global.html:50 templates/home.html:10 #: templates/global.html:50 templates/home.html:10
@ -138,11 +122,11 @@ msgstr "UrBex Codex"
#: templates/global.html:56 templates/place/place_create.html:5 #: templates/global.html:56 templates/place/place_create.html:5
#: templates/place/place_create.html:10 #: templates/place/place_create.html:10
msgid "Create place" msgid "Create Place"
msgstr "Place erstellen" msgstr "Place erstellen"
#: templates/global.html:57 #: templates/global.html:57
msgid "All places" msgid "All Places"
msgstr "Alle Places" msgstr "Alle Places"
#: templates/home.html:20 templates/home_unauth.html:20 #: templates/home.html:20 templates/home_unauth.html:20
@ -263,8 +247,7 @@ msgid "Submit a photo album"
msgstr "Fotoalbum hinzufügen" msgstr "Fotoalbum hinzufügen"
#: templates/photo_album/photo_album_create.html:8 #: templates/photo_album/photo_album_create.html:8
#: templates/place/place_detail.html:18 templates/place/place_update.html:5 #: templates/place/place_detail.html:18
#: templates/place/place_update.html:10
msgid "Edit place" msgid "Edit place"
msgstr "Place bearbeiten" msgstr "Place bearbeiten"
@ -282,13 +265,12 @@ msgid "Create"
msgstr "Erstellen" msgstr "Erstellen"
#: templates/place/place_delete.html:5 #: templates/place/place_delete.html:5
msgid "Delete lost place" msgid "Lost Place Deletion"
msgstr "Lost Place löschen" msgstr "Lost Place löschen"
#: templates/place/place_delete.html:15 #: templates/place/place_delete.html:15
#, python-format msgid "Are you sure you want to delete"
msgid "Are you sure you want to delete %(place_name)s?" msgstr "Willst Du den Ort wirklich löschen: "
msgstr "Bist Du sicher, dass Du %(place_name)s löschen möchtest?"
#: templates/place/place_delete.html:19 #: templates/place/place_delete.html:19
msgid "Delete" msgid "Delete"
@ -311,13 +293,17 @@ msgid "Images"
msgstr "Bilder" msgstr "Bilder"
#: templates/place/place_list.html:10 #: templates/place/place_list.html:10
msgid "All Places" msgid "Lost Places"
msgstr "Alle Places" msgstr "Alle Places"
#: templates/place/place_list.html:16 #: templates/place/place_list.html:16
msgid "Our lost places" msgid "Listing our places"
msgstr "Unsere Lost Places" msgstr "Unsere Lost Places"
#: templates/place/place_update.html:5 templates/place/place_update.html:10
msgid "Update place"
msgstr "Place bearbeiten"
#: templates/place/place_update.html:42 #: templates/place/place_update.html:42
msgid "Update" msgid "Update"
msgstr "Aktualisieren" msgstr "Aktualisieren"
@ -327,9 +313,13 @@ msgid "Submit images to a place"
msgstr "Bilder zu einem Place hinzufügen" msgstr "Bilder zu einem Place hinzufügen"
#: templates/registration/login.html:29 #: templates/registration/login.html:29
msgid "No account, yet?" msgid "Have No Account Yet?"
msgstr "Noch kein Konto?" msgstr "Noch kein Konto?"
#: templates/signup.html:6
msgid "Sign up"
msgstr "Registrieren"
#: views/base_views.py:25 #: views/base_views.py:25
msgid "Please login to proceed" msgid "Please login to proceed"
msgstr "Bitte log Dich ein um fortzufahren" msgstr "Bitte log Dich ein um fortzufahren"
@ -339,49 +329,49 @@ msgid "Image(s) submitted successfully"
msgstr "Bild(er) erfolgreich hinzugefügt" msgstr "Bild(er) erfolgreich hinzugefügt"
#: views/place_image_views.py:41 #: views/place_image_views.py:41
msgid "Image deleted successfully" msgid "Image(s) deleted successfully"
msgstr "Bild erfolgreich gelöscht" msgstr "Bild(er) erfolgreich gelöscht"
#: views/place_image_views.py:42 #: views/place_image_views.py:42
msgid "You are not allowed to delete this image" msgid "You are not allowed to delete this image"
msgstr "Du darfst dieses Bild nicht löschen" msgstr "Du darfst dieses Bild nicht löschen"
#: views/place_views.py:62 #: views/place_views.py:62
#, fuzzy
#| msgid "Successfully deleted place"
msgid "Successfully updated place" msgid "Successfully updated place"
msgstr "Place erfolgreich aktualisiert" msgstr "Place erfolgreich gelöscht"
#: views/place_views.py:63 #: views/place_views.py:63
msgid "You are not allowed to edit this place" msgid "You do no have permissions to alter this place"
msgstr "Du darfst diesen Place nicht bearbeiten" msgstr "Du hast nicht die Berechtigung, diesen Place zu bearbeiten"
#: views/place_views.py:97 #: views/place_views.py:97
#, fuzzy
#| msgid "Successfully deleted place"
msgid "Successfully created place" msgid "Successfully created place"
msgstr "Place erfolgreich erstellt" msgstr "Place erfolgreich gelöscht"
#: views/place_views.py:105
msgid "Please fill in all required fields."
msgstr "Bitte füll alle benötigten Felder aus."
#: views/place_views.py:112 #: views/place_views.py:112
msgid "Successfully deleted place" msgid "Successfully deleted place"
msgstr "Place erfolgreich gelöscht" msgstr "Place erfolgreich gelöscht"
#: views/place_views.py:114 #: views/place_views.py:114
msgid "You are not allowed to delete this place" msgid "You do no have permission to delete this place"
msgstr "Du darfst diesen Place nicht löschen" msgstr "Du hast nicht die Berechtigung, diesen Place zu löschen"
#: views/views.py:29 #: views/views.py:29
msgid "User created" msgid "User created"
msgstr "Benutzer erstellt" msgstr "User erstellt"
#: views/views.py:54 #: views/views.py:54
msgid "Photo album link submitted" msgid "Photo Album submitted"
msgstr "Fotoalbum-Link hinzugefügt" msgstr "Fotoalbum hinzugefügt"
#: views/views.py:59 #: views/views.py:59
msgid "Photo album link deleted" msgid "Photo Album deleted"
msgstr "Fotoalbum-Link gelöscht" msgstr "Fotoalbum gelöscht"
#: views/views.py:60 #: views/views.py:60
msgid "You are not allowed to edit this photo album link" msgid "You do not have permissions to alter this photo album"
msgstr "Du darfst diesen Fotoalbum-Link nicht bearbeiten" msgstr "Du hast nicht die Berechtigung, diesen Place zu bearbeiten"

View File

@ -53,18 +53,13 @@ class Submittable(models.Model):
class Meta: class Meta:
abstract = True abstract = True
submitted_when = models.DateTimeField( submitted_when = models.DateTimeField(auto_now_add=True, null=True)
auto_now_add=True,
null=True,
verbose_name=_('Submission date')
)
submitted_by = models.ForeignKey( submitted_by = models.ForeignKey(
'Explorer', 'Explorer',
on_delete=models.SET_NULL, on_delete=models.SET_NULL,
null=True, null=True,
blank=True, blank=True,
related_name='%(class)ss', related_name='%(class)ss'
verbose_name=_('Submitter')
) )
class Expireable(models.Model): class Expireable(models.Model):
@ -74,13 +69,8 @@ class Expireable(models.Model):
class Meta: class Meta:
abstract = True abstract = True
created_when = models.DateTimeField( created_when = models.DateTimeField(auto_now_add=True)
auto_now_add=True, expires_when = models.DateTimeField()
verbose_name=_('Creation date')
)
expires_when = models.DateTimeField(
verbose_name=_('Expiration date')
)
@property @property
def is_expired(self): def is_expired(self):

View File

@ -37,7 +37,7 @@
{% else %} {% else %}
You are not logged in. You are not logged in.
<a class="LP-Link" href="{% url 'login' %}"><span class="LP-Link__Text">{% trans 'Login' %}</span></a> | <a class="LP-Link" href="{% url 'login' %}"><span class="LP-Link__Text">{% trans 'Login' %}</span></a> |
<a class="LP-Link" href="{% url 'signup' %}"><span class="LP-Link__Text">{% trans 'Sign up' %}</span></a> <a class="LP-Link" href="{% url 'signup' %}"><span class="LP-Link__Text">{% trans 'Sign Up' %}</span></a>
{% endif %} {% endif %}
</span> </span>
</div> </div>
@ -53,8 +53,8 @@
{% block additional_menu_items %} {% block additional_menu_items %}
{% endblock additional_menu_items %} {% endblock additional_menu_items %}
<li class="LP-Menu__Item LP-Menu__Item--additional"><a href="{% url 'place_create'%}" class="LP-Link"><span class="LP-Link__Text">{% trans 'Create place' %}</span></a></li> <li class="LP-Menu__Item LP-Menu__Item--additional"><a href="{% url 'place_create'%}" class="LP-Link"><span class="LP-Link__Text">{% trans 'Create Place' %}</span></a></li>
<li class="LP-Menu__Item LP-Menu__Item--additional"><a href="{% url 'place_list'%}" class="LP-Link"><span class="LP-Link__Text">{% trans 'All places' %}</span></a></li> <li class="LP-Menu__Item LP-Menu__Item--additional"><a href="{% url 'place_list'%}" class="LP-Link"><span class="LP-Link__Text">{% trans 'All Places' %}</span></a></li>
</ul> </ul>
</nav> </nav>
</aside> </aside>

View File

@ -2,12 +2,12 @@
{% load static %} {% load static %}
{% load i18n %} {% load i18n %}
# {% block title %}{% trans 'Create place' %}{% endblock %} # {% block title %}{% trans 'Create Place' %}{% endblock %}
{% block maincontent %} {% block maincontent %}
<form class="LP-Form" method="POST" enctype="multipart/form-data"> <form class="LP-Form" method="POST" enctype="multipart/form-data">
<fieldset class="LP-Form__Fieldset"> <fieldset class="LP-Form__Fieldset">
<legend class="LP-Form__Legend">{% trans 'Create place' %}</legend> <legend class="LP-Form__Legend">{% trans 'Create Place' %}</legend>
{% csrf_token %} {% csrf_token %}
<div class="LP-Form__Composition LP-Form__Composition--breakable"> <div class="LP-Form__Composition LP-Form__Composition--breakable">
<div class="LP-Form__Field"> <div class="LP-Form__Field">

View File

@ -2,7 +2,7 @@
{% load static %} {% load static %}
{% load i18n %} {% load i18n %}
{% block title %}{% trans 'Delete lost place' %}{% endblock %} {% block title %}{% trans 'Lost Place Deletion' %}{% endblock %}
{% block maincontent %} {% block maincontent %}
@ -12,7 +12,7 @@
{% csrf_token %} {% csrf_token %}
<div class="LP-Form__Composition"> <div class="LP-Form__Composition">
<div class="LP-Form__Field LP-Form__InfoText"> <div class="LP-Form__Field LP-Form__InfoText">
<p class="LP-Paragraph">{% blocktrans with place_name=place.name%}Are you sure you want to delete {{place_name}}?{% endblocktrans %}</p> <p class="LP-Paragraph">{% trans 'Are you sure you want to delete' %} "{{place.name}}"?</p>
</div> </div>
</div> </div>

View File

@ -7,13 +7,13 @@
<script src="{% static 'maps/ol.js' %}"></script> <script src="{% static 'maps/ol.js' %}"></script>
{% endblock additional_head %} {% endblock additional_head %}
{% block title %}{% trans 'All Places' %}{% endblock %} {% block title %}{% trans 'Lost Places' %}{% endblock %}
{% block maincontent %} {% block maincontent %}
{% include 'partials/osm_map.html' with config=mapping_config %} {% include 'partials/osm_map.html' with config=mapping_config %}
<div class="LP-PlaceList"> <div class="LP-PlaceList">
<h1 class="LP-Headline">{% trans 'Our lost places' %}</h1> <h1 class="LP-Headline">{% trans 'Listing our places' %}</h1>
<ul class="LP-PlaceList__List"> <ul class="LP-PlaceList__List">
{% for place in place_list %} {% for place in place_list %}
<li class="LP-PlaceList__Item"> <li class="LP-PlaceList__Item">

View File

@ -2,12 +2,12 @@
{% load static %} {% load static %}
{% load i18n %} {% load i18n %}
# {% block title %}{% trans 'Edit place' %}{% endblock %} # {% block title %}{% trans 'Update place' %}{% endblock %}
{% block maincontent %} {% block maincontent %}
<form class="LP-Form" method="POST" enctype="multipart/form-data"> <form class="LP-Form" method="POST" enctype="multipart/form-data">
<fieldset class="LP-Form__Fieldset"> <fieldset class="LP-Form__Fieldset">
<legend class="LP-Form__Legend">{% trans 'Edit place' %}</legend> <legend class="LP-Form__Legend">{% trans 'Update place' %}</legend>
{% csrf_token %} {% csrf_token %}
<div class="LP-Form__Composition LP-Form__Composition--breakable"> <div class="LP-Form__Composition LP-Form__Composition--breakable">
<div class="LP-Form__Field"> <div class="LP-Form__Field">

View File

@ -26,6 +26,6 @@
</fieldset> </fieldset>
</form> </form>
<p class="LP-Headline">{% trans 'No account, yet?' %} <a class="LP-Link" href="{% url 'signup' %}"><span class="LP-Link__Text">{% trans 'Sign up' %}</span></a></p> <p class="LP-Headline">{% trans 'Have No Account Yet?' %} <a class="LP-Link" href="{% url 'signup' %}"><span class="LP-Link__Text">{% trans 'Sign Up' %}</span></a></p>
{% endblock maincontent %} {% endblock maincontent %}

View File

@ -9,7 +9,7 @@
<form class="LP-Form" method="POST"> <form class="LP-Form" method="POST">
<fieldset class="LP-Form__Fieldset"> <fieldset class="LP-Form__Fieldset">
<legend class="LP-Form__Legend">{% trans 'Sign up' %}</legend> <legend class="LP-Form__Legend">{% trans 'Sign Up' %}</legend>
{% csrf_token %} {% csrf_token %}
<div class="LP-Form__Composition LP-Form__Composition--breakable"> <div class="LP-Form__Composition LP-Form__Composition--breakable">
<div class="LP-Form__Field"> <div class="LP-Form__Field">
@ -38,7 +38,7 @@
<div class="LP-Form__Composition LP-Form__Composition--buttons"> <div class="LP-Form__Composition LP-Form__Composition--buttons">
<div class="LP-Form__Field LP-Form__Button LP-Input"> <div class="LP-Form__Field LP-Form__Button LP-Input">
<button class="LP-Button">{% trans 'Sign up' %}</button> <button class="LP-Button">{% trans 'Sign Up' %}</button>
</div> </div>
</div> </div>
</fieldset> </fieldset>

View File

@ -38,5 +38,5 @@ class PlaceImageCreateView(MultiplePlaceImageUploadMixin, PlaceAssetCreateView):
class PlaceImageDeleteView(PlaceAssetDeleteView): class PlaceImageDeleteView(PlaceAssetDeleteView):
model = PlaceImage model = PlaceImage
success_message = _('Image deleted successfully') success_message = _('Image(s) deleted successfully')
permission_denied_message = _('You are not allowed to delete this image') permission_denied_message = _('You are not allowed to delete this image')

View File

@ -60,7 +60,7 @@ class PlaceUpdateView(IsAuthenticatedMixin, IsPlaceSubmitterMixin, SuccessMessag
model = Place model = Place
form_class = PlaceForm form_class = PlaceForm
success_message = _('Successfully updated place') success_message = _('Successfully updated place')
place_submitter_error_message = _('You are not allowed to edit this place') place_submitter_error_message = _('You do no have permissions to alter this place')
def get_success_url(self): def get_success_url(self):
return reverse_lazy('place_detail', kwargs={'pk':self.get_object().pk}) return reverse_lazy('place_detail', kwargs={'pk':self.get_object().pk})
@ -102,7 +102,7 @@ class PlaceCreateView(MultiplePlaceImageUploadMixin, IsAuthenticatedMixin, View)
# Usually the browser should have checked the form before sending. # Usually the browser should have checked the form before sending.
messages.error( messages.error(
self.request, self.request,
_('Please fill in all required fields.') 'Please fill in all required fields.'
) )
return render(request, 'place/place_create.html', context={'form': place_form}) return render(request, 'place/place_create.html', context={'form': place_form})
@ -111,7 +111,7 @@ class PlaceDeleteView(IsAuthenticatedMixin, IsPlaceSubmitterMixin, DeleteView):
model = Place model = Place
success_message = _('Successfully deleted place') success_message = _('Successfully deleted place')
success_url = reverse_lazy('place_list') success_url = reverse_lazy('place_list')
place_submitter_error_message = _('You are not allowed to delete this place') place_submitter_error_message = _('You do no have permission to delete this place')
def delete(self, request, *args, **kwargs): def delete(self, request, *args, **kwargs):
messages.success(self.request, self.success_message) messages.success(self.request, self.success_message)

View File

@ -51,13 +51,13 @@ class PhotoAlbumCreateView(PlaceAssetCreateView):
model = PhotoAlbum model = PhotoAlbum
fields = ['url', 'label'] fields = ['url', 'label']
template_name = 'photo_album/photo_album_create.html' template_name = 'photo_album/photo_album_create.html'
success_message = _('Photo album link submitted') success_message = _('Photo Album submitted')
class PhotoAlbumDeleteView(PlaceAssetDeleteView): class PhotoAlbumDeleteView(PlaceAssetDeleteView):
model = PhotoAlbum model = PhotoAlbum
pk_url_kwarg = 'pk' pk_url_kwarg = 'pk'
success_message = _('Photo album link deleted') success_message = _('Photo Album deleted')
permission_denied_messsage = _('You are not allowed to edit this photo album link') permission_denied_messsage = _('You do not have permissions to alter this photo album')
class PlaceTagSubmitView(IsAuthenticatedMixin, View): class PlaceTagSubmitView(IsAuthenticatedMixin, View):
def post(self, request, tagged_id, *args, **kwargs): def post(self, request, tagged_id, *args, **kwargs):