diff --git a/compensation/models/compensation.py b/compensation/models/compensation.py index d09599d..a32926c 100644 --- a/compensation/models/compensation.py +++ b/compensation/models/compensation.py @@ -421,19 +421,18 @@ class Compensation(AbstractCompensation, CEFMixin, CoherenceMixin, PikMixin): ) return docs - def mark_as_edited(self, user: User, request: HttpRequest = None, edit_comment: str = None, reset_recorded: bool = True): - """ Performs internal logic for setting the recordedd/checked state of the related intervention + def mark_as_edited(self, user: User, request: HttpRequest = None, edit_comment: str = None): + """ Performs internal logic for setting the checked state of the related intervention Args: user (User): The performing user request (HttpRequest): The performing request edit_comment (str): Additional comment for the log entry - reset_recorded (bool): Whether the record-state of the object should be reset Returns: """ - self.intervention.unrecord(user, request) + self.intervention.set_unchecked() action = super().mark_as_edited(user, edit_comment=edit_comment) return action diff --git a/compensation/views/compensation/compensation.py b/compensation/views/compensation/compensation.py index 0a198bb..1b4691c 100644 --- a/compensation/views/compensation/compensation.py +++ b/compensation/views/compensation/compensation.py @@ -25,7 +25,7 @@ from konova.forms.modals import RemoveModalForm from konova.settings import DEFAULT_GROUP, ZB_GROUP, ETS_GROUP from konova.sub_settings.context_settings import TAB_TITLE_IDENTIFIER from konova.utils.message_templates import COMPENSATION_REMOVED_TEMPLATE, DATA_CHECKED_PREVIOUSLY_TEMPLATE, \ - RECORDED_BLOCKS_EDIT, CHECKED_RECORDED_RESET, FORM_INVALID, PARAMS_INVALID, IDENTIFIER_REPLACED, \ + RECORDED_BLOCKS_EDIT, CHECK_STATE_RESET, FORM_INVALID, PARAMS_INVALID, IDENTIFIER_REPLACED, \ COMPENSATION_ADDED_TEMPLATE, DO_NOT_FORGET_TO_SHARE, GEOMETRY_SIMPLIFIED from konova.utils.user_checks import in_group @@ -170,15 +170,14 @@ def edit_view(request: HttpRequest, id: str): geom_form = SimpleGeomForm(request.POST or None, read_only=False, instance=comp) if request.method == "POST": if data_form.is_valid() and geom_form.is_valid(): - # Preserve state of intervention recorded/checked to determine whether the user must be informed or not - # about a change of the recorded/checked state - intervention_recorded = comp.intervention.recorded is not None - intervention_checked = comp.intervention.checked is not None + # Preserve state of intervention checked to determine whether the user must be informed or not + # about a change of the check state + intervention_is_checked = comp.intervention.checked is not None # The data form takes the geom form for processing, as well as the performing user comp = data_form.save(request.user, geom_form) - if intervention_recorded or intervention_checked: - messages.info(request, CHECKED_RECORDED_RESET) + if intervention_is_checked: + messages.info(request, CHECK_STATE_RESET) messages.success(request, _("Compensation {} edited").format(comp.identifier)) if geom_form.geometry_simplified: messages.info( diff --git a/intervention/models/intervention.py b/intervention/models/intervention.py index b54fa8f..d54a1b9 100644 --- a/intervention/models/intervention.py +++ b/intervention/models/intervention.py @@ -279,22 +279,20 @@ class Intervention(BaseObject, revocation.delete() self.mark_as_edited(user, request=form.request, edit_comment=REVOCATION_REMOVED) - def mark_as_edited(self, performing_user: User, request: HttpRequest = None, edit_comment: str = None, reset_recorded: bool = True): - """ In case the object or a related object changed, internal processes need to be started, such as - unrecord and uncheck + def mark_as_edited(self, performing_user: User, request: HttpRequest = None, edit_comment: str = None): + """ Log the edit action + + If the object is checked, set it to unchecked due to the editing. Another check is needed then. Args: performing_user (User): The user which performed the editing action request (HttpRequest): The used request for this action edit_comment (str): Additional comment for the log entry - reset_recorded (bool): Whether the record-state of the object should be reset Returns: """ action = super().mark_as_edited(performing_user, edit_comment=edit_comment) - if reset_recorded: - self.unrecord(performing_user, request) if self.checked: self.set_unchecked() return action diff --git a/intervention/views/intervention.py b/intervention/views/intervention.py index a69ba4a..681fc3b 100644 --- a/intervention/views/intervention.py +++ b/intervention/views/intervention.py @@ -22,7 +22,7 @@ from konova.forms.modals import RemoveModalForm from konova.settings import DEFAULT_GROUP, ZB_GROUP, ETS_GROUP from konova.sub_settings.context_settings import TAB_TITLE_IDENTIFIER from konova.utils.message_templates import DATA_CHECKED_PREVIOUSLY_TEMPLATE, RECORDED_BLOCKS_EDIT, \ - CHECKED_RECORDED_RESET, FORM_INVALID, IDENTIFIER_REPLACED, DO_NOT_FORGET_TO_SHARE, GEOMETRY_SIMPLIFIED + CHECK_STATE_RESET, FORM_INVALID, IDENTIFIER_REPLACED, DO_NOT_FORGET_TO_SHARE, GEOMETRY_SIMPLIFIED from konova.utils.user_checks import in_group @@ -230,12 +230,11 @@ def edit_view(request: HttpRequest, id: str): if data_form.is_valid() and geom_form.is_valid(): # The data form takes the geom form for processing, as well as the performing user # Save the current state of recorded|checked to inform the user in case of a status reset due to editing - i_rec = intervention.recorded is not None - i_check = intervention.checked is not None + intervention_is_checked = intervention.checked is not None intervention = data_form.save(request.user, geom_form) messages.success(request, _("Intervention {} edited").format(intervention.identifier)) - if i_check or i_rec: - messages.info(request, CHECKED_RECORDED_RESET) + if intervention_is_checked: + messages.info(request, CHECK_STATE_RESET) if geom_form.geometry_simplified: messages.info( request, diff --git a/konova/forms/remove_form.py b/konova/forms/remove_form.py index d5c884a..5d08ca2 100644 --- a/konova/forms/remove_form.py +++ b/konova/forms/remove_form.py @@ -14,6 +14,12 @@ from user.models import UserActionLogEntry, User class RemoveForm(BaseForm): + """ DEPRECATED + + NOT USED IN ANY PLACE. + CAN BE DELETED AT SOME POINT. + + """ check = forms.BooleanField( label=_("Confirm"), label_suffix=_(""), diff --git a/konova/models/object.py b/konova/models/object.py index 1fe0ceb..51817cb 100644 --- a/konova/models/object.py +++ b/konova/models/object.py @@ -23,13 +23,9 @@ from django.core.exceptions import ObjectDoesNotExist from django.http import HttpRequest from django.utils.timezone import now from django.db import models, transaction -from compensation.settings import COMPENSATION_IDENTIFIER_TEMPLATE, COMPENSATION_IDENTIFIER_LENGTH, \ - ECO_ACCOUNT_IDENTIFIER_TEMPLATE, ECO_ACCOUNT_IDENTIFIER_LENGTH -from ema.settings import EMA_IDENTIFIER_LENGTH, EMA_IDENTIFIER_TEMPLATE -from intervention.settings import INTERVENTION_IDENTIFIER_LENGTH, INTERVENTION_IDENTIFIER_TEMPLATE from konova.utils import generators from konova.utils.generators import generate_random_string -from konova.utils.message_templates import CHECKED_RECORDED_RESET, GEOMETRY_CONFLICT_WITH_TEMPLATE +from konova.utils.message_templates import GEOMETRY_CONFLICT_WITH_TEMPLATE class UuidModel(models.Model): @@ -298,27 +294,6 @@ class RecordableObjectMixin(models.Model): return action - def unrecord(self, performing_user, request: HttpRequest = None): - """ Unrecords a dataset - - Args: - performing_user (User): The user which performed the editing action - request (HttpRequest): The used request for this action - - Returns: - - """ - action = None - if self.recorded: - action = self.set_unrecorded(performing_user) - self.log.add(action) - if request: - messages.info( - request, - CHECKED_RECORDED_RESET - ) - return action - @abstractmethod def is_ready_for_publish(self) -> bool: """ Check for all needed publishing-constraints on the data @@ -353,7 +328,7 @@ class CheckableObjectMixin(models.Model): abstract = True def set_unchecked(self) -> None: - """ Perform unrecording + """ Perform unchecking Args: @@ -363,7 +338,7 @@ class CheckableObjectMixin(models.Model): if not self.checked: # Nothing to do return - # Do not .delete() the checked attribute! Just set it to None, since a delete() would kill it out of the + # Do not .delete() the checked attribute! Just set it to None, since a delete() would remove it from the # log history, which is not what we want! self.checked = None self.save() diff --git a/konova/tests/test_views.py b/konova/tests/test_views.py index 81736c8..6eebfa1 100644 --- a/konova/tests/test_views.py +++ b/konova/tests/test_views.py @@ -290,7 +290,7 @@ class BaseTestCase(TestCase): ]) return codes - def create_dummy_team(self): + def create_dummy_team(self, name: str = None): """ Creates a dummy team Returns: @@ -299,8 +299,11 @@ class BaseTestCase(TestCase): if self.superuser is None: self.create_users() + if not name: + name = "Testteam" + team = Team.objects.get_or_create( - name="Testteam", + name=name, description="Testdescription", )[0] team.users.add(self.superuser) diff --git a/konova/tests/unit/test_models.py b/konova/tests/unit/test_models.py new file mode 100644 index 0000000..8f0e881 --- /dev/null +++ b/konova/tests/unit/test_models.py @@ -0,0 +1,182 @@ +""" +Author: Michel Peltriaux +Organization: Struktur- und Genehmigungsdirektion Nord, Rhineland-Palatinate, Germany +Contact: ksp-servicestelle@sgdnord.rlp.de +Created on: 08.09.23 + +""" +from django.test import RequestFactory + +from intervention.forms.modals.share import ShareModalForm +from konova.models import DeadlineType +from konova.settings import ZB_GROUP +from konova.tests.test_views import BaseTestCase +from konova.utils.user_checks import is_default_group_only +from user.models import UserAction + + + +class DeadlineTestCase(BaseTestCase): + def setUp(self) -> None: + super().setUp() + + def test_str(self): + self.assertEqual(str(self.finished_deadline), self.finished_deadline.type) + + def test_type_humanized_property(self): + self.assertEqual(self.finished_deadline.type_humanized, DeadlineType.FINISHED.label) + + +class BaseObjectTestCase(BaseTestCase): + def test_add_log_entry(self): + self.assertEqual(self.intervention.log.count(), 0) + self.intervention.add_log_entry(UserAction.EDITED, self.user, "TEST") + self.assertEqual(self.intervention.log.count(), 1) + last_log = self.intervention.log.first() + self.assertEqual(last_log.user, self.user) + self.assertEqual(last_log.comment, "TEST") + self.assertEqual(last_log.action, UserAction.EDITED) + + def test_generate_new_identifier(self): + old_identifier = self.intervention.identifier + new_identifier = self.intervention.generate_new_identifier() + self.assertNotEqual(old_identifier, new_identifier) + + +class RecordableObjectMixinTestCase(BaseTestCase): + def test_set_recorded_and_set_unrecorded(self): + """ Tests set_unrecorded() as well + + Returns: + + """ + self.intervention.set_recorded(self.user) + self.assertIsNotNone(self.intervention.recorded) + self.assertEqual(self.intervention.recorded.user, self.user) + self.assertEqual(self.intervention.recorded.action, UserAction.RECORDED) + + self.intervention.set_unrecorded(self.user) + self.assertIsNone(self.intervention.recorded) + last_log = self.intervention.log.first() + self.assertEqual(last_log.action, UserAction.UNRECORDED) + self.assertEqual(last_log.user, self.user) + + +class CheckableObjectMixinTestCase(BaseTestCase): + def test_set_unchecked_and_set_checked(self): + self.intervention.set_checked(self.user) + self.assertIsNotNone(self.intervention.checked) + self.assertEqual(self.intervention.checked.action, UserAction.CHECKED) + self.assertEqual(self.intervention.checked.user, self.user) + checked_action = self.intervention.checked + + self.intervention.set_unchecked() + self.assertIsNone(self.intervention.checked) + + # There is no explicit UNCHECKED UserAction since unchecking does never happen manually but only as an + # automatic consequence of editing an already checked entry. Therefore the last log entry in this case would + # be the checking of the entry + last_log = self.intervention.log.first() + self.assertEqual(last_log.action, UserAction.CHECKED) + self.assertEqual(last_log.user, self.user) + self.assertEqual(last_log, checked_action) + + def test_get_last_checked_action(self): + self.intervention.set_checked(self.user) + action = self.intervention.checked + + self.intervention.mark_as_edited(self.user) + last_log = self.intervention.log.first() + self.assertNotEqual(last_log, action) + + last_check_action = self.intervention.get_last_checked_action() + self.assertEqual(action, last_check_action) + + +class ShareableObjectMixinTestCase(BaseTestCase): + def test_share_with_and_is_shared_with(self): + self.assertFalse(self.intervention.is_shared_with(self.user)) + self.assertNotIn(self.user, self.intervention.shared_users) + + self.intervention.share_with_user(self.user) + self.assertTrue(self.intervention.is_shared_with(self.user)) + self.assertIn(self.user, self.intervention.shared_users) + + self.assertTrue(self.intervention.is_only_shared_with(self.user)) + self.assertFalse(self.intervention.is_only_shared_with(self.superuser)) + self.assertNotIn(self.superuser, self.intervention.shared_users) + self.intervention.share_with_user(self.superuser) + self.assertFalse(self.intervention.is_only_shared_with(self.user)) + self.assertIn(self.superuser, self.intervention.shared_users) + + self.intervention.share_with_user_list([]) + self.assertNotIn(self.superuser, self.intervention.shared_users) + self.assertNotIn(self.user, self.intervention.shared_users) + self.intervention.share_with_user_list([ + self.superuser, + self.user + ]) + self.assertIn(self.superuser, self.intervention.shared_users) + self.assertIn(self.user, self.intervention.shared_users) + + def test_share_with_team_and_team_list(self): + self.assertNotIn(self.team, self.intervention.shared_teams) + self.intervention.share_with_team(self.team) + self.assertIn(self.team, self.intervention.shared_teams) + + another_team = self.create_dummy_team(name="Another team") + team_list = [ + self.team, + another_team + ] + self.assertNotIn(another_team, self.intervention.shared_teams) + self.intervention.share_with_team_list(team_list) + self.assertIn(another_team, self.intervention.shared_teams) + + def test_update_shared_access(self): + another_team = self.create_dummy_team(name="Another team") + request = RequestFactory().request() + request.user = self.superuser + self.superuser.groups.add( + self.groups.get(name=ZB_GROUP) + ) + + self.intervention.share_with_team(another_team) + self.intervention.share_with_user(self.user) + self.assertTrue(self.intervention.is_shared_with(self.user)) + self.assertIn(another_team, self.intervention.shared_teams) + + data = { + "users": [ + self.superuser.id, + ], + "teams": [ + self.team.id, + ] + } + form = ShareModalForm(data, request=request, instance=self.intervention) + self.assertTrue(form.is_valid(), msg=form.errors) + form.save() + self.assertNotIn(self.user, self.intervention.shared_users) + self.assertNotIn(another_team, self.intervention.shared_teams) + self.assertIn(self.superuser, self.intervention.shared_users) + self.assertIn(self.team, self.intervention.shared_teams) + + def test_unshare_with_default_users(self): + self.superuser.groups.add( + self.groups.get( + name=ZB_GROUP + ) + ) + self.intervention.share_with_user(self.user) + self.intervention.share_with_user(self.superuser) + + self.assertTrue(is_default_group_only(self.user)) + self.assertFalse(is_default_group_only(self.superuser)) + + self.assertTrue(self.intervention.is_shared_with(self.user)) + self.assertTrue(self.intervention.is_shared_with(self.superuser)) + + self.intervention.unshare_with_default_users() + self.assertFalse(self.intervention.is_shared_with(self.user)) + self.assertTrue(self.intervention.is_shared_with(self.superuser)) diff --git a/konova/utils/message_templates.py b/konova/utils/message_templates.py index 6dcaa33..b36e2a0 100644 --- a/konova/utils/message_templates.py +++ b/konova/utils/message_templates.py @@ -18,7 +18,7 @@ INTERVENTION_INVALID = _("There are errors in this intervention.") IDENTIFIER_REPLACED = _("The identifier '{}' had to be changed to '{}' since another entry has been added in the meanwhile, which uses this identifier") ENTRY_REMOVE_MISSING_PERMISSION = _("Only conservation or registration office users are allowed to remove entries.") MISSING_GROUP_PERMISSION = _("You need to be part of another user group.") -CHECKED_RECORDED_RESET = _("Status of Checked and Recorded reseted") +CHECK_STATE_RESET = _("Status of Checked reset") RECORDED_BLOCKS_EDIT = _("Entry is recorded. To edit data, the entry first needs to be unrecorded.") # SHARE diff --git a/locale/de/LC_MESSAGES/django.mo b/locale/de/LC_MESSAGES/django.mo index e5844ea..cbfcbda 100644 Binary files a/locale/de/LC_MESSAGES/django.mo and b/locale/de/LC_MESSAGES/django.mo differ diff --git a/locale/de/LC_MESSAGES/django.po b/locale/de/LC_MESSAGES/django.po index f243ba2..4eef6ff 100644 --- a/locale/de/LC_MESSAGES/django.po +++ b/locale/de/LC_MESSAGES/django.po @@ -29,21 +29,21 @@ #: konova/filters/mixins/office.py:25 konova/filters/mixins/office.py:56 #: konova/filters/mixins/office.py:57 konova/filters/mixins/record.py:23 #: konova/filters/mixins/self_created.py:24 konova/filters/mixins/share.py:23 -#: konova/forms/geometry_form.py:33 konova/forms/modals/document_form.py:26 +#: konova/forms/geometry_form.py:32 konova/forms/modals/document_form.py:26 #: konova/forms/modals/document_form.py:36 #: konova/forms/modals/document_form.py:50 #: konova/forms/modals/document_form.py:62 #: konova/forms/modals/document_form.py:80 #: konova/forms/modals/remove_form.py:23 #: konova/forms/modals/resubmission_form.py:22 -#: konova/forms/modals/resubmission_form.py:38 konova/forms/remove_form.py:19 -#: user/forms/user.py:39 +#: konova/forms/modals/resubmission_form.py:38 konova/forms/remove_form.py:25 +#: konova/tests/unit/test_forms.py:59 user/forms/user.py:39 #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-08-30 13:24+0200\n" +"POT-Creation-Date: 2023-09-08 11:30+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -401,6 +401,7 @@ msgid "An explanatory name" msgstr "Aussagekräftiger Titel" #: compensation/forms/compensation.py:49 ema/forms.py:51 ema/forms.py:114 +#: ema/tests/unit/test_forms.py:31 ema/tests/unit/test_forms.py:85 msgid "Compensation XY; Location ABC" msgstr "Kompensation XY; Flur ABC" @@ -490,8 +491,8 @@ msgid "" "{}m² have been deducted from this eco account so far. The given value of {} " "would be too low." msgstr "" -"{}n² wurden bereits von diesem Ökokonto abgebucht. Der eingegebene Wert von {} " -"wäre daher zu klein." +"{}n² wurden bereits von diesem Ökokonto abgebucht. Der eingegebene Wert von " +"{} wäre daher zu klein." #: compensation/forms/eco_account.py:249 msgid "The account can not be removed, since there are still deductions." @@ -935,6 +936,7 @@ msgstr "Öffentlicher Bericht" #: ema/templates/ema/detail/includes/controls.html:15 #: intervention/templates/intervention/detail/includes/controls.html:15 #: konova/forms/modals/resubmission_form.py:51 +#: konova/tests/unit/test_forms.py:302 konova/tests/unit/test_forms.py:316 #: templates/email/resubmission/resubmission.html:4 msgid "Resubmission" msgstr "Wiedervorlage" @@ -997,7 +999,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/modals/document_form.py:79 +#: konova/forms/modals/document_form.py:79 konova/tests/unit/test_forms.py:58 msgid "Add new document" msgstr "Neues Dokument hinzufügen" @@ -1013,7 +1015,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:70 -#: konova/forms/modals/document_form.py:141 +#: konova/forms/modals/document_form.py:141 konova/tests/unit/test_forms.py:118 msgid "Edit document" msgstr "Dokument bearbeiten" @@ -1187,6 +1189,7 @@ msgstr "weitere Nutzer" #: ema/templates/ema/detail/includes/controls.html:18 #: intervention/forms/modals/share.py:63 #: intervention/templates/intervention/detail/includes/controls.html:18 +#: intervention/tests/unit/test_forms.py:150 msgid "Share" msgstr "Freigabe" @@ -1291,14 +1294,14 @@ msgstr "Daten zu den verantwortlichen Stellen" msgid "Compensations - Overview" msgstr "Kompensationen - Übersicht" -#: compensation/views/compensation/compensation.py:182 +#: compensation/views/compensation/compensation.py:181 #: konova/utils/message_templates.py:40 msgid "Compensation {} edited" msgstr "Kompensation {} bearbeitet" -#: compensation/views/compensation/compensation.py:197 -#: compensation/views/eco_account/eco_account.py:171 ema/views/ema.py:231 -#: intervention/views/intervention.py:253 +#: compensation/views/compensation/compensation.py:196 +#: compensation/views/eco_account/eco_account.py:173 ema/views/ema.py:231 +#: intervention/views/intervention.py:252 msgid "Edit {}" msgstr "Bearbeite {}" @@ -1316,19 +1319,19 @@ msgstr "Ökokonten - Übersicht" msgid "Eco-Account {} added" msgstr "Ökokonto {} hinzugefügt" -#: compensation/views/eco_account/eco_account.py:156 +#: compensation/views/eco_account/eco_account.py:158 msgid "Eco-Account {} edited" msgstr "Ökokonto {} bearbeitet" -#: compensation/views/eco_account/eco_account.py:285 +#: compensation/views/eco_account/eco_account.py:287 msgid "Eco-account removed" msgstr "Ökokonto entfernt" -#: ema/forms.py:42 ema/views/ema.py:102 +#: ema/forms.py:42 ema/tests/unit/test_forms.py:27 ema/views/ema.py:102 msgid "New EMA" msgstr "Neue EMA hinzufügen" -#: ema/forms.py:108 +#: ema/forms.py:108 ema/tests/unit/test_forms.py:81 msgid "Edit EMA" msgstr "Bearbeite EMA" @@ -1427,7 +1430,7 @@ msgid "Binding on" msgstr "Datum Bestandskraft bzw. Rechtskraft" #: intervention/forms/intervention.py:216 -#: intervention/tests/unit/test_forms.py:27 +#: intervention/tests/unit/test_forms.py:36 #: intervention/views/intervention.py:105 msgid "New intervention" msgstr "Neuer Eingriff" @@ -1450,6 +1453,7 @@ msgid "Run check" msgstr "Prüfung vornehmen" #: intervention/forms/modals/check.py:36 konova/forms/modals/record_form.py:30 +#: konova/tests/unit/test_forms.py:155 msgid "" "I, {} {}, confirm that all necessary control steps have been performed by " "myself." @@ -1512,6 +1516,7 @@ msgstr "Muss kleiner als 15 Mb sein" #: intervention/forms/modals/revocation.py:62 #: intervention/templates/intervention/detail/includes/revocation.html:18 +#: intervention/tests/unit/test_forms.py:234 msgid "Add revocation" msgstr "Widerspruch hinzufügen" @@ -1553,6 +1558,7 @@ msgstr "" "noch nicht freigegeben wurde. Geben Sie den ganzen Nutzernamen an." #: intervention/forms/modals/share.py:64 +#: intervention/tests/unit/test_forms.py:151 msgid "Share settings for {}" msgstr "Freigabe Einstellungen für {}" @@ -1668,11 +1674,11 @@ msgstr "Eingriffe - Übersicht" msgid "Intervention {} added" msgstr "Eingriff {} hinzugefügt" -#: intervention/views/intervention.py:236 +#: intervention/views/intervention.py:235 msgid "Intervention {} edited" msgstr "Eingriff {} bearbeitet" -#: intervention/views/intervention.py:278 +#: intervention/views/intervention.py:277 msgid "{} removed" msgstr "{} entfernt" @@ -1790,12 +1796,12 @@ msgstr "Speichern" msgid "Not editable" msgstr "Nicht editierbar" -#: konova/forms/geometry_form.py:32 konova/utils/quality.py:44 +#: konova/forms/geometry_form.py:31 konova/utils/quality.py:44 #: konova/utils/quality.py:46 templates/form/collapsable/form.html:45 msgid "Geometry" msgstr "Geometrie" -#: konova/forms/geometry_form.py:101 +#: konova/forms/geometry_form.py:100 msgid "Only surfaces allowed. Points or lines must be buffered." msgstr "" "Nur Flächen erlaubt. Punkte oder Linien müssen zu Flächen gepuffert werden." @@ -1813,7 +1819,7 @@ msgstr "Datei" msgid "Allowed formats: pdf, jpg, png. Max size 15 MB." msgstr "Formate: pdf, jpg, png. Maximal 15 MB." -#: konova/forms/modals/document_form.py:116 +#: konova/forms/modals/document_form.py:116 konova/tests/unit/test_forms.py:95 msgid "Added document" msgstr "Dokument hinzugefügt" @@ -1821,32 +1827,34 @@ msgstr "Dokument hinzugefügt" msgid "Confirm record" msgstr "Verzeichnen bestätigen" -#: konova/forms/modals/record_form.py:29 +#: konova/forms/modals/record_form.py:29 konova/tests/unit/test_forms.py:153 msgid "Record data" msgstr "Daten verzeichnen" -#: konova/forms/modals/record_form.py:36 +#: konova/forms/modals/record_form.py:36 konova/tests/unit/test_forms.py:168 msgid "Confirm unrecord" msgstr "Entzeichnen bestätigen" -#: konova/forms/modals/record_form.py:37 +#: konova/forms/modals/record_form.py:37 konova/tests/unit/test_forms.py:167 msgid "Unrecord data" msgstr "Daten entzeichnen" -#: konova/forms/modals/record_form.py:38 +#: konova/forms/modals/record_form.py:38 konova/tests/unit/test_forms.py:170 msgid "I, {} {}, confirm that this data must be unrecorded." msgstr "" "Ich, {} {}, bestätige, dass diese Daten wieder entzeichnet werden müssen." -#: konova/forms/modals/remove_form.py:22 konova/forms/remove_form.py:18 +#: konova/forms/modals/remove_form.py:22 konova/forms/remove_form.py:24 msgid "Confirm" msgstr "Bestätige" -#: konova/forms/modals/remove_form.py:32 konova/forms/remove_form.py:30 +#: konova/forms/modals/remove_form.py:32 konova/forms/remove_form.py:36 +#: konova/tests/unit/test_forms.py:209 konova/tests/unit/test_forms.py:261 msgid "Remove" msgstr "Löschen" -#: konova/forms/modals/remove_form.py:33 +#: konova/forms/modals/remove_form.py:33 konova/tests/unit/test_forms.py:210 +#: konova/tests/unit/test_forms.py:262 msgid "Are you sure?" msgstr "Sind Sie sicher?" @@ -1855,6 +1863,7 @@ msgid "When do you want to be reminded?" msgstr "Wann wollen Sie erinnert werden?" #: konova/forms/modals/resubmission_form.py:52 +#: konova/tests/unit/test_forms.py:303 konova/tests/unit/test_forms.py:317 msgid "Set your resubmission for this entry." msgstr "Setzen Sie eine Wiedervorlage für diesen Eintrag." @@ -1862,7 +1871,7 @@ msgstr "Setzen Sie eine Wiedervorlage für diesen Eintrag." msgid "The date should be in the future" msgstr "Das Datum sollte in der Zukunft liegen" -#: konova/forms/remove_form.py:32 +#: konova/forms/remove_form.py:38 msgid "You are about to remove {} {}" msgstr "Sie sind dabei {} {} zu löschen" @@ -2077,8 +2086,8 @@ msgid "You need to be part of another user group." msgstr "Hierfür müssen Sie einer anderen Nutzergruppe angehören!" #: konova/utils/message_templates.py:21 -msgid "Status of Checked and Recorded reseted" -msgstr "'Geprüft'/'Verzeichnet' wurde zurückgesetzt" +msgid "Status of Checked reset" +msgstr "Status 'Geprüft' wurde zurückgesetzt" #: konova/utils/message_templates.py:22 msgid ""