Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 50 additions & 49 deletions wafer/locale/django.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-05-07 14:22+0000\n"
"POT-Creation-Date: 2025-10-11 09:58+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down Expand Up @@ -102,50 +102,50 @@ msgid ""
"admin site."
msgstr ""

#: wafer/pages/models.py:49
#: wafer/pages/models.py:50
msgid "Last component of the page URL"
msgstr ""

#: wafer/pages/models.py:53
#: wafer/pages/models.py:54
msgid "Markdown contents for the page."
msgstr ""

#: wafer/pages/models.py:55
#: wafer/pages/models.py:56
msgid "Whether to include in menus."
msgstr ""

#: wafer/pages/models.py:58
#: wafer/pages/models.py:59
msgid "Ordering in the menu (smaller numbers come first)"
msgstr ""

#: wafer/pages/models.py:63
#: wafer/pages/models.py:64
msgid ""
"Whether to exclude this page from the static version of the site (Container "
"pages, etc.)"
msgstr ""

#: wafer/pages/models.py:68
#: wafer/pages/models.py:69
msgid "Images and other files for use in the content markdown field."
msgstr ""

#: wafer/pages/models.py:74
#: wafer/pages/models.py:75
msgid ""
"People associated with this page for display in the schedule (Session "
"chairs, panelists, etc.)"
msgstr ""

#: wafer/pages/models.py:79
#: wafer/pages/models.py:80
msgid ""
"Length of time (in seconds) to cache the page for dynamic page content. A "
"negative value means this page is not dynamic and it will be not be "
"regenerated until it is next edited."
msgstr ""

#: wafer/pages/models.py:156
#: wafer/pages/models.py:162
msgid "Circular reference in parent."
msgstr ""

#: wafer/pages/models.py:172
#: wafer/pages/models.py:178
msgid "Duplicate parent/slug combination."
msgstr ""

Expand Down Expand Up @@ -306,57 +306,58 @@ msgstr ""
msgid "You can register after your account is activated."
msgstr ""

#: wafer/schedule/admin.py:166
#: wafer/schedule/admin.py:170
msgid "Clashes found in schedule."
msgstr ""

#: wafer/schedule/admin.py:169
msgid "Duplicate schedule items found in schedule."
#: wafer/schedule/admin.py:173
msgid ""
"Schedule items found in schedule which exceed allowed number of duplicates."
msgstr ""

#: wafer/schedule/admin.py:172
#: wafer/schedule/admin.py:176
msgid "Invalid schedule items found in schedule."
msgstr ""

#: wafer/schedule/admin.py:175
#: wafer/schedule/admin.py:179
msgid "Non contiguous slots found in schedule."
msgstr ""

#: wafer/schedule/admin.py:178
#: wafer/schedule/admin.py:182
msgid "Invalid venues found in schedule."
msgstr ""

#: wafer/schedule/admin.py:181
#: wafer/schedule/admin.py:185
#: wafer/schedule/templates/admin/scheduleitem_list.html:61
msgid "Common speaker in simultaneous schedule items"
msgstr ""

#: wafer/schedule/admin.py:221
#: wafer/schedule/admin.py:225
msgid "Block"
msgstr ""

#: wafer/schedule/admin.py:273 wafer/schedule/models.py:327
#: wafer/schedule/admin.py:277 wafer/schedule/models.py:327
msgid "Start Time"
msgstr ""

#: wafer/schedule/admin.py:329
#: wafer/schedule/admin.py:333
msgid "Venue"
msgstr ""

#: wafer/schedule/admin.py:415
#: wafer/schedule/admin.py:419
msgid "Additional slots"
msgstr ""

#: wafer/schedule/admin.py:416
#: wafer/schedule/admin.py:420
msgid "Create this number of additional slots following this one"
msgstr ""

#: wafer/schedule/admin.py:477
#: wafer/schedule/admin.py:481
#, python-format
msgid "Additional slot %(obj)s added sucessfully"
msgstr ""

#: wafer/schedule/admin.py:484
#: wafer/schedule/admin.py:488
#, python-format
msgid "Failed to create new slot - %s"
msgstr ""
Expand Down Expand Up @@ -692,7 +693,7 @@ msgstr ""
msgid "Mark selected talks as Accepted"
msgstr ""

#: wafer/talks/forms.py:124 wafer/users/forms.py:23 wafer/users/forms.py:72
#: wafer/talks/forms.py:124 wafer/users/forms.py:23 wafer/users/forms.py:77
msgid "Save"
msgstr ""

Expand Down Expand Up @@ -731,7 +732,7 @@ msgid ""
"</strong>"
msgstr ""

#: wafer/talks/models.py:70 wafer/talks/models.py:121 wafer/talks/models.py:427
#: wafer/talks/models.py:70 wafer/talks/models.py:121 wafer/talks/models.py:438
msgid "name"
msgstr ""

Expand Down Expand Up @@ -799,7 +800,7 @@ msgstr ""
msgid "tracks"
msgstr ""

#: wafer/talks/models.py:151 wafer/talks/models.py:390
#: wafer/talks/models.py:151 wafer/talks/models.py:393
msgid "talk"
msgstr ""

Expand Down Expand Up @@ -854,7 +855,7 @@ msgid ""
"syntax."
msgstr ""

#: wafer/talks/models.py:192 wafer/talks/models.py:397
#: wafer/talks/models.py:192 wafer/talks/models.py:400
msgid "notes"
msgstr ""

