# Unit test konova app
* adds unit test for konova app models * drops unused/unnecessary code fragments * updates translation
This commit is contained in:
parent
42cb138276
commit
e443c5f8be
@ -421,19 +421,18 @@ class Compensation(AbstractCompensation, CEFMixin, CoherenceMixin, PikMixin):
|
|||||||
)
|
)
|
||||||
return docs
|
return docs
|
||||||
|
|
||||||
def mark_as_edited(self, user: User, request: HttpRequest = None, edit_comment: str = None, reset_recorded: bool = True):
|
def mark_as_edited(self, user: User, request: HttpRequest = None, edit_comment: str = None):
|
||||||
""" Performs internal logic for setting the recordedd/checked state of the related intervention
|
""" Performs internal logic for setting the checked state of the related intervention
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
user (User): The performing user
|
user (User): The performing user
|
||||||
request (HttpRequest): The performing request
|
request (HttpRequest): The performing request
|
||||||
edit_comment (str): Additional comment for the log entry
|
edit_comment (str): Additional comment for the log entry
|
||||||
reset_recorded (bool): Whether the record-state of the object should be reset
|
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
"""
|
"""
|
||||||
self.intervention.unrecord(user, request)
|
self.intervention.set_unchecked()
|
||||||
action = super().mark_as_edited(user, edit_comment=edit_comment)
|
action = super().mark_as_edited(user, edit_comment=edit_comment)
|
||||||
return action
|
return action
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ from konova.forms.modals import RemoveModalForm
|
|||||||
from konova.settings import DEFAULT_GROUP, ZB_GROUP, ETS_GROUP
|
from konova.settings import DEFAULT_GROUP, ZB_GROUP, ETS_GROUP
|
||||||
from konova.sub_settings.context_settings import TAB_TITLE_IDENTIFIER
|
from konova.sub_settings.context_settings import TAB_TITLE_IDENTIFIER
|
||||||
from konova.utils.message_templates import COMPENSATION_REMOVED_TEMPLATE, DATA_CHECKED_PREVIOUSLY_TEMPLATE, \
|
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
|
COMPENSATION_ADDED_TEMPLATE, DO_NOT_FORGET_TO_SHARE, GEOMETRY_SIMPLIFIED
|
||||||
from konova.utils.user_checks import in_group
|
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)
|
geom_form = SimpleGeomForm(request.POST or None, read_only=False, instance=comp)
|
||||||
if request.method == "POST":
|
if request.method == "POST":
|
||||||
if data_form.is_valid() and geom_form.is_valid():
|
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
|
# Preserve state of intervention checked to determine whether the user must be informed or not
|
||||||
# about a change of the recorded/checked state
|
# about a change of the check state
|
||||||
intervention_recorded = comp.intervention.recorded is not None
|
intervention_is_checked = comp.intervention.checked is not None
|
||||||
intervention_checked = comp.intervention.checked is not None
|
|
||||||
|
|
||||||
# The data form takes the geom form for processing, as well as the performing user
|
# The data form takes the geom form for processing, as well as the performing user
|
||||||
comp = data_form.save(request.user, geom_form)
|
comp = data_form.save(request.user, geom_form)
|
||||||
if intervention_recorded or intervention_checked:
|
if intervention_is_checked:
|
||||||
messages.info(request, CHECKED_RECORDED_RESET)
|
messages.info(request, CHECK_STATE_RESET)
|
||||||
messages.success(request, _("Compensation {} edited").format(comp.identifier))
|
messages.success(request, _("Compensation {} edited").format(comp.identifier))
|
||||||
if geom_form.geometry_simplified:
|
if geom_form.geometry_simplified:
|
||||||
messages.info(
|
messages.info(
|
||||||
|
@ -279,22 +279,20 @@ class Intervention(BaseObject,
|
|||||||
revocation.delete()
|
revocation.delete()
|
||||||
self.mark_as_edited(user, request=form.request, edit_comment=REVOCATION_REMOVED)
|
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):
|
def mark_as_edited(self, performing_user: User, request: HttpRequest = None, edit_comment: str = None):
|
||||||
""" In case the object or a related object changed, internal processes need to be started, such as
|
""" Log the edit action
|
||||||
unrecord and uncheck
|
|
||||||
|
If the object is checked, set it to unchecked due to the editing. Another check is needed then.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
performing_user (User): The user which performed the editing action
|
performing_user (User): The user which performed the editing action
|
||||||
request (HttpRequest): The used request for this action
|
request (HttpRequest): The used request for this action
|
||||||
edit_comment (str): Additional comment for the log entry
|
edit_comment (str): Additional comment for the log entry
|
||||||
reset_recorded (bool): Whether the record-state of the object should be reset
|
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
"""
|
"""
|
||||||
action = super().mark_as_edited(performing_user, edit_comment=edit_comment)
|
action = super().mark_as_edited(performing_user, edit_comment=edit_comment)
|
||||||
if reset_recorded:
|
|
||||||
self.unrecord(performing_user, request)
|
|
||||||
if self.checked:
|
if self.checked:
|
||||||
self.set_unchecked()
|
self.set_unchecked()
|
||||||
return action
|
return action
|
||||||
|
@ -22,7 +22,7 @@ from konova.forms.modals import RemoveModalForm
|
|||||||
from konova.settings import DEFAULT_GROUP, ZB_GROUP, ETS_GROUP
|
from konova.settings import DEFAULT_GROUP, ZB_GROUP, ETS_GROUP
|
||||||
from konova.sub_settings.context_settings import TAB_TITLE_IDENTIFIER
|
from konova.sub_settings.context_settings import TAB_TITLE_IDENTIFIER
|
||||||
from konova.utils.message_templates import DATA_CHECKED_PREVIOUSLY_TEMPLATE, RECORDED_BLOCKS_EDIT, \
|
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
|
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():
|
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
|
# 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
|
# 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
|
intervention_is_checked = intervention.checked is not None
|
||||||
i_check = intervention.checked is not None
|
|
||||||
intervention = data_form.save(request.user, geom_form)
|
intervention = data_form.save(request.user, geom_form)
|
||||||
messages.success(request, _("Intervention {} edited").format(intervention.identifier))
|
messages.success(request, _("Intervention {} edited").format(intervention.identifier))
|
||||||
if i_check or i_rec:
|
if intervention_is_checked:
|
||||||
messages.info(request, CHECKED_RECORDED_RESET)
|
messages.info(request, CHECK_STATE_RESET)
|
||||||
if geom_form.geometry_simplified:
|
if geom_form.geometry_simplified:
|
||||||
messages.info(
|
messages.info(
|
||||||
request,
|
request,
|
||||||
|
@ -14,6 +14,12 @@ from user.models import UserActionLogEntry, User
|
|||||||
|
|
||||||
|
|
||||||
class RemoveForm(BaseForm):
|
class RemoveForm(BaseForm):
|
||||||
|
""" DEPRECATED
|
||||||
|
|
||||||
|
NOT USED IN ANY PLACE.
|
||||||
|
CAN BE DELETED AT SOME POINT.
|
||||||
|
|
||||||
|
"""
|
||||||
check = forms.BooleanField(
|
check = forms.BooleanField(
|
||||||
label=_("Confirm"),
|
label=_("Confirm"),
|
||||||
label_suffix=_(""),
|
label_suffix=_(""),
|
||||||
|
@ -23,13 +23,9 @@ from django.core.exceptions import ObjectDoesNotExist
|
|||||||
from django.http import HttpRequest
|
from django.http import HttpRequest
|
||||||
from django.utils.timezone import now
|
from django.utils.timezone import now
|
||||||
from django.db import models, transaction
|
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 import generators
|
||||||
from konova.utils.generators import generate_random_string
|
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):
|
class UuidModel(models.Model):
|
||||||
@ -298,27 +294,6 @@ class RecordableObjectMixin(models.Model):
|
|||||||
|
|
||||||
return action
|
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
|
@abstractmethod
|
||||||
def is_ready_for_publish(self) -> bool:
|
def is_ready_for_publish(self) -> bool:
|
||||||
""" Check for all needed publishing-constraints on the data
|
""" Check for all needed publishing-constraints on the data
|
||||||
@ -353,7 +328,7 @@ class CheckableObjectMixin(models.Model):
|
|||||||
abstract = True
|
abstract = True
|
||||||
|
|
||||||
def set_unchecked(self) -> None:
|
def set_unchecked(self) -> None:
|
||||||
""" Perform unrecording
|
""" Perform unchecking
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
|
||||||
@ -363,7 +338,7 @@ class CheckableObjectMixin(models.Model):
|
|||||||
if not self.checked:
|
if not self.checked:
|
||||||
# Nothing to do
|
# Nothing to do
|
||||||
return
|
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!
|
# log history, which is not what we want!
|
||||||
self.checked = None
|
self.checked = None
|
||||||
self.save()
|
self.save()
|
||||||
|
@ -290,7 +290,7 @@ class BaseTestCase(TestCase):
|
|||||||
])
|
])
|
||||||
return codes
|
return codes
|
||||||
|
|
||||||
def create_dummy_team(self):
|
def create_dummy_team(self, name: str = None):
|
||||||
""" Creates a dummy team
|
""" Creates a dummy team
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
@ -299,8 +299,11 @@ class BaseTestCase(TestCase):
|
|||||||
if self.superuser is None:
|
if self.superuser is None:
|
||||||
self.create_users()
|
self.create_users()
|
||||||
|
|
||||||
|
if not name:
|
||||||
|
name = "Testteam"
|
||||||
|
|
||||||
team = Team.objects.get_or_create(
|
team = Team.objects.get_or_create(
|
||||||
name="Testteam",
|
name=name,
|
||||||
description="Testdescription",
|
description="Testdescription",
|
||||||
)[0]
|
)[0]
|
||||||
team.users.add(self.superuser)
|
team.users.add(self.superuser)
|
||||||
|
182
konova/tests/unit/test_models.py
Normal file
182
konova/tests/unit/test_models.py
Normal file
@ -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))
|
@ -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")
|
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.")
|
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.")
|
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.")
|
RECORDED_BLOCKS_EDIT = _("Entry is recorded. To edit data, the entry first needs to be unrecorded.")
|
||||||
|
|
||||||
# SHARE
|
# SHARE
|
||||||
|
Binary file not shown.
@ -29,21 +29,21 @@
|
|||||||
#: konova/filters/mixins/office.py:25 konova/filters/mixins/office.py:56
|
#: 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/office.py:57 konova/filters/mixins/record.py:23
|
||||||
#: konova/filters/mixins/self_created.py:24 konova/filters/mixins/share.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:36
|
||||||
#: konova/forms/modals/document_form.py:50
|
#: konova/forms/modals/document_form.py:50
|
||||||
#: konova/forms/modals/document_form.py:62
|
#: konova/forms/modals/document_form.py:62
|
||||||
#: konova/forms/modals/document_form.py:80
|
#: konova/forms/modals/document_form.py:80
|
||||||
#: konova/forms/modals/remove_form.py:23
|
#: konova/forms/modals/remove_form.py:23
|
||||||
#: konova/forms/modals/resubmission_form.py:22
|
#: konova/forms/modals/resubmission_form.py:22
|
||||||
#: konova/forms/modals/resubmission_form.py:38 konova/forms/remove_form.py:19
|
#: konova/forms/modals/resubmission_form.py:38 konova/forms/remove_form.py:25
|
||||||
#: user/forms/user.py:39
|
#: konova/tests/unit/test_forms.py:59 user/forms/user.py:39
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgid ""
|
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: 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"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
@ -401,6 +401,7 @@ msgid "An explanatory name"
|
|||||||
msgstr "Aussagekräftiger Titel"
|
msgstr "Aussagekräftiger Titel"
|
||||||
|
|
||||||
#: compensation/forms/compensation.py:49 ema/forms.py:51 ema/forms.py:114
|
#: 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"
|
msgid "Compensation XY; Location ABC"
|
||||||
msgstr "Kompensation XY; Flur 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 {} "
|
"{}m² have been deducted from this eco account so far. The given value of {} "
|
||||||
"would be too low."
|
"would be too low."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"{}n² wurden bereits von diesem Ökokonto abgebucht. Der eingegebene Wert von {} "
|
"{}n² wurden bereits von diesem Ökokonto abgebucht. Der eingegebene Wert von "
|
||||||
"wäre daher zu klein."
|
"{} wäre daher zu klein."
|
||||||
|
|
||||||
#: compensation/forms/eco_account.py:249
|
#: compensation/forms/eco_account.py:249
|
||||||
msgid "The account can not be removed, since there are still deductions."
|
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
|
#: ema/templates/ema/detail/includes/controls.html:15
|
||||||
#: intervention/templates/intervention/detail/includes/controls.html:15
|
#: intervention/templates/intervention/detail/includes/controls.html:15
|
||||||
#: konova/forms/modals/resubmission_form.py:51
|
#: 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
|
#: templates/email/resubmission/resubmission.html:4
|
||||||
msgid "Resubmission"
|
msgid "Resubmission"
|
||||||
msgstr "Wiedervorlage"
|
msgstr "Wiedervorlage"
|
||||||
@ -997,7 +999,7 @@ msgstr "Dokumente"
|
|||||||
#: compensation/templates/compensation/detail/eco_account/includes/documents.html:14
|
#: compensation/templates/compensation/detail/eco_account/includes/documents.html:14
|
||||||
#: ema/templates/ema/detail/includes/documents.html:14
|
#: ema/templates/ema/detail/includes/documents.html:14
|
||||||
#: intervention/templates/intervention/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"
|
msgid "Add new document"
|
||||||
msgstr "Neues Dokument hinzufügen"
|
msgstr "Neues Dokument hinzufügen"
|
||||||
|
|
||||||
@ -1013,7 +1015,7 @@ msgstr "Erstellt"
|
|||||||
#: compensation/templates/compensation/detail/eco_account/includes/documents.html:61
|
#: compensation/templates/compensation/detail/eco_account/includes/documents.html:61
|
||||||
#: ema/templates/ema/detail/includes/documents.html:61
|
#: ema/templates/ema/detail/includes/documents.html:61
|
||||||
#: intervention/templates/intervention/detail/includes/documents.html:70
|
#: 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"
|
msgid "Edit document"
|
||||||
msgstr "Dokument bearbeiten"
|
msgstr "Dokument bearbeiten"
|
||||||
|
|
||||||
@ -1187,6 +1189,7 @@ msgstr "weitere Nutzer"
|
|||||||
#: ema/templates/ema/detail/includes/controls.html:18
|
#: ema/templates/ema/detail/includes/controls.html:18
|
||||||
#: intervention/forms/modals/share.py:63
|
#: intervention/forms/modals/share.py:63
|
||||||
#: intervention/templates/intervention/detail/includes/controls.html:18
|
#: intervention/templates/intervention/detail/includes/controls.html:18
|
||||||
|
#: intervention/tests/unit/test_forms.py:150
|
||||||
msgid "Share"
|
msgid "Share"
|
||||||
msgstr "Freigabe"
|
msgstr "Freigabe"
|
||||||
|
|
||||||
@ -1291,14 +1294,14 @@ msgstr "Daten zu den verantwortlichen Stellen"
|
|||||||
msgid "Compensations - Overview"
|
msgid "Compensations - Overview"
|
||||||
msgstr "Kompensationen - Übersicht"
|
msgstr "Kompensationen - Übersicht"
|
||||||
|
|
||||||
#: compensation/views/compensation/compensation.py:182
|
#: compensation/views/compensation/compensation.py:181
|
||||||
#: konova/utils/message_templates.py:40
|
#: konova/utils/message_templates.py:40
|
||||||
msgid "Compensation {} edited"
|
msgid "Compensation {} edited"
|
||||||
msgstr "Kompensation {} bearbeitet"
|
msgstr "Kompensation {} bearbeitet"
|
||||||
|
|
||||||
#: compensation/views/compensation/compensation.py:197
|
#: compensation/views/compensation/compensation.py:196
|
||||||
#: compensation/views/eco_account/eco_account.py:171 ema/views/ema.py:231
|
#: compensation/views/eco_account/eco_account.py:173 ema/views/ema.py:231
|
||||||
#: intervention/views/intervention.py:253
|
#: intervention/views/intervention.py:252
|
||||||
msgid "Edit {}"
|
msgid "Edit {}"
|
||||||
msgstr "Bearbeite {}"
|
msgstr "Bearbeite {}"
|
||||||
|
|
||||||
@ -1316,19 +1319,19 @@ msgstr "Ökokonten - Übersicht"
|
|||||||
msgid "Eco-Account {} added"
|
msgid "Eco-Account {} added"
|
||||||
msgstr "Ökokonto {} hinzugefügt"
|
msgstr "Ökokonto {} hinzugefügt"
|
||||||
|
|
||||||
#: compensation/views/eco_account/eco_account.py:156
|
#: compensation/views/eco_account/eco_account.py:158
|
||||||
msgid "Eco-Account {} edited"
|
msgid "Eco-Account {} edited"
|
||||||
msgstr "Ökokonto {} bearbeitet"
|
msgstr "Ökokonto {} bearbeitet"
|
||||||
|
|
||||||
#: compensation/views/eco_account/eco_account.py:285
|
#: compensation/views/eco_account/eco_account.py:287
|
||||||
msgid "Eco-account removed"
|
msgid "Eco-account removed"
|
||||||
msgstr "Ökokonto entfernt"
|
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"
|
msgid "New EMA"
|
||||||
msgstr "Neue EMA hinzufügen"
|
msgstr "Neue EMA hinzufügen"
|
||||||
|
|
||||||
#: ema/forms.py:108
|
#: ema/forms.py:108 ema/tests/unit/test_forms.py:81
|
||||||
msgid "Edit EMA"
|
msgid "Edit EMA"
|
||||||
msgstr "Bearbeite EMA"
|
msgstr "Bearbeite EMA"
|
||||||
|
|
||||||
@ -1427,7 +1430,7 @@ msgid "Binding on"
|
|||||||
msgstr "Datum Bestandskraft bzw. Rechtskraft"
|
msgstr "Datum Bestandskraft bzw. Rechtskraft"
|
||||||
|
|
||||||
#: intervention/forms/intervention.py:216
|
#: intervention/forms/intervention.py:216
|
||||||
#: intervention/tests/unit/test_forms.py:27
|
#: intervention/tests/unit/test_forms.py:36
|
||||||
#: intervention/views/intervention.py:105
|
#: intervention/views/intervention.py:105
|
||||||
msgid "New intervention"
|
msgid "New intervention"
|
||||||
msgstr "Neuer Eingriff"
|
msgstr "Neuer Eingriff"
|
||||||
@ -1450,6 +1453,7 @@ msgid "Run check"
|
|||||||
msgstr "Prüfung vornehmen"
|
msgstr "Prüfung vornehmen"
|
||||||
|
|
||||||
#: intervention/forms/modals/check.py:36 konova/forms/modals/record_form.py:30
|
#: intervention/forms/modals/check.py:36 konova/forms/modals/record_form.py:30
|
||||||
|
#: konova/tests/unit/test_forms.py:155
|
||||||
msgid ""
|
msgid ""
|
||||||
"I, {} {}, confirm that all necessary control steps have been performed by "
|
"I, {} {}, confirm that all necessary control steps have been performed by "
|
||||||
"myself."
|
"myself."
|
||||||
@ -1512,6 +1516,7 @@ msgstr "Muss kleiner als 15 Mb sein"
|
|||||||
|
|
||||||
#: intervention/forms/modals/revocation.py:62
|
#: intervention/forms/modals/revocation.py:62
|
||||||
#: intervention/templates/intervention/detail/includes/revocation.html:18
|
#: intervention/templates/intervention/detail/includes/revocation.html:18
|
||||||
|
#: intervention/tests/unit/test_forms.py:234
|
||||||
msgid "Add revocation"
|
msgid "Add revocation"
|
||||||
msgstr "Widerspruch hinzufügen"
|
msgstr "Widerspruch hinzufügen"
|
||||||
|
|
||||||
@ -1553,6 +1558,7 @@ msgstr ""
|
|||||||
"noch nicht freigegeben wurde. Geben Sie den ganzen Nutzernamen an."
|
"noch nicht freigegeben wurde. Geben Sie den ganzen Nutzernamen an."
|
||||||
|
|
||||||
#: intervention/forms/modals/share.py:64
|
#: intervention/forms/modals/share.py:64
|
||||||
|
#: intervention/tests/unit/test_forms.py:151
|
||||||
msgid "Share settings for {}"
|
msgid "Share settings for {}"
|
||||||
msgstr "Freigabe Einstellungen für {}"
|
msgstr "Freigabe Einstellungen für {}"
|
||||||
|
|
||||||
@ -1668,11 +1674,11 @@ msgstr "Eingriffe - Übersicht"
|
|||||||
msgid "Intervention {} added"
|
msgid "Intervention {} added"
|
||||||
msgstr "Eingriff {} hinzugefügt"
|
msgstr "Eingriff {} hinzugefügt"
|
||||||
|
|
||||||
#: intervention/views/intervention.py:236
|
#: intervention/views/intervention.py:235
|
||||||
msgid "Intervention {} edited"
|
msgid "Intervention {} edited"
|
||||||
msgstr "Eingriff {} bearbeitet"
|
msgstr "Eingriff {} bearbeitet"
|
||||||
|
|
||||||
#: intervention/views/intervention.py:278
|
#: intervention/views/intervention.py:277
|
||||||
msgid "{} removed"
|
msgid "{} removed"
|
||||||
msgstr "{} entfernt"
|
msgstr "{} entfernt"
|
||||||
|
|
||||||
@ -1790,12 +1796,12 @@ msgstr "Speichern"
|
|||||||
msgid "Not editable"
|
msgid "Not editable"
|
||||||
msgstr "Nicht editierbar"
|
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
|
#: konova/utils/quality.py:46 templates/form/collapsable/form.html:45
|
||||||
msgid "Geometry"
|
msgid "Geometry"
|
||||||
msgstr "Geometrie"
|
msgstr "Geometrie"
|
||||||
|
|
||||||
#: konova/forms/geometry_form.py:101
|
#: konova/forms/geometry_form.py:100
|
||||||
msgid "Only surfaces allowed. Points or lines must be buffered."
|
msgid "Only surfaces allowed. Points or lines must be buffered."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Nur Flächen erlaubt. Punkte oder Linien müssen zu Flächen gepuffert werden."
|
"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."
|
msgid "Allowed formats: pdf, jpg, png. Max size 15 MB."
|
||||||
msgstr "Formate: pdf, jpg, png. Maximal 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"
|
msgid "Added document"
|
||||||
msgstr "Dokument hinzugefügt"
|
msgstr "Dokument hinzugefügt"
|
||||||
|
|
||||||
@ -1821,32 +1827,34 @@ msgstr "Dokument hinzugefügt"
|
|||||||
msgid "Confirm record"
|
msgid "Confirm record"
|
||||||
msgstr "Verzeichnen bestätigen"
|
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"
|
msgid "Record data"
|
||||||
msgstr "Daten verzeichnen"
|
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"
|
msgid "Confirm unrecord"
|
||||||
msgstr "Entzeichnen bestätigen"
|
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"
|
msgid "Unrecord data"
|
||||||
msgstr "Daten entzeichnen"
|
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."
|
msgid "I, {} {}, confirm that this data must be unrecorded."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Ich, {} {}, bestätige, dass diese Daten wieder entzeichnet werden müssen."
|
"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"
|
msgid "Confirm"
|
||||||
msgstr "Bestätige"
|
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"
|
msgid "Remove"
|
||||||
msgstr "Löschen"
|
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?"
|
msgid "Are you sure?"
|
||||||
msgstr "Sind Sie sicher?"
|
msgstr "Sind Sie sicher?"
|
||||||
|
|
||||||
@ -1855,6 +1863,7 @@ msgid "When do you want to be reminded?"
|
|||||||
msgstr "Wann wollen Sie erinnert werden?"
|
msgstr "Wann wollen Sie erinnert werden?"
|
||||||
|
|
||||||
#: konova/forms/modals/resubmission_form.py:52
|
#: 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."
|
msgid "Set your resubmission for this entry."
|
||||||
msgstr "Setzen Sie eine Wiedervorlage für diesen Eintrag."
|
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"
|
msgid "The date should be in the future"
|
||||||
msgstr "Das Datum sollte in der Zukunft liegen"
|
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 {} {}"
|
msgid "You are about to remove {} {}"
|
||||||
msgstr "Sie sind dabei {} {} zu löschen"
|
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!"
|
msgstr "Hierfür müssen Sie einer anderen Nutzergruppe angehören!"
|
||||||
|
|
||||||
#: konova/utils/message_templates.py:21
|
#: konova/utils/message_templates.py:21
|
||||||
msgid "Status of Checked and Recorded reseted"
|
msgid "Status of Checked reset"
|
||||||
msgstr "'Geprüft'/'Verzeichnet' wurde zurückgesetzt"
|
msgstr "Status 'Geprüft' wurde zurückgesetzt"
|
||||||
|
|
||||||
#: konova/utils/message_templates.py:22
|
#: konova/utils/message_templates.py:22
|
||||||
msgid ""
|
msgid ""
|
||||||
|
Loading…
Reference in New Issue
Block a user