Translated an additional bunch of messages.

This commit is contained in:
Marcus Scholz 2020-10-11 07:50:15 +02:00
parent 62c1c84bb2
commit 7943537276
4 changed files with 70 additions and 18 deletions

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 07:13+0200\n"
"POT-Creation-Date: 2020-10-11 07:48+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"
@ -322,4 +322,56 @@ msgstr "Registrieren"
#: views/base_views.py:25
msgid "Please login to proceed"
msgstr "Bitte log Dich ein um fortzufahren."
msgstr "Bitte log Dich ein um fortzufahren"
#: views/place_image_views.py:26
msgid "Image(s) submitted successfully"
msgstr "Bild(er) erfolgreich hinzugefügt"
#: views/place_image_views.py:41
msgid "Image(s) deleted successfully"
msgstr "Bild(er) erfolgreich gelöscht"
#: views/place_image_views.py:42
msgid "You are not allowed to delete this image"
msgstr "Du darfst dieses Bild nicht löschen"
#: views/place_views.py:62
#, fuzzy
#| msgid "Successfully deleted place"
msgid "Successfully updated place"
msgstr "Place erfolgreich gelöscht"
#: views/place_views.py:63
msgid "You do no have permissions to alter this place"
msgstr "Du hast nicht die Berechtigung, diesen Place zu bearbeiten"
#: views/place_views.py:97
#, fuzzy
#| msgid "Successfully deleted place"
msgid "Successfully created place"
msgstr "Place erfolgreich gelöscht"
#: views/place_views.py:112
msgid "Successfully deleted place"
msgstr "Place erfolgreich gelöscht"
#: views/place_views.py:114
msgid "You do no have permission to delete this place"
msgstr "Du hast nicht die Berechtigung, diesen Place zu löschen"
#: views/views.py:29
msgid "User created"
msgstr "User erstellt"
#: views/views.py:54
msgid "Photo Album submitted"
msgstr "Fotoalbum hinzugefügt"
#: views/views.py:59
msgid "Photo Album deleted"
msgstr "Fotoalbum gelöscht"
#: views/views.py:60
msgid "You do not have permissions to alter this photo album"
msgstr "Du hast nicht die Berechtigung, diesen Place zu bearbeiten"

View File

@ -1,5 +1,6 @@
from django.views import View
from django.shortcuts import get_object_or_404, redirect
from django.utils.translation import ugettext_lazy as _
from lostplaces.views.base_views import PlaceAssetCreateView, PlaceAssetDeleteView
from lostplaces.models import PlaceImage, Place
@ -22,7 +23,7 @@ class PlaceImageCreateView(MultiplePlaceImageUploadMixin, PlaceAssetCreateView):
model = PlaceImage
form_class = PlaceImageForm
template_name = 'place_image/place_image_create.html'
success_message = 'Place Images submitted'
success_message = _('Image(s) submitted successfully')
commit = False
def post(self, request, place_id, *args, **kwargs):
@ -37,7 +38,5 @@ class PlaceImageCreateView(MultiplePlaceImageUploadMixin, PlaceAssetCreateView):
class PlaceImageDeleteView(PlaceAssetDeleteView):
model = PlaceImage
success_message = 'Images deleted successfully'
permission_denied_message = 'You\'r not allowed to delete this image'
success_message = _('Image(s) deleted successfully')
permission_denied_message = _('You are not allowed to delete this image')

View File

@ -10,6 +10,7 @@ from django.views.generic import ListView
from django.contrib import messages
from django.contrib.messages.views import SuccessMessageMixin
from django.utils.translation import ugettext_lazy as _
from django.shortcuts import render, redirect, get_object_or_404
from django.urls import reverse_lazy
@ -58,8 +59,8 @@ class PlaceUpdateView(IsAuthenticatedMixin, IsPlaceSubmitterMixin, SuccessMessag
template_name = 'place/place_update.html'
model = Place
form_class = PlaceForm
success_message = 'Successfully updated place.'
place_submitter_error_message = 'You do no have permissions to alter this place'
success_message = _('Successfully updated place')
place_submitter_error_message = _('You do no have permissions to alter this place')
def get_success_url(self):
return reverse_lazy('place_detail', kwargs={'pk':self.get_object().pk})
@ -93,7 +94,7 @@ class PlaceCreateView(MultiplePlaceImageUploadMixin, IsAuthenticatedMixin, View)
messages.success(
self.request,
'Successfully created place.'
_('Successfully created place')
)
return redirect(reverse_lazy('place_detail', kwargs={'pk': place.pk}))
@ -108,14 +109,13 @@ class PlaceCreateView(MultiplePlaceImageUploadMixin, IsAuthenticatedMixin, View)
class PlaceDeleteView(IsAuthenticatedMixin, IsPlaceSubmitterMixin, DeleteView):
template_name = 'place/place_delete.html'
model = Place
success_message = 'Successfully deleted place.'
success_message = _('Successfully deleted place')
success_url = reverse_lazy('place_list')
success_message = 'Place deleted'
place_submitter_error_message = 'You do no have permission to delete this place'
place_submitter_error_message = _('You do no have permission to delete this place')
def delete(self, request, *args, **kwargs):
messages.success(self.request, self.success_message)
return super().delete(request, *args, **kwargs)
def get_place(self):
return self.get_object()
return self.get_object()

View File

@ -9,6 +9,7 @@ from django.contrib import messages
from django.urls import reverse_lazy
from django.shortcuts import render, redirect, get_object_or_404
from django.http import HttpResponseForbidden
from django.utils.translation import ugettext_lazy as _
from lostplaces.forms import ExplorerCreationForm, TagSubmitForm
from lostplaces.models import Place, PhotoAlbum
@ -25,7 +26,7 @@ class SignUpView(SuccessMessageMixin, CreateView):
form_class = ExplorerCreationForm
success_url = reverse_lazy('login')
template_name = 'signup.html'
success_message = 'User created.'
success_message = _('User created')
class HomeView(IsAuthenticatedMixin, View):
def get(self, request, *args, **kwargs):
@ -50,13 +51,13 @@ class PhotoAlbumCreateView(PlaceAssetCreateView):
model = PhotoAlbum
fields = ['url', 'label']
template_name = 'photo_album/photo_album_create.html'
success_message = 'Photo Album submitted'
success_message = _('Photo Album submitted')
class PhotoAlbumDeleteView(PlaceAssetDeleteView):
model = PhotoAlbum
pk_url_kwarg = 'pk'
success_message = 'Photo Album deleted'
permission_denied_messsage = 'You do not have permissions to alter this photo album'
success_message = _('Photo Album deleted')
permission_denied_messsage = _('You do not have permissions to alter this photo album')
class PlaceTagSubmitView(IsAuthenticatedMixin, View):
def post(self, request, tagged_id, *args, **kwargs):