Expand Down Expand Up @@ -900,8 +901,8 @@ msgstr ""
#, python-brace-format
msgid ""
"By checking this, you are giving permission for the talk to be videoed, and "
"distributed by the conference, under the <a href=\"{license_url}"
"\">{license_name} license</a>."
"distributed by the conference, under the <a "
"href=\"{license_url}\">{license_name} license</a>."
msgstr ""

#: wafer/talks/models.py:235
Expand All @@ -916,70 +917,70 @@ msgid ""
"who would care."
msgstr ""

#: wafer/talks/models.py:269
#: wafer/talks/models.py:272
msgid "NO CONTACT INFO"
msgstr ""

#: wafer/talks/models.py:271
#: wafer/talks/models.py:274
msgid "Contact Details"
msgstr ""

#: wafer/talks/models.py:277
#: wafer/talks/models.py:280
msgid "Corresponding Author"
msgstr ""

#: wafer/talks/models.py:288
#: wafer/talks/models.py:291
#, python-format
msgid "%s, et al."
msgstr ""

#: wafer/talks/models.py:295
#: wafer/talks/models.py:298
msgid "Added to schedule"
msgstr ""

#: wafer/talks/models.py:304
#: wafer/talks/models.py:307
msgid "Has URL"
msgstr ""

#: wafer/talks/models.py:393
#: wafer/talks/models.py:396
msgid "reviewer"
msgstr ""

#: wafer/talks/models.py:399
#: wafer/talks/models.py:402
msgid "Comments on the proposal (markdown)"
msgstr ""

#: wafer/talks/models.py:402
#: wafer/talks/models.py:405
#, python-format
msgid "Review of %(title)s by %(reviewer)s (%(average_score)s)"
msgstr ""

#: wafer/talks/models.py:421
#: wafer/talks/models.py:428
msgid "review"
msgstr ""

#: wafer/talks/models.py:422
#: wafer/talks/models.py:429
msgid "reviews"
msgstr ""

#: wafer/talks/models.py:433
#: wafer/talks/models.py:444
msgid "review aspect"
msgstr ""

#: wafer/talks/models.py:434
#: wafer/talks/models.py:445
msgid "review aspects"
msgstr ""

#: wafer/talks/models.py:450
#: wafer/talks/models.py:461
#, python-format
msgid "Review of %(title)s by %(reviewer)s on %(aspect)s: %(score)i"
msgstr ""

#: wafer/talks/models.py:458
#: wafer/talks/models.py:469
msgid "score"
msgstr ""

#: wafer/talks/models.py:459
#: wafer/talks/models.py:470
msgid "scores"
msgstr ""

Expand Down Expand Up @@ -1310,11 +1311,11 @@ msgstr ""
msgid "profiles"
msgstr ""

#: wafer/users/forms.py:66
#: wafer/users/forms.py:71
msgid "<p>Code Hosting Profiles</p>"
msgstr ""

#: wafer/users/forms.py:70
#: wafer/users/forms.py:75
msgid "<p>Social Profiles</p>"
msgstr ""

Expand Down
20 changes: 20 additions & 0 deletions wafer/pages/migrations/0007_page_schedule_duplicates.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Generated by Django 5.0.3 on 2025-10-11 09:07

import django.core.validators
from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("pages", "0006_menu_order"),
]

operations = [
migrations.AddField(
model_name="page",
name="schedule_duplicates",
field=models.IntegerField(
default=0, validators=[django.core.validators.MinValueValidator(0)]
),
),
]
6 changes: 6 additions & 0 deletions wafer/pages/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import logging

from django.conf import settings
from django.core import validators
from django.core.cache import caches
from django.core.exceptions import ValidationError, NON_FIELD_ERRORS
from django.db import models
Expand Down Expand Up @@ -81,6 +82,11 @@ class Page(models.Model):
"is not dynamic and it will be not be regenerated "
"until it is next edited."))

# By default, Pages aren't allowed in the schedule
# this helps keep the list in the schedule editor sane
schedule_duplicates = models.IntegerField(
default=0, validators=[validators.MinValueValidator(0)])

def __str__(self):
return u'%s' % (self.name,)

Expand Down
24 changes: 14 additions & 10 deletions wafer/schedule/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,21 @@ def validate_items(all_items):
def find_duplicate_schedule_items(all_items):
"""Find talks / pages assigned to mulitple schedule items"""
duplicates = []
seen_talks = {}
occurances = {}
for item in all_items:
if item.talk and item.talk in seen_talks:
duplicates.append(item)
if seen_talks[item.talk] not in duplicates:
duplicates.append(seen_talks[item.talk])
if item.talk:
key = item.talk
elif item.page:
key = item.page
else:
continue
if key in occurances:
occurances[key].append(item)
else:
seen_talks[item.talk] = item
# We currently allow duplicate pages for cases were we need disjoint
# schedule items, like multiple open space sessions on different
# days and similar cases. This may be revisited later
occurances[key] = [item]
for cand in occurances:
if len(occurances[cand]) > cand.schedule_duplicates:
duplicates.extend(occurances[cand])
return duplicates


Expand Down Expand Up @@ -166,7 +170,7 @@ def register_schedule_item_validator(function, err_type, msg):
_('Clashes found in schedule.'))
register_schedule_item_validator(
find_duplicate_schedule_items, 'duplicates',
_('Duplicate schedule items found in schedule.'))
_('Schedule items found in schedule which exceed allowed number of duplicates.'))
register_schedule_item_validator(
validate_items, 'validation',
_('Invalid schedule items found in schedule.'))
Expand Down
Loading
Loading