Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • konstantin/akplanning
  • matedealer/akplanning
  • kif/akplanning
  • mirco/akplanning
  • lordofthevoid/akplanning
  • voidptr/akplanning
  • xayomer/akplanning-fork
  • mollux/akplanning
  • neumantm/akplanning
  • mmarx/akplanning
  • nerf/akplanning
  • felix_bonn/akplanning
  • sebastian.uschmann/akplanning
13 results
Show changes
Commits on Source (35)
Showing with 862 additions and 267 deletions
image: python:3.9 image: python:3.10
services: services:
- mysql - mysql
......
...@@ -151,9 +151,12 @@ class Availability(models.Model): ...@@ -151,9 +151,12 @@ class Availability(models.Model):
if not other.overlaps(self, strict=False): if not other.overlaps(self, strict=False):
raise Exception('Only overlapping Availabilities can be merged.') raise Exception('Only overlapping Availabilities can be merged.')
return Availability( avail = Availability(
start=min(self.start, other.start), end=max(self.end, other.end) start=min(self.start, other.start), end=max(self.end, other.end)
) )
if self.event == other.event:
avail.event = self.event
return avail
def __or__(self, other: 'Availability') -> 'Availability': def __or__(self, other: 'Availability') -> 'Availability':
"""Performs the merge operation: ``availability1 | availability2``""" """Performs the merge operation: ``availability1 | availability2``"""
...@@ -168,9 +171,12 @@ class Availability(models.Model): ...@@ -168,9 +171,12 @@ class Availability(models.Model):
if not other.overlaps(self, False): if not other.overlaps(self, False):
raise Exception('Only overlapping Availabilities can be intersected.') raise Exception('Only overlapping Availabilities can be intersected.')
return Availability( avail = Availability(
start=max(self.start, other.start), end=min(self.end, other.end) start=max(self.start, other.start), end=min(self.end, other.end)
) )
if self.event == other.event:
avail.event = self.event
return avail
def __and__(self, other: 'Availability') -> 'Availability': def __and__(self, other: 'Availability') -> 'Availability':
"""Performs the intersect operation: ``availability1 & """Performs the intersect operation: ``availability1 &
...@@ -247,7 +253,14 @@ class Availability(models.Model): ...@@ -247,7 +253,14 @@ class Availability(models.Model):
f'{self.end.astimezone(self.event.timezone).strftime("%a %H:%M")}') f'{self.end.astimezone(self.event.timezone).strftime("%a %H:%M")}')
@classmethod @classmethod
def with_event_length(cls, event, person=None, room=None, ak=None, ak_category=None): def with_event_length(
cls,
event: Event,
person: AKOwner | None = None,
room: Room | None = None,
ak: AK | None = None,
ak_category: AKCategory | None = None,
) -> "Availability":
""" """
Create an availability covering exactly the time between event start and event end. Create an availability covering exactly the time between event start and event end.
Can e.g., be used to create default availabilities. Can e.g., be used to create default availabilities.
...@@ -267,6 +280,21 @@ class Availability(models.Model): ...@@ -267,6 +280,21 @@ class Availability(models.Model):
return Availability(start=timeframe_start, end=timeframe_end, event=event, person=person, return Availability(start=timeframe_start, end=timeframe_end, event=event, person=person,
room=room, ak=ak, ak_category=ak_category) room=room, ak=ak, ak_category=ak_category)
@classmethod
def is_event_covered(cls, event: Event, availabilities: List['Availability']) -> bool:
"""Check if list of availibilities cover whole event.
:param event: event to check.
:param availabilities: availabilities to check.
:return: whether the availabilities cover full event.
:rtype: bool
"""
# NOTE: Cannot use `Availability.with_event_length` as its end is the
# event end + 1 day
full_event = Availability(event=event, start=event.start, end=event.end)
avail_union = Availability.union(availabilities)
return any(avail.contains(full_event) for avail in avail_union)
class Meta: class Meta:
verbose_name = _('Availability') verbose_name = _('Availability')
verbose_name_plural = _('Availabilities') verbose_name_plural = _('Availabilities')
......
...@@ -272,3 +272,13 @@ class RoomFormWithAvailabilities(AvailabilitiesFormMixin, RoomForm): ...@@ -272,3 +272,13 @@ class RoomFormWithAvailabilities(AvailabilitiesFormMixin, RoomForm):
# Filter possible values for m2m when event is specified # Filter possible values for m2m when event is specified
if hasattr(self.instance, "event") and self.instance.event is not None: if hasattr(self.instance, "event") and self.instance.event is not None:
self.fields["properties"].queryset = AKRequirement.objects.filter(event=self.instance.event) self.fields["properties"].queryset = AKRequirement.objects.filter(event=self.instance.event)
class JSONScheduleImportForm(AdminIntermediateForm):
"""Form to import an AK schedule from a json file."""
json_data = forms.CharField(
required=True,
widget=forms.Textarea,
label=_("JSON data"),
help_text=_("JSON data from the scheduling solver"),
)
...@@ -2,7 +2,7 @@ msgid "" ...@@ -2,7 +2,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-04-25 01:29+0200\n" "POT-Creation-Date: 2024-05-31 14:22+0000\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"
...@@ -25,18 +25,17 @@ msgstr "Status" ...@@ -25,18 +25,17 @@ msgstr "Status"
msgid "Toggle plan visibility" msgid "Toggle plan visibility"
msgstr "Plansichtbarkeit ändern" msgstr "Plansichtbarkeit ändern"
#: AKModel/admin.py:110 AKModel/admin.py:121 AKModel/views/manage.py:138 #: AKModel/admin.py:110 AKModel/admin.py:121 AKModel/views/manage.py:140
msgid "Publish plan" msgid "Publish plan"
msgstr "Plan veröffentlichen" msgstr "Plan veröffentlichen"
#: AKModel/admin.py:113 AKModel/admin.py:129 AKModel/views/manage.py:151 #: AKModel/admin.py:113 AKModel/admin.py:129 AKModel/views/manage.py:153
msgid "Unpublish plan" msgid "Unpublish plan"
msgstr "Plan verbergen" msgstr "Plan verbergen"
#: AKModel/admin.py:168 AKModel/models.py:360 AKModel/models.py:682 #: AKModel/admin.py:168 AKModel/models.py:612 AKModel/models.py:1028
#: AKModel/templates/admin/AKModel/aks_by_user.html:12
#: AKModel/templates/admin/AKModel/status/event_aks.html:10 #: AKModel/templates/admin/AKModel/status/event_aks.html:10
#: AKModel/views/manage.py:73 AKModel/views/status.py:98 #: AKModel/views/manage.py:75 AKModel/views/status.py:97
msgid "AKs" msgid "AKs"
msgstr "AKs" msgstr "AKs"
...@@ -60,11 +59,11 @@ msgstr "In Wiki-Syntax exportieren" ...@@ -60,11 +59,11 @@ msgstr "In Wiki-Syntax exportieren"
msgid "Cannot export AKs from more than one event at the same time." msgid "Cannot export AKs from more than one event at the same time."
msgstr "Kann nicht AKs von mehreren Events zur selben Zeit exportieren." msgstr "Kann nicht AKs von mehreren Events zur selben Zeit exportieren."
#: AKModel/admin.py:320 AKModel/views/ak.py:99 #: AKModel/admin.py:320 AKModel/views/ak.py:226
msgid "Reset interest in AKs" msgid "Reset interest in AKs"
msgstr "Interesse an AKs zurücksetzen" msgstr "Interesse an AKs zurücksetzen"
#: AKModel/admin.py:330 AKModel/views/ak.py:114 #: AKModel/admin.py:330 AKModel/views/ak.py:241
msgid "Reset AKs' interest counters" msgid "Reset AKs' interest counters"
msgstr "Interessenszähler der AKs zurücksetzen" msgstr "Interessenszähler der AKs zurücksetzen"
...@@ -72,19 +71,19 @@ msgstr "Interessenszähler der AKs zurücksetzen" ...@@ -72,19 +71,19 @@ msgstr "Interessenszähler der AKs zurücksetzen"
msgid "AK Details" msgid "AK Details"
msgstr "AK-Details" msgstr "AK-Details"
#: AKModel/admin.py:505 AKModel/views/manage.py:99 #: AKModel/admin.py:505 AKModel/views/manage.py:101
msgid "Mark Constraint Violations as manually resolved" msgid "Mark Constraint Violations as manually resolved"
msgstr "Markiere Constraintverletzungen als manuell behoben" msgstr "Markiere Constraintverletzungen als manuell behoben"
#: AKModel/admin.py:514 AKModel/views/manage.py:112 #: AKModel/admin.py:514 AKModel/views/manage.py:114
msgid "Set Constraint Violations to level \"violation\"" msgid "Set Constraint Violations to level \"violation\""
msgstr "Constraintverletzungen auf Level \"Violation\" setzen" msgstr "Constraintverletzungen auf Level \"Violation\" setzen"
#: AKModel/admin.py:523 AKModel/views/manage.py:125 #: AKModel/admin.py:523 AKModel/views/manage.py:127
msgid "Set Constraint Violations to level \"warning\"" msgid "Set Constraint Violations to level \"warning\""
msgstr "Constraintverletzungen auf Level \"Warning\" setzen" msgstr "Constraintverletzungen auf Level \"Warning\" setzen"
#: AKModel/availability/forms.py:25 AKModel/availability/models.py:271 #: AKModel/availability/forms.py:25 AKModel/availability/models.py:299
msgid "Availability" msgid "Availability"
msgstr "Verfügbarkeit" msgstr "Verfügbarkeit"
...@@ -109,17 +108,17 @@ msgstr "Die eingegebene Verfügbarkeit enthält ein ungültiges Datum." ...@@ -109,17 +108,17 @@ msgstr "Die eingegebene Verfügbarkeit enthält ein ungültiges Datum."
msgid "Please fill in your availabilities!" msgid "Please fill in your availabilities!"
msgstr "Bitte Verfügbarkeiten eintragen!" msgstr "Bitte Verfügbarkeiten eintragen!"
#: AKModel/availability/models.py:43 AKModel/models.py:60 AKModel/models.py:174 #: AKModel/availability/models.py:43 AKModel/models.py:91 AKModel/models.py:412
#: AKModel/models.py:251 AKModel/models.py:270 AKModel/models.py:296 #: AKModel/models.py:489 AKModel/models.py:522 AKModel/models.py:548
#: AKModel/models.py:350 AKModel/models.py:492 AKModel/models.py:531 #: AKModel/models.py:602 AKModel/models.py:744 AKModel/models.py:820
#: AKModel/models.py:621 AKModel/models.py:678 AKModel/models.py:869 #: AKModel/models.py:967 AKModel/models.py:1024 AKModel/models.py:1215
msgid "Event" msgid "Event"
msgstr "Event" msgstr "Event"
#: AKModel/availability/models.py:44 AKModel/models.py:175 #: AKModel/availability/models.py:44 AKModel/models.py:413
#: AKModel/models.py:252 AKModel/models.py:271 AKModel/models.py:297 #: AKModel/models.py:490 AKModel/models.py:523 AKModel/models.py:549
#: AKModel/models.py:351 AKModel/models.py:493 AKModel/models.py:532 #: AKModel/models.py:603 AKModel/models.py:745 AKModel/models.py:821
#: AKModel/models.py:622 AKModel/models.py:679 AKModel/models.py:870 #: AKModel/models.py:968 AKModel/models.py:1025 AKModel/models.py:1216
msgid "Associated event" msgid "Associated event"
msgstr "Zugehöriges Event" msgstr "Zugehöriges Event"
...@@ -131,8 +130,8 @@ msgstr "Person" ...@@ -131,8 +130,8 @@ msgstr "Person"
msgid "Person whose availability this is" msgid "Person whose availability this is"
msgstr "Person deren Verfügbarkeit hier abgebildet wird" msgstr "Person deren Verfügbarkeit hier abgebildet wird"
#: AKModel/availability/models.py:61 AKModel/models.py:496 #: AKModel/availability/models.py:61 AKModel/models.py:748
#: AKModel/models.py:521 AKModel/models.py:688 #: AKModel/models.py:810 AKModel/models.py:1034
msgid "Room" msgid "Room"
msgstr "Raum" msgstr "Raum"
...@@ -140,8 +139,8 @@ msgstr "Raum" ...@@ -140,8 +139,8 @@ msgstr "Raum"
msgid "Room whose availability this is" msgid "Room whose availability this is"
msgstr "Raum dessen Verfügbarkeit hier abgebildet wird" msgstr "Raum dessen Verfügbarkeit hier abgebildet wird"
#: AKModel/availability/models.py:70 AKModel/models.py:359 #: AKModel/availability/models.py:70 AKModel/models.py:611
#: AKModel/models.py:520 AKModel/models.py:616 #: AKModel/models.py:809 AKModel/models.py:962
msgid "AK" msgid "AK"
msgstr "AK" msgstr "AK"
...@@ -149,8 +148,8 @@ msgstr "AK" ...@@ -149,8 +148,8 @@ msgstr "AK"
msgid "AK whose availability this is" msgid "AK whose availability this is"
msgstr "Verfügbarkeiten" msgstr "Verfügbarkeiten"
#: AKModel/availability/models.py:79 AKModel/models.py:255 #: AKModel/availability/models.py:79 AKModel/models.py:493
#: AKModel/models.py:694 #: AKModel/models.py:1040
msgid "AK Category" msgid "AK Category"
msgstr "AK-Kategorie" msgstr "AK-Kategorie"
...@@ -158,7 +157,7 @@ msgstr "AK-Kategorie" ...@@ -158,7 +157,7 @@ msgstr "AK-Kategorie"
msgid "AK Category whose availability this is" msgid "AK Category whose availability this is"
msgstr "AK-Kategorie, deren Verfügbarkeit hier abgebildet wird" msgstr "AK-Kategorie, deren Verfügbarkeit hier abgebildet wird"
#: AKModel/availability/models.py:272 #: AKModel/availability/models.py:300
msgid "Availabilities" msgid "Availabilities"
msgstr "Verfügbarkeiten" msgstr "Verfügbarkeiten"
...@@ -220,7 +219,7 @@ msgstr "" ...@@ -220,7 +219,7 @@ msgstr ""
"fürWünsche markieren, z.B. um während der Präsentation auf einem Touchscreen " "fürWünsche markieren, z.B. um während der Präsentation auf einem Touchscreen "
"ausgefüllt zu werden?" "ausgefüllt zu werden?"
#: AKModel/forms.py:189 AKModel/models.py:863 #: AKModel/forms.py:189 AKModel/models.py:1209
msgid "Default Slots" msgid "Default Slots"
msgstr "Standardslots" msgstr "Standardslots"
...@@ -259,7 +258,15 @@ msgstr "Standardverfügbarkeiten für alle Räume anlegen?" ...@@ -259,7 +258,15 @@ msgstr "Standardverfügbarkeiten für alle Räume anlegen?"
msgid "CSV must contain a name column" msgid "CSV must contain a name column"
msgstr "CSV muss eine name-Spalte enthalten" msgstr "CSV muss eine name-Spalte enthalten"
#: AKModel/metaviews/admin.py:156 AKModel/models.py:29 #: AKModel/forms.py:282
msgid "JSON data"
msgstr "JSON-Daten"
#: AKModel/forms.py:283
msgid "JSON data from the scheduling solver"
msgstr "JSON-Daten, die der scheduling-solver produziert hat"
#: AKModel/metaviews/admin.py:156 AKModel/models.py:60
msgid "Start" msgid "Start"
msgstr "Start" msgstr "Start"
...@@ -284,66 +291,66 @@ msgstr "Aktivieren?" ...@@ -284,66 +291,66 @@ msgstr "Aktivieren?"
msgid "Finish" msgid "Finish"
msgstr "Abschluss" msgstr "Abschluss"
#: AKModel/models.py:20 AKModel/models.py:243 AKModel/models.py:267 #: AKModel/models.py:51 AKModel/models.py:481 AKModel/models.py:519
#: AKModel/models.py:294 AKModel/models.py:312 AKModel/models.py:484 #: AKModel/models.py:546 AKModel/models.py:564 AKModel/models.py:736
msgid "Name" msgid "Name"
msgstr "Name" msgstr "Name"
#: AKModel/models.py:21 #: AKModel/models.py:52
msgid "Name or iteration of the event" msgid "Name or iteration of the event"
msgstr "Name oder Iteration des Events" msgstr "Name oder Iteration des Events"
#: AKModel/models.py:22 #: AKModel/models.py:53
msgid "Short Form" msgid "Short Form"
msgstr "Kurzer Name" msgstr "Kurzer Name"
#: AKModel/models.py:23 #: AKModel/models.py:54
msgid "Short name of letters/numbers/dots/dashes/underscores used in URLs." msgid "Short name of letters/numbers/dots/dashes/underscores used in URLs."
msgstr "" msgstr ""
"Kurzname bestehend aus Buchstaben, Nummern, Punkten und Unterstrichen zur " "Kurzname bestehend aus Buchstaben, Nummern, Punkten und Unterstrichen zur "
"Nutzung in URLs" "Nutzung in URLs"
#: AKModel/models.py:25 #: AKModel/models.py:56
msgid "Place" msgid "Place"
msgstr "Ort" msgstr "Ort"
#: AKModel/models.py:26 #: AKModel/models.py:57
msgid "City etc. the event takes place in" msgid "City etc. the event takes place in"
msgstr "Stadt o.ä. in der das Event stattfindet" msgstr "Stadt o.ä. in der das Event stattfindet"
#: AKModel/models.py:28 #: AKModel/models.py:59
msgid "Time Zone" msgid "Time Zone"
msgstr "Zeitzone" msgstr "Zeitzone"
#: AKModel/models.py:28 #: AKModel/models.py:59
msgid "Time Zone where this event takes place in" msgid "Time Zone where this event takes place in"
msgstr "Zeitzone in der das Event stattfindet" msgstr "Zeitzone in der das Event stattfindet"
#: AKModel/models.py:29 #: AKModel/models.py:60
msgid "Time the event begins" msgid "Time the event begins"
msgstr "Zeit zu der das Event beginnt" msgstr "Zeit zu der das Event beginnt"
#: AKModel/models.py:30 #: AKModel/models.py:61
msgid "End" msgid "End"
msgstr "Ende" msgstr "Ende"
#: AKModel/models.py:30 #: AKModel/models.py:61
msgid "Time the event ends" msgid "Time the event ends"
msgstr "Zeit zu der das Event endet" msgstr "Zeit zu der das Event endet"
#: AKModel/models.py:31 #: AKModel/models.py:62
msgid "Resolution Deadline" msgid "Resolution Deadline"
msgstr "Resolutionsdeadline" msgstr "Resolutionsdeadline"
#: AKModel/models.py:32 #: AKModel/models.py:63
msgid "When should AKs with intention to submit a resolution be done?" msgid "When should AKs with intention to submit a resolution be done?"
msgstr "Wann sollen AKs mit Resolutionsabsicht stattgefunden haben?" msgstr "Wann sollen AKs mit Resolutionsabsicht stattgefunden haben?"
#: AKModel/models.py:34 #: AKModel/models.py:65
msgid "Interest Window Start" msgid "Interest Window Start"
msgstr "Beginn Interessensbekundung" msgstr "Beginn Interessensbekundung"
#: AKModel/models.py:36 #: AKModel/models.py:67
msgid "" msgid ""
"Opening time for expression of interest. When left blank, no interest " "Opening time for expression of interest. When left blank, no interest "
"indication will be possible." "indication will be possible."
...@@ -351,71 +358,71 @@ msgstr "" ...@@ -351,71 +358,71 @@ msgstr ""
"Öffnungszeitpunkt für die Angabe von Interesse an AKs.Wenn das Feld leer " "Öffnungszeitpunkt für die Angabe von Interesse an AKs.Wenn das Feld leer "
"bleibt, wird keine Abgabe von Interesse möglich sein." "bleibt, wird keine Abgabe von Interesse möglich sein."
#: AKModel/models.py:38 #: AKModel/models.py:69
msgid "Interest Window End" msgid "Interest Window End"
msgstr "Ende Interessensbekundung" msgstr "Ende Interessensbekundung"
#: AKModel/models.py:39 #: AKModel/models.py:70
msgid "Closing time for expression of interest." msgid "Closing time for expression of interest."
msgstr "Öffnungszeitpunkt für die Angabe von Interesse an AKs." msgstr "Öffnungszeitpunkt für die Angabe von Interesse an AKs."
#: AKModel/models.py:41 #: AKModel/models.py:72
msgid "Public event" msgid "Public event"
msgstr "Öffentliches Event" msgstr "Öffentliches Event"
#: AKModel/models.py:42 #: AKModel/models.py:73
msgid "Show this event on overview page." msgid "Show this event on overview page."
msgstr "Zeige dieses Event auf der Übersichtseite an" msgstr "Zeige dieses Event auf der Übersichtseite an"
#: AKModel/models.py:44 #: AKModel/models.py:75
msgid "Active State" msgid "Active State"
msgstr "Aktiver Status" msgstr "Aktiver Status"
#: AKModel/models.py:44 #: AKModel/models.py:75
msgid "Marks currently active events" msgid "Marks currently active events"
msgstr "Markiert aktuell aktive Events" msgstr "Markiert aktuell aktive Events"
#: AKModel/models.py:45 #: AKModel/models.py:76
msgid "Plan Hidden" msgid "Plan Hidden"
msgstr "Plan verborgen" msgstr "Plan verborgen"
#: AKModel/models.py:45 #: AKModel/models.py:76
msgid "Hides plan for non-staff users" msgid "Hides plan for non-staff users"
msgstr "Verbirgt den Plan für Nutzer*innen ohne erweiterte Rechte" msgstr "Verbirgt den Plan für Nutzer*innen ohne erweiterte Rechte"
#: AKModel/models.py:47 #: AKModel/models.py:78
msgid "Plan published at" msgid "Plan published at"
msgstr "Plan veröffentlicht am/um" msgstr "Plan veröffentlicht am/um"
#: AKModel/models.py:48 #: AKModel/models.py:79
msgid "Timestamp at which the plan was published" msgid "Timestamp at which the plan was published"
msgstr "Zeitpunkt, zu dem der Plan veröffentlicht wurde" msgstr "Zeitpunkt, zu dem der Plan veröffentlicht wurde"
#: AKModel/models.py:50 #: AKModel/models.py:81
msgid "Base URL" msgid "Base URL"
msgstr "URL-Prefix" msgstr "URL-Prefix"
#: AKModel/models.py:50 #: AKModel/models.py:81
msgid "Prefix for wiki link construction" msgid "Prefix for wiki link construction"
msgstr "Prefix für die automatische Generierung von Wiki-Links" msgstr "Prefix für die automatische Generierung von Wiki-Links"
#: AKModel/models.py:51 #: AKModel/models.py:82
msgid "Wiki Export Template Name" msgid "Wiki Export Template Name"
msgstr "Wiki-Export Templatename" msgstr "Wiki-Export Templatename"
#: AKModel/models.py:52 #: AKModel/models.py:83
msgid "Default Slot Length" msgid "Default Slot Length"
msgstr "Standardslotlänge" msgstr "Standardslotlänge"
#: AKModel/models.py:53 #: AKModel/models.py:84
msgid "Default length in hours that is assumed for AKs in this event." msgid "Default length in hours that is assumed for AKs in this event."
msgstr "Standardlänge von Slots (in Stunden) für dieses Event" msgstr "Standardlänge von Slots (in Stunden) für dieses Event"
#: AKModel/models.py:55 #: AKModel/models.py:86
msgid "Contact email address" msgid "Contact email address"
msgstr "E-Mail Kontaktadresse" msgstr "E-Mail Kontaktadresse"
#: AKModel/models.py:56 #: AKModel/models.py:87
msgid "" msgid ""
"An email address that is displayed on every page and can be used for all " "An email address that is displayed on every page and can be used for all "
"kinds of questions" "kinds of questions"
...@@ -423,75 +430,75 @@ msgstr "" ...@@ -423,75 +430,75 @@ msgstr ""
"Eine Mailadresse die auf jeder Seite angezeigt wird und für alle Arten von " "Eine Mailadresse die auf jeder Seite angezeigt wird und für alle Arten von "
"Fragen genutzt werden kann" "Fragen genutzt werden kann"
#: AKModel/models.py:61 #: AKModel/models.py:92
msgid "Events" msgid "Events"
msgstr "Events" msgstr "Events"
#: AKModel/models.py:169 #: AKModel/models.py:407
msgid "Nickname" msgid "Nickname"
msgstr "Spitzname" msgstr "Spitzname"
#: AKModel/models.py:169 #: AKModel/models.py:407
msgid "Name to identify an AK owner by" msgid "Name to identify an AK owner by"
msgstr "Name, durch den eine AK-Leitung identifiziert wird" msgstr "Name, durch den eine AK-Leitung identifiziert wird"
#: AKModel/models.py:170 #: AKModel/models.py:408
msgid "Slug" msgid "Slug"
msgstr "Slug" msgstr "Slug"
#: AKModel/models.py:170 #: AKModel/models.py:408
msgid "Slug for URL generation" msgid "Slug for URL generation"
msgstr "Slug für URL-Generierung" msgstr "Slug für URL-Generierung"
#: AKModel/models.py:171 #: AKModel/models.py:409
msgid "Institution" msgid "Institution"
msgstr "Instutution" msgstr "Instutution"
#: AKModel/models.py:171 #: AKModel/models.py:409
msgid "Uni etc." msgid "Uni etc."
msgstr "Universität o.ä." msgstr "Universität o.ä."
#: AKModel/models.py:172 AKModel/models.py:321 #: AKModel/models.py:410 AKModel/models.py:573
msgid "Web Link" msgid "Web Link"
msgstr "Internet Link" msgstr "Internet Link"
#: AKModel/models.py:172 #: AKModel/models.py:410
msgid "Link to Homepage" msgid "Link to Homepage"
msgstr "Link zu Homepage oder Webseite" msgstr "Link zu Homepage oder Webseite"
#: AKModel/models.py:178 AKModel/models.py:687 #: AKModel/models.py:416 AKModel/models.py:1033
msgid "AK Owner" msgid "AK Owner"
msgstr "AK-Leitung" msgstr "AK-Leitung"
#: AKModel/models.py:179 #: AKModel/models.py:417
msgid "AK Owners" msgid "AK Owners"
msgstr "AK-Leitungen" msgstr "AK-Leitungen"
#: AKModel/models.py:243 #: AKModel/models.py:481
msgid "Name of the AK Category" msgid "Name of the AK Category"
msgstr "Name der AK-Kategorie" msgstr "Name der AK-Kategorie"
#: AKModel/models.py:244 AKModel/models.py:268 #: AKModel/models.py:482 AKModel/models.py:520
msgid "Color" msgid "Color"
msgstr "Farbe" msgstr "Farbe"
#: AKModel/models.py:244 AKModel/models.py:268 #: AKModel/models.py:482 AKModel/models.py:520
msgid "Color for displaying" msgid "Color for displaying"
msgstr "Farbe für die Anzeige" msgstr "Farbe für die Anzeige"
#: AKModel/models.py:245 AKModel/models.py:315 #: AKModel/models.py:483 AKModel/models.py:567
msgid "Description" msgid "Description"
msgstr "Beschreibung" msgstr "Beschreibung"
#: AKModel/models.py:246 #: AKModel/models.py:484
msgid "Short description of this AK Category" msgid "Short description of this AK Category"
msgstr "Beschreibung der AK-Kategorie" msgstr "Beschreibung der AK-Kategorie"
#: AKModel/models.py:247 #: AKModel/models.py:485
msgid "Present by default" msgid "Present by default"
msgstr "Defaultmäßig präsentieren" msgstr "Defaultmäßig präsentieren"
#: AKModel/models.py:248 #: AKModel/models.py:486
msgid "" msgid ""
"Present AKs of this category by default if AK owner did not specify whether " "Present AKs of this category by default if AK owner did not specify whether "
"this AK should be presented?" "this AK should be presented?"
...@@ -499,132 +506,132 @@ msgstr "" ...@@ -499,132 +506,132 @@ msgstr ""
"AKs dieser Kategorie standardmäßig vorstellen, wenn die Leitungen das für " "AKs dieser Kategorie standardmäßig vorstellen, wenn die Leitungen das für "
"ihren AK nicht explizit spezifiziert haben?" "ihren AK nicht explizit spezifiziert haben?"
#: AKModel/models.py:256 #: AKModel/models.py:494
msgid "AK Categories" msgid "AK Categories"
msgstr "AK-Kategorien" msgstr "AK-Kategorien"
#: AKModel/models.py:267 #: AKModel/models.py:519
msgid "Name of the AK Track" msgid "Name of the AK Track"
msgstr "Name des AK-Tracks" msgstr "Name des AK-Tracks"
#: AKModel/models.py:274 #: AKModel/models.py:526
msgid "AK Track" msgid "AK Track"
msgstr "AK-Track" msgstr "AK-Track"
#: AKModel/models.py:275 #: AKModel/models.py:527
msgid "AK Tracks" msgid "AK Tracks"
msgstr "AK-Tracks" msgstr "AK-Tracks"
#: AKModel/models.py:294 #: AKModel/models.py:546
msgid "Name of the Requirement" msgid "Name of the Requirement"
msgstr "Name der Anforderung" msgstr "Name der Anforderung"
#: AKModel/models.py:300 AKModel/models.py:691 #: AKModel/models.py:552 AKModel/models.py:1037
msgid "AK Requirement" msgid "AK Requirement"
msgstr "AK-Anforderung" msgstr "AK-Anforderung"
#: AKModel/models.py:301 #: AKModel/models.py:553
msgid "AK Requirements" msgid "AK Requirements"
msgstr "AK-Anforderungen" msgstr "AK-Anforderungen"
#: AKModel/models.py:312 #: AKModel/models.py:564
msgid "Name of the AK" msgid "Name of the AK"
msgstr "Name des AKs" msgstr "Name des AKs"
#: AKModel/models.py:313 #: AKModel/models.py:565
msgid "Short Name" msgid "Short Name"
msgstr "Kurzer Name" msgstr "Kurzer Name"
#: AKModel/models.py:314 #: AKModel/models.py:566
msgid "Name displayed in the schedule" msgid "Name displayed in the schedule"
msgstr "Name zur Anzeige im AK-Plan" msgstr "Name zur Anzeige im AK-Plan"
#: AKModel/models.py:315 #: AKModel/models.py:567
msgid "Description of the AK" msgid "Description of the AK"
msgstr "Beschreibung des AKs" msgstr "Beschreibung des AKs"
#: AKModel/models.py:317 #: AKModel/models.py:569
msgid "Owners" msgid "Owners"
msgstr "Leitungen" msgstr "Leitungen"
#: AKModel/models.py:318 #: AKModel/models.py:570
msgid "Those organizing the AK" msgid "Those organizing the AK"
msgstr "Menschen, die den AK organisieren und halten" msgstr "Menschen, die den AK organisieren und halten"
#: AKModel/models.py:321 #: AKModel/models.py:573
msgid "Link to wiki page" msgid "Link to wiki page"
msgstr "Link zur Wiki Seite" msgstr "Link zur Wiki Seite"
#: AKModel/models.py:322 #: AKModel/models.py:574
msgid "Protocol Link" msgid "Protocol Link"
msgstr "Protokolllink" msgstr "Protokolllink"
#: AKModel/models.py:322 #: AKModel/models.py:574
msgid "Link to protocol" msgid "Link to protocol"
msgstr "Link zum Protokoll" msgstr "Link zum Protokoll"
#: AKModel/models.py:324 #: AKModel/models.py:576
msgid "Category" msgid "Category"
msgstr "Kategorie" msgstr "Kategorie"
#: AKModel/models.py:325 #: AKModel/models.py:577
msgid "Category of the AK" msgid "Category of the AK"
msgstr "Kategorie des AKs" msgstr "Kategorie des AKs"
#: AKModel/models.py:326 #: AKModel/models.py:578
msgid "Track" msgid "Track"
msgstr "Track" msgstr "Track"
#: AKModel/models.py:327 #: AKModel/models.py:579
msgid "Track the AK belongs to" msgid "Track the AK belongs to"
msgstr "Track zu dem der AK gehört" msgstr "Track zu dem der AK gehört"
#: AKModel/models.py:329 #: AKModel/models.py:581
msgid "Resolution Intention" msgid "Resolution Intention"
msgstr "Resolutionsabsicht" msgstr "Resolutionsabsicht"
#: AKModel/models.py:330 #: AKModel/models.py:582
msgid "Intends to submit a resolution" msgid "Intends to submit a resolution"
msgstr "Beabsichtigt eine Resolution einzureichen" msgstr "Beabsichtigt eine Resolution einzureichen"
#: AKModel/models.py:331 #: AKModel/models.py:583
msgid "Present this AK" msgid "Present this AK"
msgstr "AK präsentieren" msgstr "AK präsentieren"
#: AKModel/models.py:332 #: AKModel/models.py:584
msgid "Present results of this AK" msgid "Present results of this AK"
msgstr "Die Ergebnisse dieses AKs vorstellen" msgstr "Die Ergebnisse dieses AKs vorstellen"
#: AKModel/models.py:334 AKModel/views/status.py:163 #: AKModel/models.py:586 AKModel/views/status.py:170
msgid "Requirements" msgid "Requirements"
msgstr "Anforderungen" msgstr "Anforderungen"
#: AKModel/models.py:335 #: AKModel/models.py:587
msgid "AK's Requirements" msgid "AK's Requirements"
msgstr "Anforderungen des AKs" msgstr "Anforderungen des AKs"
#: AKModel/models.py:337 #: AKModel/models.py:589
msgid "Conflicting AKs" msgid "Conflicting AKs"
msgstr "AK-Konflikte" msgstr "AK-Konflikte"
#: AKModel/models.py:338 #: AKModel/models.py:590
msgid "AKs that conflict and thus must not take place at the same time" msgid "AKs that conflict and thus must not take place at the same time"
msgstr "" msgstr ""
"AKs, die Konflikte haben und deshalb nicht gleichzeitig stattfinden dürfen" "AKs, die Konflikte haben und deshalb nicht gleichzeitig stattfinden dürfen"
#: AKModel/models.py:339 #: AKModel/models.py:591
msgid "Prerequisite AKs" msgid "Prerequisite AKs"
msgstr "Vorausgesetzte AKs" msgstr "Vorausgesetzte AKs"
#: AKModel/models.py:340 #: AKModel/models.py:592
msgid "AKs that should precede this AK in the schedule" msgid "AKs that should precede this AK in the schedule"
msgstr "AKs die im AK-Plan vor diesem AK stattfinden müssen" msgstr "AKs die im AK-Plan vor diesem AK stattfinden müssen"
#: AKModel/models.py:342 #: AKModel/models.py:594
msgid "Organizational Notes" msgid "Organizational Notes"
msgstr "Notizen zur Organisation" msgstr "Notizen zur Organisation"
#: AKModel/models.py:343 #: AKModel/models.py:595
msgid "" msgid ""
"Notes to organizers. These are public. For private notes, please use the " "Notes to organizers. These are public. For private notes, please use the "
"button for private messages on the detail page of this AK (after creation/" "button for private messages on the detail page of this AK (after creation/"
...@@ -634,289 +641,291 @@ msgstr "" ...@@ -634,289 +641,291 @@ msgstr ""
"Anmerkungen bitte den Button für Direktnachrichten verwenden (nach dem " "Anmerkungen bitte den Button für Direktnachrichten verwenden (nach dem "
"Anlegen/Bearbeiten)." "Anlegen/Bearbeiten)."
#: AKModel/models.py:346 #: AKModel/models.py:598
msgid "Interest" msgid "Interest"
msgstr "Interesse" msgstr "Interesse"
#: AKModel/models.py:346 #: AKModel/models.py:598
msgid "Expected number of people" msgid "Expected number of people"
msgstr "Erwartete Personenzahl" msgstr "Erwartete Personenzahl"
#: AKModel/models.py:347 #: AKModel/models.py:599
msgid "Interest Counter" msgid "Interest Counter"
msgstr "Interessenszähler" msgstr "Interessenszähler"
#: AKModel/models.py:348 #: AKModel/models.py:600
msgid "People who have indicated interest online" msgid "People who have indicated interest online"
msgstr "Anzahl Personen, die online Interesse bekundet haben" msgstr "Anzahl Personen, die online Interesse bekundet haben"
#: AKModel/models.py:353 #: AKModel/models.py:605
msgid "Export?" msgid "Export?"
msgstr "Export?" msgstr "Export?"
#: AKModel/models.py:354 #: AKModel/models.py:606
msgid "Include AK in wiki export?" msgid "Include AK in wiki export?"
msgstr "AK bei Wiki-Export berücksichtigen?" msgstr "AK bei Wiki-Export berücksichtigen?"
#: AKModel/models.py:484 #: AKModel/models.py:736
msgid "Name or number of the room" msgid "Name or number of the room"
msgstr "Name oder Nummer des Raums" msgstr "Name oder Nummer des Raums"
#: AKModel/models.py:485 #: AKModel/models.py:737
msgid "Location" msgid "Location"
msgstr "Ort" msgstr "Ort"
#: AKModel/models.py:486 #: AKModel/models.py:738
msgid "Name or number of the location" msgid "Name or number of the location"
msgstr "Name oder Nummer des Ortes" msgstr "Name oder Nummer des Ortes"
#: AKModel/models.py:487 #: AKModel/models.py:739
msgid "Capacity" msgid "Capacity"
msgstr "Kapazität" msgstr "Kapazität"
#: AKModel/models.py:488 #: AKModel/models.py:740
msgid "Maximum number of people (-1 for unlimited)." msgid "Maximum number of people (-1 for unlimited)."
msgstr "Maximale Personenzahl (-1 wenn unbeschränkt)." msgstr "Maximale Personenzahl (-1 wenn unbeschränkt)."
#: AKModel/models.py:489 #: AKModel/models.py:741
msgid "Properties" msgid "Properties"
msgstr "Eigenschaften" msgstr "Eigenschaften"
#: AKModel/models.py:490 #: AKModel/models.py:742
msgid "AK requirements fulfilled by the room" msgid "AK requirements fulfilled by the room"
msgstr "AK-Anforderungen, die dieser Raum erfüllt" msgstr "AK-Anforderungen, die dieser Raum erfüllt"
#: AKModel/models.py:497 AKModel/views/status.py:60 #: AKModel/models.py:749 AKModel/views/status.py:59
msgid "Rooms" msgid "Rooms"
msgstr "Räume" msgstr "Räume"
#: AKModel/models.py:520 #: AKModel/models.py:809
msgid "AK being mapped" msgid "AK being mapped"
msgstr "AK, der zugeordnet wird" msgstr "AK, der zugeordnet wird"
#: AKModel/models.py:522 #: AKModel/models.py:811
msgid "Room the AK will take place in" msgid "Room the AK will take place in"
msgstr "Raum in dem der AK stattfindet" msgstr "Raum in dem der AK stattfindet"
#: AKModel/models.py:523 AKModel/models.py:866 #: AKModel/models.py:812 AKModel/models.py:1212
msgid "Slot Begin" msgid "Slot Begin"
msgstr "Beginn des Slots" msgstr "Beginn des Slots"
#: AKModel/models.py:523 AKModel/models.py:866 #: AKModel/models.py:812 AKModel/models.py:1212
msgid "Time and date the slot begins" msgid "Time and date the slot begins"
msgstr "Zeit und Datum zu der der AK beginnt" msgstr "Zeit und Datum zu der der AK beginnt"
#: AKModel/models.py:525 #: AKModel/models.py:814
msgid "Duration" msgid "Duration"
msgstr "Dauer" msgstr "Dauer"
#: AKModel/models.py:526 #: AKModel/models.py:815
msgid "Length in hours" msgid "Length in hours"
msgstr "Länge in Stunden" msgstr "Länge in Stunden"
#: AKModel/models.py:528 #: AKModel/models.py:817
msgid "Scheduling fixed" msgid "Scheduling fixed"
msgstr "Planung fix" msgstr "Planung fix"
#: AKModel/models.py:529 #: AKModel/models.py:818
msgid "Length and time of this AK should not be changed" msgid "Length and time of this AK should not be changed"
msgstr "Dauer und Zeit dieses AKs sollten nicht verändert werden" msgstr "Dauer und Zeit dieses AKs sollten nicht verändert werden"
#: AKModel/models.py:534 #: AKModel/models.py:823
msgid "Last update" msgid "Last update"
msgstr "Letzte Aktualisierung" msgstr "Letzte Aktualisierung"
#: AKModel/models.py:537 #: AKModel/models.py:826
msgid "AK Slot" msgid "AK Slot"
msgstr "AK-Slot" msgstr "AK-Slot"
#: AKModel/models.py:538 AKModel/models.py:684 #: AKModel/models.py:827 AKModel/models.py:1030
msgid "AK Slots" msgid "AK Slots"
msgstr "AK-Slot" msgstr "AK-Slot"
#: AKModel/models.py:560 AKModel/models.py:569 #: AKModel/models.py:849 AKModel/models.py:858
msgid "Not scheduled yet" msgid "Not scheduled yet"
msgstr "Noch nicht geplant" msgstr "Noch nicht geplant"
#: AKModel/models.py:617 #: AKModel/models.py:963
msgid "AK this message belongs to" msgid "AK this message belongs to"
msgstr "AK zu dem die Nachricht gehört" msgstr "AK zu dem die Nachricht gehört"
#: AKModel/models.py:618 #: AKModel/models.py:964
msgid "Message text" msgid "Message text"
msgstr "Nachrichtentext" msgstr "Nachrichtentext"
#: AKModel/models.py:619 #: AKModel/models.py:965
msgid "Message to the organizers. This is not publicly visible." msgid "Message to the organizers. This is not publicly visible."
msgstr "" msgstr ""
"Nachricht an die Organisator*innen. Diese ist nicht öffentlich sichtbar." "Nachricht an die Organisator*innen. Diese ist nicht öffentlich sichtbar."
#: AKModel/models.py:623 #: AKModel/models.py:969
msgid "Resolved" msgid "Resolved"
msgstr "Erledigt" msgstr "Erledigt"
#: AKModel/models.py:624 #: AKModel/models.py:970
msgid "This message has been resolved (no further action needed)" msgid "This message has been resolved (no further action needed)"
msgstr "Diese Nachricht wurde vollständig bearbeitet (keine weiteren Aktionen notwendig)" msgstr ""
"Diese Nachricht wurde vollständig bearbeitet (keine weiteren Aktionen "
"notwendig)"
#: AKModel/models.py:627 #: AKModel/models.py:973
msgid "AK Orga Message" msgid "AK Orga Message"
msgstr "AK-Organachricht" msgstr "AK-Organachricht"
#: AKModel/models.py:628 #: AKModel/models.py:974
msgid "AK Orga Messages" msgid "AK Orga Messages"
msgstr "AK-Organachrichten" msgstr "AK-Organachrichten"
#: AKModel/models.py:645 #: AKModel/models.py:991
msgid "Constraint Violation" msgid "Constraint Violation"
msgstr "Constraintverletzung" msgstr "Constraintverletzung"
#: AKModel/models.py:646 #: AKModel/models.py:992
msgid "Constraint Violations" msgid "Constraint Violations"
msgstr "Constraintverletzungen" msgstr "Constraintverletzungen"
#: AKModel/models.py:653 #: AKModel/models.py:999
msgid "Owner has two parallel slots" msgid "Owner has two parallel slots"
msgstr "Leitung hat zwei Slots parallel" msgstr "Leitung hat zwei Slots parallel"
#: AKModel/models.py:654 #: AKModel/models.py:1000
msgid "AK Slot was scheduled outside the AK's availabilities" msgid "AK Slot was scheduled outside the AK's availabilities"
msgstr "AK Slot wurde außerhalb der Verfügbarkeit des AKs platziert" msgstr "AK Slot wurde außerhalb der Verfügbarkeit des AKs platziert"
#: AKModel/models.py:655 #: AKModel/models.py:1001
msgid "Room has two AK slots scheduled at the same time" msgid "Room has two AK slots scheduled at the same time"
msgstr "Raum hat zwei AK Slots gleichzeitig" msgstr "Raum hat zwei AK Slots gleichzeitig"
#: AKModel/models.py:656 #: AKModel/models.py:1002
msgid "Room does not satisfy the requirement of the scheduled AK" msgid "Room does not satisfy the requirement of the scheduled AK"
msgstr "Room erfüllt die Anforderungen des platzierten AKs nicht" msgstr "Room erfüllt die Anforderungen des platzierten AKs nicht"
#: AKModel/models.py:657 #: AKModel/models.py:1003
msgid "AK Slot is scheduled at the same time as an AK listed as a conflict" msgid "AK Slot is scheduled at the same time as an AK listed as a conflict"
msgstr "" msgstr ""
"AK Slot wurde wurde zur gleichen Zeit wie ein Konflikt des AKs platziert" "AK Slot wurde wurde zur gleichen Zeit wie ein Konflikt des AKs platziert"
#: AKModel/models.py:658 #: AKModel/models.py:1004
msgid "AK Slot is scheduled before an AK listed as a prerequisite" msgid "AK Slot is scheduled before an AK listed as a prerequisite"
msgstr "AK Slot wurde vor einem als Voraussetzung gelisteten AK platziert" msgstr "AK Slot wurde vor einem als Voraussetzung gelisteten AK platziert"
#: AKModel/models.py:660 #: AKModel/models.py:1006
msgid "" msgid ""
"AK Slot for AK with intention to submit a resolution is scheduled after " "AK Slot for AK with intention to submit a resolution is scheduled after "
"resolution deadline" "resolution deadline"
msgstr "" msgstr ""
"AK Slot eines AKs mit Resoabsicht wurde nach der Resodeadline platziert" "AK Slot eines AKs mit Resoabsicht wurde nach der Resodeadline platziert"
#: AKModel/models.py:661 #: AKModel/models.py:1007
msgid "AK Slot in a category is outside that categories availabilities" msgid "AK Slot in a category is outside that categories availabilities"
msgstr "AK Slot wurde außerhalb der Verfügbarkeiten seiner Kategorie" msgstr "AK Slot wurde außerhalb der Verfügbarkeiten seiner Kategorie"
#: AKModel/models.py:662 #: AKModel/models.py:1008
msgid "Two AK Slots for the same AK scheduled at the same time" msgid "Two AK Slots for the same AK scheduled at the same time"
msgstr "Zwei AK Slots eines AKs wurden zur selben Zeit platziert" msgstr "Zwei AK Slots eines AKs wurden zur selben Zeit platziert"
#: AKModel/models.py:663 #: AKModel/models.py:1009
msgid "Room does not have enough space for interest in scheduled AK Slot" msgid "Room does not have enough space for interest in scheduled AK Slot"
msgstr "Room hat nicht genug Platz für das Interesse am geplanten AK-Slot" msgstr "Room hat nicht genug Platz für das Interesse am geplanten AK-Slot"
#: AKModel/models.py:664 #: AKModel/models.py:1010
msgid "AK Slot is scheduled outside the event's availabilities" msgid "AK Slot is scheduled outside the event's availabilities"
msgstr "AK Slot wurde außerhalb der Verfügbarkeit des Events platziert" msgstr "AK Slot wurde außerhalb der Verfügbarkeit des Events platziert"
#: AKModel/models.py:670 #: AKModel/models.py:1016
msgid "Warning" msgid "Warning"
msgstr "Warnung" msgstr "Warnung"
#: AKModel/models.py:671 #: AKModel/models.py:1017
msgid "Violation" msgid "Violation"
msgstr "Verletzung" msgstr "Verletzung"
#: AKModel/models.py:673 #: AKModel/models.py:1019
msgid "Type" msgid "Type"
msgstr "Art" msgstr "Art"
#: AKModel/models.py:674 #: AKModel/models.py:1020
msgid "Type of violation, i.e. what kind of constraint was violated" msgid "Type of violation, i.e. what kind of constraint was violated"
msgstr "Art der Verletzung, gibt an welche Art Constraint verletzt wurde" msgstr "Art der Verletzung, gibt an welche Art Constraint verletzt wurde"
#: AKModel/models.py:675 #: AKModel/models.py:1021
msgid "Level" msgid "Level"
msgstr "Level" msgstr "Level"
#: AKModel/models.py:676 #: AKModel/models.py:1022
msgid "Severity level of the violation" msgid "Severity level of the violation"
msgstr "Schweregrad der Verletzung" msgstr "Schweregrad der Verletzung"
#: AKModel/models.py:683 #: AKModel/models.py:1029
msgid "AK(s) belonging to this constraint" msgid "AK(s) belonging to this constraint"
msgstr "AK(s), die zu diesem Constraint gehören" msgstr "AK(s), die zu diesem Constraint gehören"
#: AKModel/models.py:685 #: AKModel/models.py:1031
msgid "AK Slot(s) belonging to this constraint" msgid "AK Slot(s) belonging to this constraint"
msgstr "AK Slot(s), die zu diesem Constraint gehören" msgstr "AK Slot(s), die zu diesem Constraint gehören"
#: AKModel/models.py:687 #: AKModel/models.py:1033
msgid "AK Owner belonging to this constraint" msgid "AK Owner belonging to this constraint"
msgstr "AK Leitung(en), die zu diesem Constraint gehören" msgstr "AK Leitung(en), die zu diesem Constraint gehören"
#: AKModel/models.py:689 #: AKModel/models.py:1035
msgid "Room belonging to this constraint" msgid "Room belonging to this constraint"
msgstr "Raum, der zu diesem Constraint gehört" msgstr "Raum, der zu diesem Constraint gehört"
#: AKModel/models.py:692 #: AKModel/models.py:1038
msgid "AK Requirement belonging to this constraint" msgid "AK Requirement belonging to this constraint"
msgstr "AK Anforderung, die zu diesem Constraint gehört" msgstr "AK Anforderung, die zu diesem Constraint gehört"
#: AKModel/models.py:694 #: AKModel/models.py:1040
msgid "AK Category belonging to this constraint" msgid "AK Category belonging to this constraint"
msgstr "AK Kategorie, di zu diesem Constraint gehört" msgstr "AK Kategorie, di zu diesem Constraint gehört"
#: AKModel/models.py:696 #: AKModel/models.py:1042
msgid "Comment" msgid "Comment"
msgstr "Kommentar" msgstr "Kommentar"
#: AKModel/models.py:696 #: AKModel/models.py:1042
msgid "Comment or further details for this violation" msgid "Comment or further details for this violation"
msgstr "Kommentar oder weitere Details zu dieser Vereletzung" msgstr "Kommentar oder weitere Details zu dieser Vereletzung"
#: AKModel/models.py:699 #: AKModel/models.py:1045
msgid "Timestamp" msgid "Timestamp"
msgstr "Timestamp" msgstr "Timestamp"
#: AKModel/models.py:699 #: AKModel/models.py:1045
msgid "Time of creation" msgid "Time of creation"
msgstr "Zeitpunkt der ERstellung" msgstr "Zeitpunkt der ERstellung"
#: AKModel/models.py:700 #: AKModel/models.py:1046
msgid "Manually Resolved" msgid "Manually Resolved"
msgstr "Manuell behoben" msgstr "Manuell behoben"
#: AKModel/models.py:701 #: AKModel/models.py:1047
msgid "Mark this violation manually as resolved" msgid "Mark this violation manually as resolved"
msgstr "Markiere diese Verletzung manuell als behoben" msgstr "Markiere diese Verletzung manuell als behoben"
#: AKModel/models.py:728 AKModel/templates/admin/AKModel/aks_by_user.html:22 #: AKModel/models.py:1074
#: AKModel/templates/admin/AKModel/requirements_overview.html:27 #: AKModel/templates/admin/AKModel/requirements_overview.html:27
msgid "Details" msgid "Details"
msgstr "Details" msgstr "Details"
#: AKModel/models.py:862 #: AKModel/models.py:1208
msgid "Default Slot" msgid "Default Slot"
msgstr "Standardslot" msgstr "Standardslot"
#: AKModel/models.py:867 #: AKModel/models.py:1213
msgid "Slot End" msgid "Slot End"
msgstr "Ende des Slots" msgstr "Ende des Slots"
#: AKModel/models.py:867 #: AKModel/models.py:1213
msgid "Time and date the slot ends" msgid "Time and date the slot ends"
msgstr "Zeit und Datum zu der der Slot endet" msgstr "Zeit und Datum zu der der Slot endet"
#: AKModel/models.py:872 #: AKModel/models.py:1218
msgid "Primary categories" msgid "Primary categories"
msgstr "Primäre Kategorien" msgstr "Primäre Kategorien"
#: AKModel/models.py:873 #: AKModel/models.py:1219
msgid "Categories that should be assigned to this slot primarily" msgid "Categories that should be assigned to this slot primarily"
msgstr "Kategorieren, die diesem Slot primär zugewiesen werden sollen" msgstr "Kategorieren, die diesem Slot primär zugewiesen werden sollen"
...@@ -953,19 +962,6 @@ msgstr "Bestätigen" ...@@ -953,19 +962,6 @@ msgstr "Bestätigen"
msgid "Cancel" msgid "Cancel"
msgstr "Abbrechen" msgstr "Abbrechen"
#: AKModel/templates/admin/AKModel/aks_by_user.html:8
msgid "AKs by Owner"
msgstr "AKs der Leitung"
#: AKModel/templates/admin/AKModel/aks_by_user.html:26
#: AKModel/templates/admin/AKModel/requirements_overview.html:31
msgid "Edit"
msgstr "Bearbeiten"
#: AKModel/templates/admin/AKModel/aks_by_user.html:33
msgid "This user does not have any AKs currently"
msgstr "Diese Leitung hat aktuell keine AKs"
#: AKModel/templates/admin/AKModel/event_wizard/activate.html:9 #: AKModel/templates/admin/AKModel/event_wizard/activate.html:9
#: AKModel/templates/admin/AKModel/event_wizard/created_prepare_import.html:9 #: AKModel/templates/admin/AKModel/event_wizard/created_prepare_import.html:9
#: AKModel/templates/admin/AKModel/event_wizard/finish.html:9 #: AKModel/templates/admin/AKModel/event_wizard/finish.html:9
...@@ -1032,12 +1028,16 @@ msgstr "" ...@@ -1032,12 +1028,16 @@ msgstr ""
msgid "Requirements Overview" msgid "Requirements Overview"
msgstr "Übersicht Anforderungen" msgstr "Übersicht Anforderungen"
#: AKModel/templates/admin/AKModel/requirements_overview.html:31
msgid "Edit"
msgstr "Bearbeiten"
#: AKModel/templates/admin/AKModel/requirements_overview.html:38 #: AKModel/templates/admin/AKModel/requirements_overview.html:38
msgid "No AKs with this requirement" msgid "No AKs with this requirement"
msgstr "Kein AK mit dieser Anforderung" msgstr "Kein AK mit dieser Anforderung"
#: AKModel/templates/admin/AKModel/requirements_overview.html:45 #: AKModel/templates/admin/AKModel/requirements_overview.html:45
#: AKModel/views/status.py:179 #: AKModel/views/status.py:186
msgid "Add Requirement" msgid "Add Requirement"
msgstr "Anforderung hinzufügen" msgstr "Anforderung hinzufügen"
...@@ -1090,7 +1090,7 @@ msgstr "Bisher keine Räume" ...@@ -1090,7 +1090,7 @@ msgstr "Bisher keine Räume"
msgid "Active Events" msgid "Active Events"
msgstr "Aktive Events" msgstr "Aktive Events"
#: AKModel/templates/admin/ak_index.html:16 AKModel/views/status.py:109 #: AKModel/templates/admin/ak_index.html:16 AKModel/views/status.py:108
msgid "Scheduling" msgid "Scheduling"
msgstr "Scheduling" msgstr "Scheduling"
...@@ -1123,43 +1123,47 @@ msgstr "Login" ...@@ -1123,43 +1123,47 @@ msgstr "Login"
msgid "Register" msgid "Register"
msgstr "Registrieren" msgstr "Registrieren"
#: AKModel/views/ak.py:17 #: AKModel/views/ak.py:21
msgid "Requirements for Event" msgid "Requirements for Event"
msgstr "Anforderungen für das Event" msgstr "Anforderungen für das Event"
#: AKModel/views/ak.py:34 #: AKModel/views/ak.py:38
msgid "AK CSV Export" msgid "AK CSV Export"
msgstr "AK-CSV-Export" msgstr "AK-CSV-Export"
#: AKModel/views/ak.py:48 #: AKModel/views/ak.py:51
msgid "AK JSON Export"
msgstr "AK-JSON-Export"
#: AKModel/views/ak.py:175
msgid "AK Wiki Export" msgid "AK Wiki Export"
msgstr "AK-Wiki-Export" msgstr "AK-Wiki-Export"
#: AKModel/views/ak.py:59 AKModel/views/manage.py:53 #: AKModel/views/ak.py:186 AKModel/views/manage.py:55
msgid "Wishes" msgid "Wishes"
msgstr "Wünsche" msgstr "Wünsche"
#: AKModel/views/ak.py:71 #: AKModel/views/ak.py:198
msgid "Delete AK Orga Messages" msgid "Delete AK Orga Messages"
msgstr "AK-Organachrichten löschen" msgstr "AK-Organachrichten löschen"
#: AKModel/views/ak.py:89 #: AKModel/views/ak.py:216
msgid "AK Orga Messages successfully deleted" msgid "AK Orga Messages successfully deleted"
msgstr "AK-Organachrichten erfolgreich gelöscht" msgstr "AK-Organachrichten erfolgreich gelöscht"
#: AKModel/views/ak.py:101 #: AKModel/views/ak.py:228
msgid "Interest of the following AKs will be set to not filled (-1):" msgid "Interest of the following AKs will be set to not filled (-1):"
msgstr "Interesse an den folgenden AKs wird auf nicht ausgefüllt (-1) gesetzt:" msgstr "Interesse an den folgenden AKs wird auf nicht ausgefüllt (-1) gesetzt:"
#: AKModel/views/ak.py:102 #: AKModel/views/ak.py:229
msgid "Reset of interest in AKs successful." msgid "Reset of interest in AKs successful."
msgstr "Interesse an AKs erfolgreich zurückgesetzt." msgstr "Interesse an AKs erfolgreich zurückgesetzt."
#: AKModel/views/ak.py:116 #: AKModel/views/ak.py:243
msgid "Interest counter of the following AKs will be set to 0:" msgid "Interest counter of the following AKs will be set to 0:"
msgstr "Interessensbekundungszähler der folgenden AKs wird auf 0 gesetzt:" msgstr "Interessensbekundungszähler der folgenden AKs wird auf 0 gesetzt:"
#: AKModel/views/ak.py:117 #: AKModel/views/ak.py:244
msgid "AKs' interest counters set back to 0." msgid "AKs' interest counters set back to 0."
msgstr "Interessenszähler der AKs zurückgesetzt" msgstr "Interessenszähler der AKs zurückgesetzt"
...@@ -1173,96 +1177,100 @@ msgstr "'%(obj)s' kopiert" ...@@ -1173,96 +1177,100 @@ msgstr "'%(obj)s' kopiert"
msgid "Could not copy '%(obj)s' (%(error)s)" msgid "Could not copy '%(obj)s' (%(error)s)"
msgstr "'%(obj)s' konnte nicht kopiert werden (%(error)s)" msgstr "'%(obj)s' konnte nicht kopiert werden (%(error)s)"
#: AKModel/views/manage.py:35 AKModel/views/status.py:146 #: AKModel/views/manage.py:37 AKModel/views/status.py:153
msgid "Export AK Slides" msgid "Export AK Slides"
msgstr "AK-Folien exportieren" msgstr "AK-Folien exportieren"
#: AKModel/views/manage.py:48 #: AKModel/views/manage.py:50
msgid "Symbols" msgid "Symbols"
msgstr "Symbole" msgstr "Symbole"
#: AKModel/views/manage.py:49 #: AKModel/views/manage.py:51
msgid "Who?" msgid "Who?"
msgstr "Wer?" msgstr "Wer?"
#: AKModel/views/manage.py:50 #: AKModel/views/manage.py:52
msgid "Duration(s)" msgid "Duration(s)"
msgstr "Dauer(n)" msgstr "Dauer(n)"
#: AKModel/views/manage.py:51 #: AKModel/views/manage.py:53
msgid "Reso intention?" msgid "Reso intention?"
msgstr "Resolutionsabsicht?" msgstr "Resolutionsabsicht?"
#: AKModel/views/manage.py:52 #: AKModel/views/manage.py:54
msgid "Category (for Wishes)" msgid "Category (for Wishes)"
msgstr "Kategorie (für Wünsche)" msgstr "Kategorie (für Wünsche)"
#: AKModel/views/manage.py:101 #: AKModel/views/manage.py:103
msgid "The following Constraint Violations will be marked as manually resolved" msgid "The following Constraint Violations will be marked as manually resolved"
msgstr "" msgstr ""
"Die folgenden Constraintverletzungen werden als manuell behoben markiert." "Die folgenden Constraintverletzungen werden als manuell behoben markiert."
#: AKModel/views/manage.py:102 #: AKModel/views/manage.py:104
msgid "Constraint Violations marked as resolved" msgid "Constraint Violations marked as resolved"
msgstr "Constraintverletzungen als manuell behoben markiert" msgstr "Constraintverletzungen als manuell behoben markiert"
#: AKModel/views/manage.py:114 #: AKModel/views/manage.py:116
msgid "The following Constraint Violations will be set to level 'violation'" msgid "The following Constraint Violations will be set to level 'violation'"
msgstr "" msgstr ""
"Die folgenden Constraintverletzungen werden auf das Level \"Violation\" " "Die folgenden Constraintverletzungen werden auf das Level \"Violation\" "
"gesetzt." "gesetzt."
#: AKModel/views/manage.py:115 #: AKModel/views/manage.py:117
msgid "Constraint Violations set to level 'violation'" msgid "Constraint Violations set to level 'violation'"
msgstr "Constraintverletzungen auf Level \"Violation\" gesetzt" msgstr "Constraintverletzungen auf Level \"Violation\" gesetzt"
#: AKModel/views/manage.py:127 #: AKModel/views/manage.py:129
msgid "The following Constraint Violations will be set to level 'warning'" msgid "The following Constraint Violations will be set to level 'warning'"
msgstr "" msgstr ""
"Die folgenden Constraintverletzungen werden auf das Level 'warning' gesetzt." "Die folgenden Constraintverletzungen werden auf das Level 'warning' gesetzt."
#: AKModel/views/manage.py:128 #: AKModel/views/manage.py:130
msgid "Constraint Violations set to level 'warning'" msgid "Constraint Violations set to level 'warning'"
msgstr "Constraintverletzungen auf Level \"Warning\" gesetzt" msgstr "Constraintverletzungen auf Level \"Warning\" gesetzt"
#: AKModel/views/manage.py:140 #: AKModel/views/manage.py:142
msgid "Publish the plan(s) of:" msgid "Publish the plan(s) of:"
msgstr "Den Plan/die Pläne veröffentlichen von:" msgstr "Den Plan/die Pläne veröffentlichen von:"
#: AKModel/views/manage.py:141 #: AKModel/views/manage.py:143
msgid "Plan published" msgid "Plan published"
msgstr "Plan veröffentlicht" msgstr "Plan veröffentlicht"
#: AKModel/views/manage.py:153 #: AKModel/views/manage.py:155
msgid "Unpublish the plan(s) of:" msgid "Unpublish the plan(s) of:"
msgstr "Den Plan/die Pläne verbergen von:" msgstr "Den Plan/die Pläne verbergen von:"
#: AKModel/views/manage.py:154 #: AKModel/views/manage.py:156
msgid "Plan unpublished" msgid "Plan unpublished"
msgstr "Plan verborgen" msgstr "Plan verborgen"
#: AKModel/views/manage.py:166 AKModel/views/status.py:130 #: AKModel/views/manage.py:168 AKModel/views/status.py:129
msgid "Edit Default Slots" msgid "Edit Default Slots"
msgstr "Standardslots bearbeiten" msgstr "Standardslots bearbeiten"
#: AKModel/views/manage.py:204 #: AKModel/views/manage.py:206
#, python-brace-format #, python-brace-format
msgid "Could not update slot {id} since it does not belong to {event}" msgid "Could not update slot {id} since it does not belong to {event}"
msgstr "" msgstr ""
"Konnte Slot {id} nicht bearbeiten, da er nicht zum Event {event} gehört" "Konnte Slot {id} nicht bearbeiten, da er nicht zum Event {event} gehört"
#: AKModel/views/manage.py:235 #: AKModel/views/manage.py:237
#, python-brace-format #, python-brace-format
msgid "Updated {u} slot(s). created {c} new slot(s) and deleted {d} slot(s)" msgid "Updated {u} slot(s). created {c} new slot(s) and deleted {d} slot(s)"
msgstr "" msgstr ""
"{u} Slot(s) aktualisiert, {c} Slot(s) hinzugefügt und {d} Slot(s) gelöscht" "{u} Slot(s) aktualisiert, {c} Slot(s) hinzugefügt und {d} Slot(s) gelöscht"
#: AKModel/views/manage.py:257
msgid "AK Schedule JSON Import"
msgstr "AK-Plan JSON-Import"
#: AKModel/views/room.py:37 #: AKModel/views/room.py:37
#, python-format #, python-format
msgid "Created Room '%(room)s'" msgid "Created Room '%(room)s'"
msgstr "Raum '%(room)s' angelegt" msgstr "Raum '%(room)s' angelegt"
#: AKModel/views/room.py:51 AKModel/views/status.py:82 #: AKModel/views/room.py:51 AKModel/views/status.py:81
msgid "Import Rooms from CSV" msgid "Import Rooms from CSV"
msgstr "Räume aus CSV importieren" msgstr "Räume aus CSV importieren"
...@@ -1280,50 +1288,64 @@ msgstr "{count} Raum/Räume importiert" ...@@ -1280,50 +1288,64 @@ msgstr "{count} Raum/Räume importiert"
msgid "No rooms imported" msgid "No rooms imported"
msgstr "Keine Räume importiert" msgstr "Keine Räume importiert"
#: AKModel/views/status.py:17 #: AKModel/views/status.py:16
msgid "Overview" msgid "Overview"
msgstr "Überblick" msgstr "Überblick"
#: AKModel/views/status.py:33 #: AKModel/views/status.py:32
msgid "Categories" msgid "Categories"
msgstr "Kategorien" msgstr "Kategorien"
#: AKModel/views/status.py:37 #: AKModel/views/status.py:36
msgid "Add category" msgid "Add category"
msgstr "Kategorie hinzufügen" msgstr "Kategorie hinzufügen"
#: AKModel/views/status.py:64 #: AKModel/views/status.py:63
msgid "Add Room" msgid "Add Room"
msgstr "Raum hinzufügen" msgstr "Raum hinzufügen"
#: AKModel/views/status.py:116 #: AKModel/views/status.py:115
msgid "AKs requiring special attention" msgid "AKs requiring special attention"
msgstr "AKs, die besondere Aufmerksamkeit benötigen" msgstr "AKs, die besondere Aufmerksamkeit benötigen"
#: AKModel/views/status.py:122 #: AKModel/views/status.py:121
msgid "Enter Interest" msgid "Enter Interest"
msgstr "Interesse erfassen" msgstr "Interesse erfassen"
#: AKModel/views/status.py:134 #: AKModel/views/status.py:133
msgid "Manage ak tracks" msgid "Manage ak tracks"
msgstr "AK-Tracks verwalten" msgstr "AK-Tracks verwalten"
#: AKModel/views/status.py:138 #: AKModel/views/status.py:137
msgid "Import AK schedule from JSON"
msgstr "AK-Plan aus JSON importieren"
#: AKModel/views/status.py:141
msgid "Export AKs as CSV" msgid "Export AKs as CSV"
msgstr "AKs als CSV exportieren" msgstr "AKs als CSV exportieren"
#: AKModel/views/status.py:142 #: AKModel/views/status.py:145
msgid "Export AKs as JSON"
msgstr "AKs als JSON exportieren"
#: AKModel/views/status.py:149
msgid "Export AKs for Wiki" msgid "Export AKs for Wiki"
msgstr "AKs im Wiki-Format exportieren" msgstr "AKs im Wiki-Format exportieren"
#: AKModel/views/status.py:175 #: AKModel/views/status.py:182
msgid "Show AKs for requirements" msgid "Show AKs for requirements"
msgstr "Zu Anforderungen gehörige AKs anzeigen" msgstr "Zu Anforderungen gehörige AKs anzeigen"
#: AKModel/views/status.py:189 #: AKModel/views/status.py:196
msgid "Event Status" msgid "Event Status"
msgstr "Eventstatus" msgstr "Eventstatus"
#~ msgid "AKs by Owner"
#~ msgstr "AKs der Leitung"
#~ msgid "This user does not have any AKs currently"
#~ msgstr "Diese Leitung hat aktuell keine AKs"
#~ msgid "Opening time for expression of interest." #~ msgid "Opening time for expression of interest."
#~ msgstr "Öffnungszeitpunkt für die Angabe von Interesse an AKs." #~ msgstr "Öffnungszeitpunkt für die Angabe von Interesse an AKs."
......
import itertools import itertools
from datetime import timedelta import json
from dataclasses import dataclass
from datetime import datetime, timedelta
from typing import Iterable, Generator
from django.db import models from django.db import models
from django.apps import apps from django.apps import apps
from django.db.models import Count from django.db.models import Count
from django.urls import reverse_lazy from django.urls import reverse_lazy
from django.utils import timezone from django.utils import timezone
from django.utils.datetime_safe import datetime
from django.utils.text import slugify from django.utils.text import slugify
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
from simple_history.models import HistoricalRecords from simple_history.models import HistoricalRecords
from timezone_field import TimeZoneField from timezone_field import TimeZoneField
@dataclass
class OptimizerTimeslot:
"""Class describing a discrete timeslot. Used to interface with an optimizer."""
"""The availability object corresponding to this timeslot."""
avail: "Availability"
"""The unique index of this optimizer timeslot."""
idx: int
"""The set of time constraints fulfilled by this object."""
constraints: set[str]
def merge(self, other: "OptimizerTimeslot") -> "OptimizerTimeslot":
"""Merge with other OptimizerTimeslot.
Creates a new OptimizerTimeslot object.
Its availability is constructed by merging the availabilities of self and other,
its constraints by taking the union of both constraint sets.
As an index, the index of self is used.
"""
avail = self.avail.merge_with(other.avail)
constraints = self.constraints.union(other.constraints)
return OptimizerTimeslot(
avail=avail, idx=self.idx, constraints=constraints
)
def __repr__(self) -> str:
return f"({self.avail.simplified}, {self.idx}, {self.constraints})"
TimeslotBlock = list[OptimizerTimeslot]
def merge_blocks(
blocks: Iterable[TimeslotBlock]
) -> Iterable[TimeslotBlock]:
"""Merge iterable of blocks together.
The timeslots of all blocks are grouped into maximal blocks.
Timeslots with the same start and end are identified with each other
and merged (cf `OptimizerTimeslot.merge`).
Throws a ValueError if any timeslots are overlapping but do not
share the same start and end, i.e. partial overlap is not allowed.
:param blocks: iterable of blocks to merge.
:return: iterable of merged blocks.
:rtype: iterable over lists of OptimizerTimeslot objects
"""
if not blocks:
return []
# flatten timeslot iterables to single chain
timeslot_chain = itertools.chain.from_iterable(blocks)
# sort timeslots according to start
timeslots = sorted(
timeslot_chain,
key=lambda slot: slot.avail.start
)
if not timeslots:
return []
all_blocks = []
current_block = [timeslots[0]]
timeslots = timeslots[1:]
for slot in timeslots:
if current_block and slot.avail.overlaps(current_block[-1].avail, strict=True):
if (
slot.avail.start == current_block[-1].avail.start
and slot.avail.end == current_block[-1].avail.end
):
# the same timeslot -> merge
current_block[-1] = current_block[-1].merge(slot)
else:
# partial overlap of interiors -> not supported
# TODO: Show comprehensive message in production
raise ValueError(
"Partially overlapping timeslots are not supported!"
f" ({current_block[-1].avail.simplified}, {slot.avail.simplified})"
)
elif not current_block or slot.avail.overlaps(current_block[-1].avail, strict=False):
# only endpoints in intersection -> same block
current_block.append(slot)
else:
# no overlap at all -> new block
all_blocks.append(current_block)
current_block = [slot]
if current_block:
all_blocks.append(current_block)
return all_blocks
class Event(models.Model): class Event(models.Model):
""" """
An event supplies the frame for all Aks. An event supplies the frame for all Aks.
...@@ -162,6 +260,158 @@ class Event(models.Model): ...@@ -162,6 +260,158 @@ class Event(models.Model):
.filter(availabilities__count=0, owners__count__gt=0) .filter(availabilities__count=0, owners__count__gt=0)
) )
def _generate_slots_from_block(
self,
start: datetime,
end: datetime,
slot_duration: timedelta,
slot_index: int = 0,
constraints: set[str] | None = None,
) -> Generator[TimeslotBlock, None, int]:
"""Discretize a time range into timeslots.
Uses a uniform discretization into discrete slots of length `slot_duration`,
starting at `start`. No incomplete timeslots are generated, i.e.
if (`end` - `start`) is not a whole number multiple of `slot_duration`
then the last incomplete timeslot is dropped.
:param start: Start of the time range.
:param end: Start of the time range.
:param slot_duration: Duration of a single timeslot in the discretization.
:param slot_index: index of the first timeslot. Defaults to 0.
:yield: Block of optimizer timeslots as the discretization result.
:ytype: list of OptimizerTimeslot
:return: The first slot index after the yielded blocks, i.e.
`slot_index` + total # generated timeslots
:rtype: int
"""
# local import to prevent cyclic import
# pylint: disable=import-outside-toplevel
from AKModel.availability.models import Availability
current_slot_start = start
previous_slot_start: datetime | None = None
if constraints is None:
constraints = set()
current_block = []
room_availabilities = list({
availability
for room in Room.objects.filter(event=self)
for availability in room.availabilities.all()
})
while current_slot_start + slot_duration <= end:
slot = Availability(
event=self,
start=current_slot_start,
end=current_slot_start + slot_duration,
)
if any((availability.contains(slot) for availability in room_availabilities)):
# no gap in a block
if (
previous_slot_start is not None
and previous_slot_start + slot_duration < current_slot_start
):
yield current_block
current_block = []
current_block.append(
OptimizerTimeslot(avail=slot, idx=slot_index, constraints=constraints)
)
previous_slot_start = current_slot_start
slot_index += 1
current_slot_start += slot_duration
if current_block:
yield current_block
return slot_index
def uniform_time_slots(self, *, slots_in_an_hour: float = 1.0) -> Iterable[TimeslotBlock]:
"""Uniformly discretize the entire event into blocks of timeslots.
Discretizes entire event uniformly. May not necessarily result in a single block
as slots with no room availability are dropped.
:param slots_in_an_hour: The percentage of an hour covered by a single slot.
Determines the discretization granularity.
:yield: Block of optimizer timeslots as the discretization result.
:ytype: list of OptimizerTimeslot
"""
all_category_constraints = AKCategory.create_category_constraints(
AKCategory.objects.filter(event=self).all()
)
yield from self._generate_slots_from_block(
start=self.start,
end=self.end,
slot_duration=timedelta(hours=1.0 / slots_in_an_hour),
constraints=all_category_constraints,
)
def default_time_slots(self, *, slots_in_an_hour: float = 1.0) -> Iterable[TimeslotBlock]:
"""Discretize all default slots into blocks of timeslots.
In the discretization each default slot corresponds to one block.
:param slots_in_an_hour: The percentage of an hour covered by a single slot.
Determines the discretization granularity.
:yield: Block of optimizer timeslots as the discretization result.
:ytype: list of TimeslotBlock
"""
slot_duration = timedelta(hours=1.0 / slots_in_an_hour)
slot_index = 0
for block_slot in DefaultSlot.objects.filter(event=self).order_by("start", "end"):
category_constraints = AKCategory.create_category_constraints(
block_slot.primary_categories.all()
)
slot_index = yield from self._generate_slots_from_block(
start=block_slot.start,
end=block_slot.end,
slot_duration=slot_duration,
slot_index=slot_index,
constraints=category_constraints,
)
def schedule_from_json(self, schedule: str) -> None:
"""Load AK schedule from a json string.
:param schedule: A string that can be decoded to json, describing
the AK schedule. The json data is assumed to be constructed
following the output specification of the KoMa conference optimizer, cf.
https://github.com/Die-KoMa/ak-plan-optimierung/wiki/Input-&-output-format
"""
schedule = json.loads(schedule)
slots_in_an_hour = schedule["input"]["timeslots"]["info"]["duration"]
timeslot_dict = {
timeslot.idx: timeslot
for block in merge_blocks(self.default_time_slots(slots_in_an_hour=slots_in_an_hour))
for timeslot in block
}
for scheduled_slot in schedule["scheduled_aks"]:
slot = AKSlot.objects.get(id=int(scheduled_slot["ak_id"]))
slot.room = Room.objects.get(id=int(scheduled_slot["room_id"]))
scheduled_slot["timeslot_ids"] = list(map(int, scheduled_slot["timeslot_ids"]))
start_timeslot = timeslot_dict[min(scheduled_slot["timeslot_ids"])].avail
end_timeslot = timeslot_dict[max(scheduled_slot["timeslot_ids"])].avail
slot.start = start_timeslot.start
slot.duration = (end_timeslot.end - start_timeslot.start).total_seconds() / 3600.0
slot.save()
class AKOwner(models.Model): class AKOwner(models.Model):
""" An AKOwner describes the person organizing/holding an AK. """ An AKOwner describes the person organizing/holding an AK.
...@@ -260,6 +510,20 @@ class AKCategory(models.Model): ...@@ -260,6 +510,20 @@ class AKCategory(models.Model):
def __str__(self): def __str__(self):
return self.name return self.name
@staticmethod
def create_category_constraints(categories: Iterable["AKCategory"]) -> set[str]:
"""Create a set of constraint strings from an AKCategory iterable.
:param categories: The iterable of categories to derive the constraint strings from.
:return: A set of category constraint strings, i.e. strings of the form
'availability-cat-<cat.name>'.
:rtype: set of strings.
"""
return {
f"availability-cat-{cat.name}"
for cat in categories
}
class AKTrack(models.Model): class AKTrack(models.Model):
""" An AKTrack describes a set of semantically related AKs. """ An AKTrack describes a set of semantically related AKs.
...@@ -379,7 +643,7 @@ class AK(models.Model): ...@@ -379,7 +643,7 @@ class AK(models.Model):
availabilities = ', \n'.join(f'{a.simplified}' for a in Availability.objects.select_related('event') availabilities = ', \n'.join(f'{a.simplified}' for a in Availability.objects.select_related('event')
.filter(ak=self)) .filter(ak=self))
detail_string = f"""{self.name}{" (R)" if self.reso else ""}: detail_string = f"""{self.name}{" (R)" if self.reso else ""}:
{self.owners_list} {self.owners_list}
{_('Interest')}: {self.interest}""" {_('Interest')}: {self.interest}"""
...@@ -513,6 +777,43 @@ class Room(models.Model): ...@@ -513,6 +777,43 @@ class Room(models.Model):
def __str__(self): def __str__(self):
return self.title return self.title
def as_json(self) -> str:
"""Return a json string representation of this room object.
:return: The json string representation is constructed
following the input specification of the KoMa conference optimizer, cf.
https://github.com/Die-KoMa/ak-plan-optimierung/wiki/Input-&-output-format
:rtype: str
"""
# local import to prevent cyclic import
# pylint: disable=import-outside-toplevel
from AKModel.availability.models import Availability
# check if room is available for the whole event
# -> no time constraint needs to be introduced
if Availability.is_event_covered(self.event, self.availabilities.all()):
time_constraints = []
else:
time_constraints = [f"availability-room-{self.pk}"]
data = {
"id": str(self.pk),
"info": {
"name": self.name,
},
"capacity": self.capacity,
"fulfilled_room_constraints": [constraint.name
for constraint in self.properties.all()],
"time_constraints": time_constraints
}
data["fulfilled_room_constraints"].append(f"availability-room-{self.pk}")
if not any(constr.startswith("proxy") for constr in data["fulfilled_room_constraints"]):
data["fulfilled_room_constraints"].append("no-proxy")
return json.dumps(data)
class AKSlot(models.Model): class AKSlot(models.Model):
""" An AK Mapping matches an AK to a room during a certain time. """ An AK Mapping matches an AK to a room during a certain time.
...@@ -608,6 +909,63 @@ class AKSlot(models.Model): ...@@ -608,6 +909,63 @@ class AKSlot(models.Model):
self.duration = min(self.duration, event_duration_hours) self.duration = min(self.duration, event_duration_hours)
super().save(force_insert, force_update, using, update_fields) super().save(force_insert, force_update, using, update_fields)
def as_json(self) -> str:
"""Return a json string representation of the AK object of this slot.
:return: The json string representation is constructed
following the input specification of the KoMa conference optimizer, cf.
https://github.com/Die-KoMa/ak-plan-optimierung/wiki/Input-&-output-format
:rtype: str
"""
# local import to prevent cyclic import
# pylint: disable=import-outside-toplevel
from AKModel.availability.models import Availability
# check if ak resp. owner is available for the whole event
# -> no time constraint needs to be introduced
if not self.fixed and Availability.is_event_covered(self.event, self.ak.availabilities.all()):
ak_time_constraints = []
else:
ak_time_constraints = [f"availability-ak-{self.ak.pk}"]
def _owner_time_constraints(owner: AKOwner):
if Availability.is_event_covered(self.event, owner.availabilities.all()):
return []
return [f"availability-person-{owner.pk}"]
# self.slots_in_an_hour is set in AKJSONExportView
data = {
"id": str(self.pk),
"duration": round(self.duration * self.slots_in_an_hour),
"properties": {},
"room_constraints": [constraint.name
for constraint in self.ak.requirements.all()],
"time_constraints": ["resolution"] if self.ak.reso else [],
"info": {
"name": self.ak.name,
"head": ", ".join([str(owner)
for owner in self.ak.owners.all()]),
"description": self.ak.description,
"reso": self.ak.reso,
},
}
data["time_constraints"].extend(ak_time_constraints)
for owner in self.ak.owners.all():
data["time_constraints"].extend(_owner_time_constraints(owner))
if self.ak.category:
category_constraints = AKCategory.create_category_constraints([self.ak.category])
data["time_constraints"].extend(category_constraints)
if self.room is not None and self.fixed:
data["room_constraints"].append(f"availability-room-{self.room.pk}")
if not any(constr.startswith("proxy") for constr in data["room_constraints"]):
data["room_constraints"].append("no-proxy")
return json.dumps(data)
class AKOrgaMessage(models.Model): class AKOrgaMessage(models.Model):
""" """
......
{% extends "admin/base_site.html" %}
{% load tz %}
{% block content %}
<pre>
{"aks": [
{% for slot in slots %}{{ slot.as_json }}{% if not forloop.last %},
{% endif %}{% endfor %}
],
"rooms": [
{% for room in rooms %}{{ room.as_json }}{% if not forloop.last %},
{% endif %}{% endfor %}
],
"participants": {{ participants }},
"timeslots": {{ timeslots }},
"info": {{ info_dict }}
}
</pre>
{% endblock %}
...@@ -5,8 +5,9 @@ from rest_framework.routers import DefaultRouter ...@@ -5,8 +5,9 @@ from rest_framework.routers import DefaultRouter
import AKModel.views.api import AKModel.views.api
from AKModel.views.manage import ExportSlidesView, PlanPublishView, PlanUnpublishView, DefaultSlotEditorView, \ from AKModel.views.manage import ExportSlidesView, PlanPublishView, PlanUnpublishView, DefaultSlotEditorView, \
AKsByUserView AKsByUserView, AKScheduleJSONImportView
from AKModel.views.ak import AKRequirementOverview, AKCSVExportView, AKWikiExportView, AKMessageDeleteView from AKModel.views.ak import AKRequirementOverview, AKCSVExportView, AKJSONExportView, AKWikiExportView, \
AKMessageDeleteView
from AKModel.views.event_wizard import NewEventWizardStartView, NewEventWizardPrepareImportView, \ from AKModel.views.event_wizard import NewEventWizardStartView, NewEventWizardPrepareImportView, \
NewEventWizardImportView, NewEventWizardActivateView, NewEventWizardFinishView, NewEventWizardSettingsView NewEventWizardImportView, NewEventWizardActivateView, NewEventWizardFinishView, NewEventWizardSettingsView
from AKModel.views.room import RoomBatchCreationView from AKModel.views.room import RoomBatchCreationView
...@@ -96,6 +97,10 @@ def get_admin_urls_event(admin_site): ...@@ -96,6 +97,10 @@ def get_admin_urls_event(admin_site):
name="aks_by_owner"), name="aks_by_owner"),
path('<slug:event_slug>/ak-csv-export/', admin_site.admin_view(AKCSVExportView.as_view()), path('<slug:event_slug>/ak-csv-export/', admin_site.admin_view(AKCSVExportView.as_view()),
name="ak_csv_export"), name="ak_csv_export"),
path('<slug:event_slug>/ak-json-export/', admin_site.admin_view(AKJSONExportView.as_view()),
name="ak_json_export"),
path('<slug:event_slug>/ak-schedule-json-import/', admin_site.admin_view(AKScheduleJSONImportView.as_view()),
name="ak_schedule_json_import"),
path('<slug:slug>/ak-wiki-export/', admin_site.admin_view(AKWikiExportView.as_view()), path('<slug:slug>/ak-wiki-export/', admin_site.admin_view(AKWikiExportView.as_view()),
name="ak_wiki_export"), name="ak_wiki_export"),
path('<slug:event_slug>/delete-orga-messages/', admin_site.admin_view(AKMessageDeleteView.as_view()), path('<slug:event_slug>/delete-orga-messages/', admin_site.admin_view(AKMessageDeleteView.as_view()),
......
import json
from typing import List
from django.contrib import messages from django.contrib import messages
from django.urls import reverse_lazy from django.urls import reverse_lazy
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
from django.views.generic import ListView, DetailView from django.views.generic import ListView, DetailView
from AKModel.availability.models import Availability
from AKModel.metaviews.admin import AdminViewMixin, FilterByEventSlugMixin, EventSlugMixin, IntermediateAdminView, \ from AKModel.metaviews.admin import AdminViewMixin, FilterByEventSlugMixin, EventSlugMixin, IntermediateAdminView, \
IntermediateAdminActionView IntermediateAdminActionView
from AKModel.models import AKRequirement, AKSlot, Event, AKOrgaMessage, AK from AKModel.models import AKRequirement, AKSlot, Event, AKOrgaMessage, AK, Room, AKOwner, merge_blocks
class AKRequirementOverview(AdminViewMixin, FilterByEventSlugMixin, ListView): class AKRequirementOverview(AdminViewMixin, FilterByEventSlugMixin, ListView):
...@@ -37,6 +41,129 @@ class AKCSVExportView(AdminViewMixin, FilterByEventSlugMixin, ListView): ...@@ -37,6 +41,129 @@ class AKCSVExportView(AdminViewMixin, FilterByEventSlugMixin, ListView):
return super().get_queryset().order_by("ak__track") return super().get_queryset().order_by("ak__track")
class AKJSONExportView(AdminViewMixin, FilterByEventSlugMixin, ListView):
"""
View: Export all AK slots of this event in JSON format ordered by tracks
"""
template_name = "admin/AKModel/ak_json_export.html"
model = AKSlot
context_object_name = "slots"
title = _("AK JSON Export")
def _test_slot_contained(self, slot: Availability, availabilities: List[Availability]) -> bool:
return any(availability.contains(slot) for availability in availabilities)
def _test_event_covered(self, availabilities: List[Availability]) -> bool:
return not Availability.is_event_covered(self.event, availabilities)
def _test_fixed_ak(self, ak_id, slot: Availability, ak_fixed: dict) -> bool:
if not ak_id in ak_fixed:
return False
fixed_slot = Availability(self.event, start=ak_fixed[ak_id].start, end=ak_fixed[ak_id].end)
return fixed_slot.overlaps(slot, strict=True)
def _test_add_constraint(self, slot: Availability, availabilities: List[Availability]) -> bool:
return (
self._test_event_covered(availabilities)
and self._test_slot_contained(slot, availabilities)
)
def get_queryset(self):
return super().get_queryset().order_by("ak__track")
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context["participants"] = json.dumps([])
rooms = Room.objects.filter(event=self.event)
context["rooms"] = rooms
# TODO: Configure magic number in event
SLOTS_IN_AN_HOUR = 1
timeslots = {
"info": {"duration": (1.0 / SLOTS_IN_AN_HOUR), },
"blocks": [],
}
for slot in context["slots"]:
slot.slots_in_an_hour = SLOTS_IN_AN_HOUR
ak_availabilities = {
slot.ak.pk: Availability.union(slot.ak.availabilities.all())
for slot in context["slots"]
}
room_availabilities = {
room.pk: Availability.union(room.availabilities.all())
for room in rooms
}
person_availabilities = {
person.pk: Availability.union(person.availabilities.all())
for person in AKOwner.objects.filter(event=self.event)
}
ak_fixed = {
ak_id: values.get()
for ak_id in ak_availabilities.keys()
if (values := AKSlot.objects.select_related().filter(ak__pk=ak_id, fixed=True)).exists()
}
for block in merge_blocks(self.event.default_time_slots(slots_in_an_hour=SLOTS_IN_AN_HOUR)):
current_block = []
for timeslot in block:
time_constraints = []
if self.event.reso_deadline is None or timeslot.avail.end < self.event.reso_deadline:
time_constraints.append("resolution")
time_constraints.extend([
f"availability-ak-{ak_id}"
for ak_id, availabilities in ak_availabilities.items()
if (
self._test_add_constraint(timeslot.avail, availabilities)
or self._test_fixed_ak(ak_id, timeslot.avail, ak_fixed)
)
])
time_constraints.extend([
f"availability-person-{person_id}"
for person_id, availabilities in person_availabilities.items()
if self._test_add_constraint(timeslot.avail, availabilities)
])
time_constraints.extend([
f"availability-room-{room_id}"
for room_id, availabilities in room_availabilities.items()
if self._test_add_constraint(timeslot.avail, availabilities)
])
time_constraints.extend(timeslot.constraints)
current_block.append({
"id": str(timeslot.idx),
"info": {
"start": timeslot.avail.simplified,
},
"fulfilled_time_constraints": time_constraints,
})
timeslots["blocks"].append(current_block)
context["timeslots"] = json.dumps(timeslots)
info_dict = {
"title": self.event.name,
"slug": self.event.slug
}
for attr in ["contact_email", "place"]:
if hasattr(self.event, attr) and getattr(self.event, attr):
info_dict[attr] = getattr(self.event, attr)
context["info_dict"] = json.dumps(info_dict)
return context
class AKWikiExportView(AdminViewMixin, DetailView): class AKWikiExportView(AdminViewMixin, DetailView):
""" """
View: Export AKs of this event in wiki syntax View: Export AKs of this event in wiki syntax
......
...@@ -4,15 +4,17 @@ import os ...@@ -4,15 +4,17 @@ import os
import tempfile import tempfile
from itertools import zip_longest from itertools import zip_longest
from django.contrib import messages from django.contrib import messages
from django.db.models.functions import Now from django.db.models.functions import Now
from django.shortcuts import redirect
from django.utils.dateparse import parse_datetime from django.utils.dateparse import parse_datetime
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
from django.views.generic import TemplateView, DetailView from django.views.generic import TemplateView, DetailView
from django_tex.core import render_template_with_context, run_tex_in_directory from django_tex.core import render_template_with_context, run_tex_in_directory
from django_tex.response import PDFResponse from django_tex.response import PDFResponse
from AKModel.forms import SlideExportForm, DefaultSlotEditorForm from AKModel.forms import SlideExportForm, DefaultSlotEditorForm, JSONScheduleImportForm
from AKModel.metaviews.admin import EventSlugMixin, IntermediateAdminView, IntermediateAdminActionView, AdminViewMixin from AKModel.metaviews.admin import EventSlugMixin, IntermediateAdminView, IntermediateAdminActionView, AdminViewMixin
from AKModel.models import ConstraintViolation, Event, DefaultSlot, AKOwner from AKModel.models import ConstraintViolation, Event, DefaultSlot, AKOwner
...@@ -58,7 +60,7 @@ class ExportSlidesView(EventSlugMixin, IntermediateAdminView): ...@@ -58,7 +60,7 @@ class ExportSlidesView(EventSlugMixin, IntermediateAdminView):
Create a list of tuples cosisting of an AK and a list of upcoming AKs (list length depending on setting) Create a list of tuples cosisting of an AK and a list of upcoming AKs (list length depending on setting)
""" """
next_aks_list = zip_longest(*[ak_list[i + 1:] for i in range(NEXT_AK_LIST_LENGTH)], fillvalue=None) next_aks_list = zip_longest(*[ak_list[i + 1:] for i in range(NEXT_AK_LIST_LENGTH)], fillvalue=None)
return [(ak, next_aks) for ak, next_aks in zip_longest(ak_list, next_aks_list, fillvalue=[])] return list(zip_longest(ak_list, next_aks_list, fillvalue=[]))
# Get all relevant AKs (wishes separately, and either all AKs or only those who should directly or indirectly # Get all relevant AKs (wishes separately, and either all AKs or only those who should directly or indirectly
# be presented when restriction setting was chosen) # be presented when restriction setting was chosen)
...@@ -245,3 +247,16 @@ class AKsByUserView(AdminViewMixin, EventSlugMixin, DetailView): ...@@ -245,3 +247,16 @@ class AKsByUserView(AdminViewMixin, EventSlugMixin, DetailView):
model = AKOwner model = AKOwner
context_object_name = 'owner' context_object_name = 'owner'
template_name = "admin/AKModel/aks_by_user.html" template_name = "admin/AKModel/aks_by_user.html"
class AKScheduleJSONImportView(EventSlugMixin, IntermediateAdminView):
"""
View: Import an AK schedule from a json file that can be pasted into this view.
"""
form_class = JSONScheduleImportForm
title = _("AK Schedule JSON Import")
def form_valid(self, form):
self.event.schedule_from_json(form.data["json_data"])
return redirect("admin:event_status", self.event.slug)
...@@ -133,10 +133,18 @@ class EventAKsWidget(TemplateStatusWidget): ...@@ -133,10 +133,18 @@ class EventAKsWidget(TemplateStatusWidget):
"text": _("Manage ak tracks"), "text": _("Manage ak tracks"),
"url": reverse_lazy("admin:tracks_manage", kwargs={"event_slug": context["event"].slug}), "url": reverse_lazy("admin:tracks_manage", kwargs={"event_slug": context["event"].slug}),
}, },
{
"text": _("Import AK schedule from JSON"),
"url": reverse_lazy("admin:ak_schedule_json_import", kwargs={"event_slug": context["event"].slug}),
},
{ {
"text": _("Export AKs as CSV"), "text": _("Export AKs as CSV"),
"url": reverse_lazy("admin:ak_csv_export", kwargs={"event_slug": context["event"].slug}), "url": reverse_lazy("admin:ak_csv_export", kwargs={"event_slug": context["event"].slug}),
}, },
{
"text": _("Export AKs as JSON"),
"url": reverse_lazy("admin:ak_json_export", kwargs={"event_slug": context["event"].slug}),
},
{ {
"text": _("Export AKs for Wiki"), "text": _("Export AKs for Wiki"),
"url": reverse_lazy("admin:ak_wiki_export", kwargs={"slug": context["event"].slug}), "url": reverse_lazy("admin:ak_wiki_export", kwargs={"slug": context["event"].slug}),
......
...@@ -8,7 +8,7 @@ msgid "" ...@@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-05-15 20:03+0200\n" "POT-Creation-Date: 2024-05-27 01:57+0000\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"
...@@ -38,7 +38,7 @@ msgstr "Veranstaltung" ...@@ -38,7 +38,7 @@ msgstr "Veranstaltung"
#: AKPlan/templates/AKPlan/plan_index.html:59 #: AKPlan/templates/AKPlan/plan_index.html:59
#: AKPlan/templates/AKPlan/plan_room.html:13 #: AKPlan/templates/AKPlan/plan_room.html:13
#: AKPlan/templates/AKPlan/plan_room.html:59 #: AKPlan/templates/AKPlan/plan_room.html:59
#: AKPlan/templates/AKPlan/plan_wall.html:65 #: AKPlan/templates/AKPlan/plan_wall.html:67
msgid "Room" msgid "Room"
msgstr "Raum" msgstr "Raum"
...@@ -63,12 +63,12 @@ msgid "AK Wall" ...@@ -63,12 +63,12 @@ msgid "AK Wall"
msgstr "AK-Wall" msgstr "AK-Wall"
#: AKPlan/templates/AKPlan/plan_index.html:130 #: AKPlan/templates/AKPlan/plan_index.html:130
#: AKPlan/templates/AKPlan/plan_wall.html:130 #: AKPlan/templates/AKPlan/plan_wall.html:132
msgid "Current AKs" msgid "Current AKs"
msgstr "Aktuelle AKs" msgstr "Aktuelle AKs"
#: AKPlan/templates/AKPlan/plan_index.html:137 #: AKPlan/templates/AKPlan/plan_index.html:137
#: AKPlan/templates/AKPlan/plan_wall.html:135 #: AKPlan/templates/AKPlan/plan_wall.html:137
msgid "Next AKs" msgid "Next AKs"
msgstr "Nächste AKs" msgstr "Nächste AKs"
...@@ -99,7 +99,7 @@ msgstr "Eigenschaften" ...@@ -99,7 +99,7 @@ msgstr "Eigenschaften"
msgid "Track" msgid "Track"
msgstr "Track" msgstr "Track"
#: AKPlan/templates/AKPlan/plan_wall.html:145 #: AKPlan/templates/AKPlan/plan_wall.html:147
msgid "Reload page automatically?" msgid "Reload page automatically?"
msgstr "Seite automatisch neu laden?" msgstr "Seite automatisch neu laden?"
......
...@@ -8,7 +8,7 @@ msgid "" ...@@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-08-16 16:30+0200\n" "POT-Creation-Date: 2024-05-27 01:57+0000\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"
...@@ -17,10 +17,10 @@ msgstr "" ...@@ -17,10 +17,10 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: AKPlanning/settings.py:148 #: AKPlanning/settings.py:147
msgid "German" msgid "German"
msgstr "Deutsch" msgstr "Deutsch"
#: AKPlanning/settings.py:149 #: AKPlanning/settings.py:148
msgid "English" msgid "English"
msgstr "Englisch" msgstr "Englisch"
...@@ -288,6 +288,8 @@ def ak_requirements_changed_handler(sender, instance: AK, action: str, **kwargs) ...@@ -288,6 +288,8 @@ def ak_requirements_changed_handler(sender, instance: AK, action: str, **kwargs)
for slot in slots_of_this_ak: for slot in slots_of_this_ak:
room = slot.room room = slot.room
if room is None:
continue
room_requirements = room.properties.all() room_requirements = room.properties.all()
for requirement in instance.requirements.all(): for requirement in instance.requirements.all():
......
...@@ -8,7 +8,7 @@ msgid "" ...@@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-08-16 16:30+0200\n" "POT-Creation-Date: 2024-05-27 01:57+0000\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"
...@@ -17,16 +17,16 @@ msgstr "" ...@@ -17,16 +17,16 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: AKSubmission/forms.py:93 #: AKSubmission/forms.py:95
#, python-format #, python-format
msgid "\"%(duration)s\" is not a valid duration" msgid "\"%(duration)s\" is not a valid duration"
msgstr "\"%(duration)s\" ist keine gültige Dauer" msgstr "\"%(duration)s\" ist keine gültige Dauer"
#: AKSubmission/forms.py:159 #: AKSubmission/forms.py:155
msgid "Duration(s)" msgid "Duration(s)"
msgstr "Dauer(n)" msgstr "Dauer(n)"
#: AKSubmission/forms.py:161 #: AKSubmission/forms.py:157
msgid "" msgid ""
"Enter at least one planned duration (in hours). If your AK should have " "Enter at least one planned duration (in hours). If your AK should have "
"multiple slots, use multiple lines" "multiple slots, use multiple lines"
......
...@@ -10,7 +10,7 @@ setup. ...@@ -10,7 +10,7 @@ setup.
### System Requirements ### System Requirements
* Python 3.8+ incl. development tools * Python 3.10+ incl. development tools
* Virtualenv * Virtualenv
* pdflatex & beamer * pdflatex & beamer
class (`texlive-latex-base texlive-latex-recommended texlive-latex-extra texlive-fonts-extra texlive-luatex`) class (`texlive-latex-base texlive-latex-recommended texlive-latex-extra texlive-fonts-extra texlive-luatex`)
...@@ -37,7 +37,7 @@ Python requirements are listed in ``requirements.txt``. They can be installed wi ...@@ -37,7 +37,7 @@ Python requirements are listed in ``requirements.txt``. They can be installed wi
### Manual Setup ### Manual Setup
1. setup a virtual environment using the proper python version ``virtualenv venv -p python3.7`` 1. setup a virtual environment using the proper python version ``virtualenv venv -p python3.10``
1. activate virtualenv ``source venv/bin/activate`` 1. activate virtualenv ``source venv/bin/activate``
1. install python requirements ``pip install -r requirements.txt`` 1. install python requirements ``pip install -r requirements.txt``
1. setup necessary database tables etc. ``python manage.py migrate`` 1. setup necessary database tables etc. ``python manage.py migrate``
...@@ -68,7 +68,7 @@ is not stored in any repository or similar, and disable DEBUG mode (``settings.p ...@@ -68,7 +68,7 @@ is not stored in any repository or similar, and disable DEBUG mode (``settings.p
1. create a folder, e.g. ``mkdir /srv/AKPlanning/`` 1. create a folder, e.g. ``mkdir /srv/AKPlanning/``
1. change to the new directory ``cd /srv/AKPlanning/`` 1. change to the new directory ``cd /srv/AKPlanning/``
1. clone this repository ``git clone URL .`` 1. clone this repository ``git clone URL .``
1. setup a virtual environment using the proper python version ``virtualenv venv -p python3.7`` 1. setup a virtual environment using the proper python version ``virtualenv venv -p python3.10``
1. activate virtualenv ``source venv/bin/activate`` 1. activate virtualenv ``source venv/bin/activate``
1. update tools ``pip install --upgrade setuptools pip wheel`` 1. update tools ``pip install --upgrade setuptools pip wheel``
1. install python requirements ``pip install -r requirements.txt`` 1. install python requirements ``pip install -r requirements.txt``
......
...@@ -10,7 +10,7 @@ rm -rf venv/ ...@@ -10,7 +10,7 @@ rm -rf venv/
# Setup Python Environment # Setup Python Environment
# Requires: Virtualenv, appropriate Python installation # Requires: Virtualenv, appropriate Python installation
virtualenv venv -p python3.9 virtualenv venv -p python3.10
source venv/bin/activate source venv/bin/activate
pip install --upgrade setuptools pip wheel pip install --upgrade setuptools pip wheel
pip install -r requirements.txt pip install -r requirements.txt
......