From a9555f7bda39298759f0aed74fdbde2779359b25 Mon Sep 17 00:00:00 2001 From: mpeltriaux Date: Tue, 19 Apr 2022 13:37:29 +0200 Subject: [PATCH] #140 Enhancements * fixes InterventionAutocomplete bug, where team-shared entries would not pop up as valid option * fixes bug where form opening for new compensation without direct intervention link resulted in 404 * adds intervention-recorded check on deduction forms: Form is invalid if intervention is currently recorded and therefore blocked for any editing * extends basic check_for_recorded_instance() method to let some forms pass, e.g. deduction related forms on ecoaccounts which only have a reason to be rendered IF the entry is recorded * adds/updates translations --- compensation/views/compensation.py | 22 +-- intervention/forms/modalForms.py | 13 +- konova/autocompletes.py | 10 +- konova/forms.py | 20 ++- locale/de/LC_MESSAGES/django.mo | Bin 41898 -> 42105 bytes locale/de/LC_MESSAGES/django.po | 221 +++++++++++++++-------------- 6 files changed, 164 insertions(+), 122 deletions(-) diff --git a/compensation/views/compensation.py b/compensation/views/compensation.py index 9c82c88..c3d3e2b 100644 --- a/compensation/views/compensation.py +++ b/compensation/views/compensation.py @@ -1,4 +1,5 @@ from django.contrib.auth.decorators import login_required +from django.core.exceptions import ObjectDoesNotExist from django.db.models import Sum from django.http import HttpRequest, JsonResponse from django.shortcuts import render @@ -22,7 +23,7 @@ from konova.utils.message_templates import FORM_INVALID, IDENTIFIER_REPLACED, DA CHECKED_RECORDED_RESET, COMPENSATION_ADDED_TEMPLATE, COMPENSATION_REMOVED_TEMPLATE, DOCUMENT_ADDED, \ COMPENSATION_STATE_REMOVED, COMPENSATION_STATE_ADDED, COMPENSATION_ACTION_REMOVED, COMPENSATION_ACTION_ADDED, \ DEADLINE_ADDED, DEADLINE_REMOVED, DOCUMENT_EDITED, COMPENSATION_STATE_EDITED, COMPENSATION_ACTION_EDITED, \ - DEADLINE_EDITED, RECORDED_BLOCKS_EDIT + DEADLINE_EDITED, RECORDED_BLOCKS_EDIT, PARAMS_INVALID from konova.utils.user_checks import in_group @@ -69,13 +70,18 @@ def new_view(request: HttpRequest, intervention_id: str = None): """ template = "compensation/form/view.html" - intervention = get_object_or_404(Intervention, id=intervention_id) - if intervention.is_recorded: - messages.info( - request, - RECORDED_BLOCKS_EDIT - ) - return redirect("intervention:detail", id=intervention_id) + if intervention_id is not None: + try: + intervention = Intervention.objects.get(id=intervention_id) + except ObjectDoesNotExist: + messages.error(request, PARAMS_INVALID) + return redirect("home") + if intervention.is_recorded: + messages.info( + request, + RECORDED_BLOCKS_EDIT + ) + return redirect("intervention:detail", id=intervention_id) data_form = NewCompensationForm(request.POST or None, intervention_id=intervention_id) geom_form = SimpleGeomForm(request.POST or None, read_only=False) diff --git a/intervention/forms/modalForms.py b/intervention/forms/modalForms.py index 6a02962..07911be 100644 --- a/intervention/forms/modalForms.py +++ b/intervention/forms/modalForms.py @@ -427,13 +427,22 @@ class NewDeductionModalForm(BaseModalForm): """ super_result = super().is_valid() acc = self.cleaned_data["account"] + intervention = self.cleaned_data["intervention"] + objects_valid = True if not acc.recorded: self.add_error( "account", _("Eco-account {} is not recorded yet. You can only deduct from recorded accounts.").format(acc.identifier) ) - return False + objects_valid = False + + if intervention.is_recorded: + self.add_error( + "intervention", + _("Intervention {} is currently recorded. To change any data on it, the entry must be unrecorded.").format(intervention.identifier) + ) + objects_valid = False rest_surface = self._get_available_surface(acc) form_surface = float(self.cleaned_data["surface"]) @@ -447,7 +456,7 @@ class NewDeductionModalForm(BaseModalForm): format_german_float(rest_surface), ), ) - return is_valid_surface and super_result + return is_valid_surface and objects_valid and super_result def __create_deduction(self): """ Creates the deduction diff --git a/konova/autocompletes.py b/konova/autocompletes.py index 9f60d54..e6036f0 100644 --- a/konova/autocompletes.py +++ b/konova/autocompletes.py @@ -52,14 +52,16 @@ class InterventionAutocomplete(Select2QuerySetView): """ def get_queryset(self): - if self.request.user.is_anonymous: + user = self.request.user + if user.is_anonymous: return Intervention.objects.none() qs = Intervention.objects.filter( - deleted=None, - users__in=[self.request.user], + Q(deleted=None) & + Q(users__in=[user]) | + Q(teams__in=user.teams.all()) ).order_by( "identifier" - ) + ).distinct() if self.q: qs = qs.filter( Q(identifier__icontains=self.q) | diff --git a/konova/forms.py b/konova/forms.py index cde3129..a1e1447 100644 --- a/konova/forms.py +++ b/konova/forms.py @@ -142,12 +142,28 @@ class BaseForm(forms.Form): """ Checks if the instance is recorded and runs some special logic if yes If the instance is recorded, the form shall not display any possibility to - edit any data. Instead, the users should get some information about why they can not edit anything + edit any data. Instead, the users should get some information about why they can not edit anything. + + There are situations where the form should be rendered regularly, + e.g deduction forms for (recorded) eco accounts. Returns: """ - if self.instance is None or not isinstance(self.instance, BaseObject): + from intervention.forms.modalForms import NewDeductionModalForm, EditEcoAccountDeductionModalForm, \ + RemoveEcoAccountDeductionModalForm + is_none = self.instance is None + is_other_data_type = not isinstance(self.instance, BaseObject) + is_deduction_form = isinstance( + self, + ( + NewDeductionModalForm, + EditEcoAccountDeductionModalForm, + RemoveEcoAccountDeductionModalForm, + ) + ) + + if is_none or is_other_data_type or is_deduction_form: # Do nothing return diff --git a/locale/de/LC_MESSAGES/django.mo b/locale/de/LC_MESSAGES/django.mo index b8d66ac2c09709318888f9b08576695960a98706..9626e763ea04a135d76675baf28ba22d85ea7eea 100644 GIT binary patch delta 11533 zcmYk=2V7RwAII?vB7)*z3y3_Zh$x`ASK`*hZH_btB8mer#67M%%}ntzBdr{%Im$G% z+?k`aa-^vZv*jLXW#+8^=lk5_|J8l<>wV6-=bn8p$cE3n?;rNI&jatlXJTwk z%ZkReSQigs06xSZ%d#!MS~N&O6jER%pf5JY64=6&cS1cl5XWFH>bXl;3hx+;)OMZ= z!itoaN8N9ZA=m}W;9v}-e`~BMn2V*ku@r-G1BT#URL7@K4gG{+c+2Qp$Fd^GM`Ky6 zhpN}v*dH~q9ITAfuqdv>Wcs%@k41`30!w3hT4}TACFUXa%;SMz|kC@Hnc03#dbM4>hB( z29_0yRZuf;g5lU5wIbPA7AK-QT8wJ{b=2N(M76uS0qY-0;sgaTcpcSIiH6RD38)dL zn0!OjgUwL`>493IEYynRqB^iq9WO+!a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)GdL}5?}mEIqV_IsdnRk| J(K-97{|{i9Z@&Nl diff --git a/locale/de/LC_MESSAGES/django.po b/locale/de/LC_MESSAGES/django.po index 0ec797a..2a78deb 100644 --- a/locale/de/LC_MESSAGES/django.po +++ b/locale/de/LC_MESSAGES/django.po @@ -18,15 +18,15 @@ #: konova/filters/mixins.py:277 konova/filters/mixins.py:323 #: konova/filters/mixins.py:361 konova/filters/mixins.py:362 #: konova/filters/mixins.py:393 konova/filters/mixins.py:394 -#: konova/forms.py:163 konova/forms.py:264 konova/forms.py:335 -#: konova/forms.py:379 konova/forms.py:389 konova/forms.py:402 -#: konova/forms.py:414 konova/forms.py:432 user/forms.py:42 +#: konova/forms.py:177 konova/forms.py:278 konova/forms.py:349 +#: konova/forms.py:393 konova/forms.py:403 konova/forms.py:416 +#: konova/forms.py:428 konova/forms.py:446 user/forms.py:42 #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-04-19 09:31+0200\n" +"POT-Creation-Date: 2022-04-19 13:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -77,7 +77,7 @@ msgstr "Bericht generieren" msgid "Select a timespan and the desired conservation office" msgstr "Wählen Sie die Zeitspanne und die gewünschte Eintragungsstelle" -#: analysis/forms.py:69 konova/forms.py:211 +#: analysis/forms.py:69 konova/forms.py:225 msgid "Continue" msgstr "Weiter" @@ -342,7 +342,7 @@ msgstr "Automatisch generiert" #: intervention/templates/intervention/detail/includes/documents.html:28 #: intervention/templates/intervention/detail/view.html:31 #: intervention/templates/intervention/report/report.html:12 -#: konova/forms.py:378 +#: konova/forms.py:392 msgid "Title" msgstr "Bezeichnung" @@ -369,7 +369,7 @@ msgstr "Kompensation XY; Flur ABC" #: intervention/templates/intervention/detail/includes/documents.html:34 #: intervention/templates/intervention/detail/includes/payments.html:34 #: intervention/templates/intervention/detail/includes/revocation.html:38 -#: konova/forms.py:413 konova/templates/konova/includes/comment_card.html:16 +#: konova/forms.py:427 konova/templates/konova/includes/comment_card.html:16 msgid "Comment" msgstr "Kommentar" @@ -441,7 +441,7 @@ msgstr "kompensiert Eingriff" msgid "Select the intervention for which this compensation compensates" msgstr "Wählen Sie den Eingriff, für den diese Kompensation bestimmt ist" -#: compensation/forms/forms.py:202 compensation/views/compensation.py:96 +#: compensation/forms/forms.py:202 compensation/views/compensation.py:110 msgid "New compensation" msgstr "Neue Kompensation" @@ -467,7 +467,7 @@ msgstr "Vereinbarungsdatum" msgid "When did the parties agree on this?" msgstr "Wann wurde dieses Ökokonto offiziell vereinbart?" -#: compensation/forms/forms.py:373 compensation/views/eco_account.py:107 +#: compensation/forms/forms.py:373 compensation/views/eco_account.py:108 msgid "New Eco-Account" msgstr "Neues Ökokonto" @@ -493,7 +493,7 @@ msgid "Due on which date" msgstr "Zahlung wird an diesem Datum erwartet" #: compensation/forms/modalForms.py:64 compensation/forms/modalForms.py:359 -#: intervention/forms/modalForms.py:177 konova/forms.py:415 +#: intervention/forms/modalForms.py:177 konova/forms.py:429 msgid "Additional comment, maximum {} letters" msgstr "Zusätzlicher Kommentar, maximal {} Zeichen" @@ -538,7 +538,7 @@ msgstr "Neuer Zustand" msgid "Insert data for the new state" msgstr "Geben Sie die Daten des neuen Zustandes ein" -#: compensation/forms/modalForms.py:217 konova/forms.py:213 +#: compensation/forms/modalForms.py:217 konova/forms.py:227 msgid "Object removed" msgstr "Objekt entfernt" @@ -871,7 +871,7 @@ msgstr "Dokumente" #: compensation/templates/compensation/detail/eco_account/includes/documents.html:14 #: ema/templates/ema/detail/includes/documents.html:14 #: intervention/templates/intervention/detail/includes/documents.html:14 -#: konova/forms.py:431 +#: konova/forms.py:445 msgid "Add new document" msgstr "Neues Dokument hinzufügen" @@ -879,7 +879,7 @@ msgstr "Neues Dokument hinzufügen" #: compensation/templates/compensation/detail/eco_account/includes/documents.html:31 #: ema/templates/ema/detail/includes/documents.html:31 #: intervention/templates/intervention/detail/includes/documents.html:31 -#: konova/forms.py:388 +#: konova/forms.py:402 msgid "Created on" msgstr "Erstellt" @@ -887,7 +887,7 @@ msgstr "Erstellt" #: compensation/templates/compensation/detail/eco_account/includes/documents.html:61 #: ema/templates/ema/detail/includes/documents.html:61 #: intervention/templates/intervention/detail/includes/documents.html:65 -#: konova/forms.py:493 +#: konova/forms.py:507 msgid "Edit document" msgstr "Dokument bearbeiten" @@ -1067,7 +1067,7 @@ msgid "Recorded on" msgstr "Verzeichnet am" #: compensation/templates/compensation/detail/eco_account/includes/deductions.html:65 -#: intervention/forms/modalForms.py:481 +#: intervention/forms/modalForms.py:490 #: intervention/templates/intervention/detail/includes/deductions.html:60 msgid "Edit Deduction" msgstr "Abbuchung bearbeiten" @@ -1141,78 +1141,72 @@ msgstr "" msgid "Responsible data" msgstr "Daten zu den verantwortlichen Stellen" -#: compensation/views/compensation.py:52 +#: compensation/views/compensation.py:53 msgid "Compensations - Overview" msgstr "Kompensationen - Übersicht" -#: compensation/views/compensation.py:151 konova/utils/message_templates.py:35 +#: compensation/views/compensation.py:172 konova/utils/message_templates.py:36 msgid "Compensation {} edited" msgstr "Kompensation {} bearbeitet" -#: compensation/views/compensation.py:161 compensation/views/eco_account.py:172 -#: ema/views.py:233 intervention/views.py:327 +#: compensation/views/compensation.py:182 compensation/views/eco_account.py:173 +#: ema/views.py:240 intervention/views.py:335 msgid "Edit {}" msgstr "Bearbeite {}" -#: compensation/views/compensation.py:240 compensation/views/eco_account.py:358 -#: ema/views.py:194 intervention/views.py:531 +#: compensation/views/compensation.py:261 compensation/views/eco_account.py:359 +#: ema/views.py:194 intervention/views.py:539 msgid "Log" msgstr "Log" -#: compensation/views/compensation.py:584 compensation/views/eco_account.py:726 -#: ema/views.py:551 intervention/views.py:677 +#: compensation/views/compensation.py:605 compensation/views/eco_account.py:727 +#: ema/views.py:558 intervention/views.py:685 msgid "Report {}" msgstr "Bericht {}" -#: compensation/views/eco_account.py:64 +#: compensation/views/eco_account.py:65 msgid "Eco-account - Overview" msgstr "Ökokonten - Übersicht" -#: compensation/views/eco_account.py:97 +#: compensation/views/eco_account.py:98 msgid "Eco-Account {} added" msgstr "Ökokonto {} hinzugefügt" -#: compensation/views/eco_account.py:151 -msgid "" -"Entry is recorded. To edit data, the entry first needs to be unrecorded." -msgstr "" -"Eintrag ist verzeichnet. Um Daten zu bearbeiten, muss der Eintrag erst entzeichnet werden." - -#: compensation/views/eco_account.py:162 +#: compensation/views/eco_account.py:163 msgid "Eco-Account {} edited" msgstr "Ökokonto {} bearbeitet" -#: compensation/views/eco_account.py:275 +#: compensation/views/eco_account.py:276 msgid "Eco-account removed" msgstr "Ökokonto entfernt" -#: compensation/views/eco_account.py:379 ema/views.py:275 -#: intervention/views.py:630 +#: compensation/views/eco_account.py:380 ema/views.py:282 +#: intervention/views.py:638 msgid "{} unrecorded" msgstr "{} entzeichnet" -#: compensation/views/eco_account.py:379 ema/views.py:275 -#: intervention/views.py:630 +#: compensation/views/eco_account.py:380 ema/views.py:282 +#: intervention/views.py:638 msgid "{} recorded" msgstr "{} verzeichnet" -#: compensation/views/eco_account.py:803 ema/views.py:621 -#: intervention/views.py:428 +#: compensation/views/eco_account.py:804 ema/views.py:628 +#: intervention/views.py:436 msgid "{} has already been shared with you" msgstr "{} wurde bereits für Sie freigegeben" -#: compensation/views/eco_account.py:808 ema/views.py:626 -#: intervention/views.py:433 +#: compensation/views/eco_account.py:809 ema/views.py:633 +#: intervention/views.py:441 msgid "{} has been shared with you" msgstr "{} ist nun für Sie freigegeben" -#: compensation/views/eco_account.py:815 ema/views.py:633 -#: intervention/views.py:440 +#: compensation/views/eco_account.py:816 ema/views.py:640 +#: intervention/views.py:448 msgid "Share link invalid" msgstr "Freigabelink ungültig" -#: compensation/views/eco_account.py:838 ema/views.py:656 -#: intervention/views.py:463 +#: compensation/views/eco_account.py:839 ema/views.py:663 +#: intervention/views.py:471 msgid "Share settings updated" msgstr "Freigabe Einstellungen aktualisiert" @@ -1252,11 +1246,11 @@ msgstr "EMAs - Übersicht" msgid "EMA {} added" msgstr "EMA {} hinzugefügt" -#: ema/views.py:223 +#: ema/views.py:230 msgid "EMA {} edited" msgstr "EMA {} bearbeitet" -#: ema/views.py:256 +#: ema/views.py:263 msgid "EMA removed" msgstr "EMA entfernt" @@ -1318,7 +1312,7 @@ msgstr "Datum Zulassung bzw. Satzungsbeschluss" msgid "Binding on" msgstr "Datum Bestandskraft" -#: intervention/forms/forms.py:211 intervention/views.py:94 +#: intervention/forms/forms.py:211 intervention/views.py:95 msgid "New intervention" msgstr "Neuer Eingriff" @@ -1398,7 +1392,7 @@ msgstr "Kompensationen und Zahlungen geprüft" msgid "Run check" msgstr "Prüfung vornehmen" -#: intervention/forms/modalForms.py:264 konova/forms.py:534 +#: intervention/forms/modalForms.py:264 konova/forms.py:548 msgid "" "I, {} {}, confirm that all necessary control steps have been performed by " "myself." @@ -1422,7 +1416,7 @@ msgstr "Neue Abbuchung" msgid "Enter the information for a new deduction from a chosen eco-account" msgstr "Geben Sie die Informationen für eine neue Abbuchung ein." -#: intervention/forms/modalForms.py:434 +#: intervention/forms/modalForms.py:436 msgid "" "Eco-account {} is not recorded yet. You can only deduct from recorded " "accounts." @@ -1430,7 +1424,15 @@ msgstr "" "Ökokonto {} ist noch nicht verzeichnet. Abbuchungen können nur von " "verzeichneten Ökokonten erfolgen." -#: intervention/forms/modalForms.py:444 +#: intervention/forms/modalForms.py:443 +msgid "" +"Intervention {} is currently recorded. To change any data on it, the entry " +"must be unrecorded." +msgstr "" +"Eingriff {} ist verzeichnet. Der Eintrag muss erst entzeichnet werden um " +"fortfahren zu können." + +#: intervention/forms/modalForms.py:453 msgid "" "The account {} has not enough surface for a deduction of {} m². There are " "only {} m² left" @@ -1530,27 +1532,27 @@ msgstr "" "Kein Ausgleich jeglicher Art gefunden (Kompensation, Ersatzzahlung, " "Abbuchung)" -#: intervention/views.py:51 +#: intervention/views.py:52 msgid "Interventions - Overview" msgstr "Eingriffe - Übersicht" -#: intervention/views.py:84 +#: intervention/views.py:85 msgid "Intervention {} added" msgstr "Eingriff {} hinzugefügt" -#: intervention/views.py:315 +#: intervention/views.py:323 msgid "Intervention {} edited" msgstr "Eingriff {} bearbeitet" -#: intervention/views.py:351 +#: intervention/views.py:359 msgid "{} removed" msgstr "{} entfernt" -#: intervention/views.py:484 +#: intervention/views.py:492 msgid "Check performed" msgstr "Prüfung durchgeführt" -#: intervention/views.py:635 +#: intervention/views.py:643 msgid "There are errors on this intervention:" msgstr "Es liegen Fehler in diesem Eingriff vor:" @@ -1639,65 +1641,65 @@ msgstr "Nch Eintragungsstelle suchen" msgid "Save" msgstr "Speichern" -#: konova/forms.py:74 +#: konova/forms.py:73 msgid "Not editable" msgstr "Nicht editierbar" -#: konova/forms.py:162 konova/forms.py:334 +#: konova/forms.py:176 konova/forms.py:348 msgid "Confirm" msgstr "Bestätige" -#: konova/forms.py:174 konova/forms.py:343 +#: konova/forms.py:188 konova/forms.py:357 msgid "Remove" msgstr "Löschen" -#: konova/forms.py:176 +#: konova/forms.py:190 msgid "You are about to remove {} {}" msgstr "Sie sind dabei {} {} zu löschen" -#: konova/forms.py:263 konova/utils/quality.py:44 konova/utils/quality.py:46 +#: konova/forms.py:277 konova/utils/quality.py:44 konova/utils/quality.py:46 #: templates/form/collapsable/form.html:45 msgid "Geometry" msgstr "Geometrie" -#: konova/forms.py:344 +#: konova/forms.py:358 msgid "Are you sure?" msgstr "Sind Sie sicher?" -#: konova/forms.py:390 +#: konova/forms.py:404 msgid "When has this file been created? Important for photos." msgstr "Wann wurde diese Datei erstellt oder das Foto aufgenommen?" -#: konova/forms.py:401 +#: konova/forms.py:415 #: venv/lib/python3.7/site-packages/django/db/models/fields/files.py:231 msgid "File" msgstr "Datei" -#: konova/forms.py:403 +#: konova/forms.py:417 msgid "Allowed formats: pdf, jpg, png. Max size 15 MB." msgstr "Formate: pdf, jpg, png. Maximal 15 MB." -#: konova/forms.py:468 +#: konova/forms.py:482 msgid "Added document" msgstr "Dokument hinzugefügt" -#: konova/forms.py:525 +#: konova/forms.py:539 msgid "Confirm record" msgstr "Verzeichnen bestätigen" -#: konova/forms.py:533 +#: konova/forms.py:547 msgid "Record data" msgstr "Daten verzeichnen" -#: konova/forms.py:540 +#: konova/forms.py:554 msgid "Confirm unrecord" msgstr "Entzeichnen bestätigen" -#: konova/forms.py:541 +#: konova/forms.py:555 msgid "Unrecord data" msgstr "Daten entzeichnen" -#: konova/forms.py:542 +#: konova/forms.py:556 msgid "I, {} {}, confirm that this data must be unrecorded." msgstr "" "Ich, {} {}, bestätige, dass diese Daten wieder entzeichnet werden müssen." @@ -1895,11 +1897,18 @@ msgstr "Hierfür müssen Sie einer anderen Nutzergruppe angehören!" msgid "Status of Checked and Recorded reseted" msgstr "'Geprüft'/'Verzeichnet' wurde zurückgesetzt" -#: konova/utils/message_templates.py:22 +#: konova/utils/message_templates.py:20 +msgid "" +"Entry is recorded. To edit data, the entry first needs to be unrecorded." +msgstr "" +"Eintrag ist verzeichnet. Um Daten zu bearbeiten, muss der Eintrag erst " +"entzeichnet werden." + +#: konova/utils/message_templates.py:23 msgid "This data is not shared with you" msgstr "Diese Daten sind für Sie nicht freigegeben" -#: konova/utils/message_templates.py:23 +#: konova/utils/message_templates.py:24 msgid "" "Remember: This data has not been shared with you, yet. This means you can " "only read but can not edit or perform any actions like running a check or " @@ -1909,15 +1918,15 @@ msgstr "" "bedeutet, dass Sie nur lesenden Zugriff hierauf haben und weder bearbeiten, " "noch Prüfungen durchführen oder verzeichnen können." -#: konova/utils/message_templates.py:26 +#: konova/utils/message_templates.py:27 msgid "Unsupported file type" msgstr "Dateiformat nicht unterstützt" -#: konova/utils/message_templates.py:27 +#: konova/utils/message_templates.py:28 msgid "File too large" msgstr "Datei zu groß" -#: konova/utils/message_templates.py:30 +#: konova/utils/message_templates.py:31 msgid "" "Action canceled. Eco account is recorded or deductions exist. Only " "conservation office member can perform this action." @@ -1925,119 +1934,119 @@ msgstr "" "Aktion abgebrochen. Ökokonto ist bereits verzeichnet oder Abbuchungen liegen " "vor. Nur Eintragungsstellennutzer können diese Aktion jetzt durchführen." -#: konova/utils/message_templates.py:33 +#: konova/utils/message_templates.py:34 msgid "Compensation {} added" msgstr "Kompensation {} hinzugefügt" -#: konova/utils/message_templates.py:34 +#: konova/utils/message_templates.py:35 msgid "Compensation {} removed" msgstr "Kompensation {} entfernt" -#: konova/utils/message_templates.py:36 +#: konova/utils/message_templates.py:37 msgid "Added compensation action" msgstr "Maßnahme hinzugefügt" -#: konova/utils/message_templates.py:37 +#: konova/utils/message_templates.py:38 msgid "Added compensation state" msgstr "Zustand hinzugefügt" -#: konova/utils/message_templates.py:40 +#: konova/utils/message_templates.py:41 msgid "State removed" msgstr "Zustand gelöscht" -#: konova/utils/message_templates.py:41 +#: konova/utils/message_templates.py:42 msgid "State edited" msgstr "Zustand bearbeitet" -#: konova/utils/message_templates.py:42 +#: konova/utils/message_templates.py:43 msgid "State added" msgstr "Zustand hinzugefügt" -#: konova/utils/message_templates.py:45 +#: konova/utils/message_templates.py:46 msgid "Action added" msgstr "Maßnahme hinzugefügt" -#: konova/utils/message_templates.py:46 +#: konova/utils/message_templates.py:47 msgid "Action edited" msgstr "Maßnahme bearbeitet" -#: konova/utils/message_templates.py:47 +#: konova/utils/message_templates.py:48 msgid "Action removed" msgstr "Maßnahme entfernt" -#: konova/utils/message_templates.py:50 +#: konova/utils/message_templates.py:51 msgid "Deduction added" msgstr "Abbuchung hinzugefügt" -#: konova/utils/message_templates.py:51 +#: konova/utils/message_templates.py:52 msgid "Deduction edited" msgstr "Abbuchung bearbeitet" -#: konova/utils/message_templates.py:52 +#: konova/utils/message_templates.py:53 msgid "Deduction removed" msgstr "Abbuchung entfernt" -#: konova/utils/message_templates.py:55 +#: konova/utils/message_templates.py:56 msgid "Deadline added" msgstr "Frist/Termin hinzugefügt" -#: konova/utils/message_templates.py:56 +#: konova/utils/message_templates.py:57 msgid "Deadline edited" msgstr "Frist/Termin bearbeitet" -#: konova/utils/message_templates.py:57 +#: konova/utils/message_templates.py:58 msgid "Deadline removed" msgstr "Frist/Termin gelöscht" -#: konova/utils/message_templates.py:60 +#: konova/utils/message_templates.py:61 msgid "Payment added" msgstr "Zahlung hinzugefügt" -#: konova/utils/message_templates.py:61 +#: konova/utils/message_templates.py:62 msgid "Payment edited" msgstr "Zahlung bearbeitet" -#: konova/utils/message_templates.py:62 +#: konova/utils/message_templates.py:63 msgid "Payment removed" msgstr "Zahlung gelöscht" -#: konova/utils/message_templates.py:65 +#: konova/utils/message_templates.py:66 msgid "Revocation added" msgstr "Widerspruch hinzugefügt" -#: konova/utils/message_templates.py:66 +#: konova/utils/message_templates.py:67 msgid "Revocation edited" msgstr "Widerspruch bearbeitet" -#: konova/utils/message_templates.py:67 +#: konova/utils/message_templates.py:68 msgid "Revocation removed" msgstr "Widerspruch entfernt" -#: konova/utils/message_templates.py:70 +#: konova/utils/message_templates.py:71 msgid "Document '{}' deleted" msgstr "Dokument '{}' gelöscht" -#: konova/utils/message_templates.py:71 +#: konova/utils/message_templates.py:72 msgid "Document added" msgstr "Dokument hinzugefügt" -#: konova/utils/message_templates.py:72 +#: konova/utils/message_templates.py:73 msgid "Document edited" msgstr "Dokument bearbeitet" -#: konova/utils/message_templates.py:75 +#: konova/utils/message_templates.py:76 msgid "Edited general data" msgstr "Allgemeine Daten bearbeitet" -#: konova/utils/message_templates.py:76 +#: konova/utils/message_templates.py:77 msgid "Added deadline" msgstr "Frist/Termin hinzugefügt" -#: konova/utils/message_templates.py:79 +#: konova/utils/message_templates.py:80 msgid "Geometry conflict detected with {}" msgstr "Geometriekonflikt mit folgenden Einträgen erkannt: {}" -#: konova/utils/message_templates.py:82 +#: konova/utils/message_templates.py:83 msgid "This intervention has {} revocations" msgstr "Dem Eingriff liegen {} Widersprüche vor"