diff -ru originals/ticketcalendarplugin/0.12/ticketcalendar/api.py updates/ticketcalendarplugin/0.12/ticketcalendar/api.py
--- originals/ticketcalendarplugin/0.12/ticketcalendar/api.py	2013-09-20 05:27:55.000000000 +0200
+++ updates/ticketcalendarplugin/0.12/ticketcalendar/api.py	2023-03-09 10:56:20.132475795 +0100
@@ -36,7 +36,7 @@
 
 
 if arity(Option.__init__) <= 5:
-    def _option_with_tx(Base): # Trac 0.12.x
+    def _option_with_tx(Base):  # Trac 0.12.x
         class Option(Base):
             def __getattribute__(self, name):
                 val = Base.__getattribute__(self, name)
@@ -45,7 +45,7 @@
                 return val
         return Option
 else:
-    def _option_with_tx(Base): # Trac 1.0 or later
+    def _option_with_tx(Base):  # Trac 1.0 or later
         class Option(Base):
             def __init__(self, *args, **kwargs):
                 kwargs['doc_domain'] = TEXTDOMAIN
@@ -59,6 +59,7 @@
 
 
 def get_day_names(width='wide', context='format', locale=None):
+    """Return name of the day in specified locale, else in English"""
     if locale:
         return babel_get_day_names(width=width, context=context, locale=locale)
     else:
@@ -70,6 +71,7 @@
 
 
 def get_month_names(width='wide', context='format', locale=None):
+    """Return name of the month in specified locale, else in English"""
     if locale:
         return babel_get_month_names(width=width, context=context,
                                      locale=locale)
@@ -82,6 +84,7 @@
 
 
 def format_date(date=None, format='medium', locale=None):
+    """Return formatted date for the specified locale, else standard formmat"""
     if locale:
         return babel_format_date(date=date, format=format, locale=locale)
     else:
@@ -89,6 +92,7 @@
 
 
 def is_weekend(date, locale):
+    """Return True if date-object is a weekend (Sat / Sun), else False"""
     if locale:
         return locale.weekend_start <= date.weekday() <= locale.weekend_end
     else:
Only in updates/ticketcalendarplugin/0.12/ticketcalendar/locale: de
Only in updates/ticketcalendarplugin/0.12/ticketcalendar/locale: fr
Only in updates/ticketcalendarplugin/0.12/ticketcalendar/locale: nl
Only in updates/ticketcalendarplugin/0.12/ticketcalendar/locale: sv
diff -ru originals/ticketcalendarplugin/0.12/ticketcalendar/web_ui.py updates/ticketcalendarplugin/0.12/ticketcalendar/web_ui.py
--- originals/ticketcalendarplugin/0.12/ticketcalendar/web_ui.py	2019-04-15 12:19:33.000000000 +0200
+++ updates/ticketcalendarplugin/0.12/ticketcalendar/web_ui.py	2023-03-09 10:47:22.917836560 +0100
@@ -31,6 +31,7 @@
     from trac.web.chrome import web_context
 except ImportError:
     from trac.mimeview.api import Context
+
     def web_context(*args, **kwargs):
         return Context.from_request(*args, **kwargs)
 
@@ -45,10 +46,13 @@
 # Utility functions
 
 def _get_month_name(date, loc):
+    """Return name of month in given locale"""
     m = date.month
     return get_month_names('wide', locale=loc)[m]
 
+
 def _getdate(d, tz):
+    """Return date object for given timezone"""
     try:
         if d.tzinfo is tz:
             return d.date()
@@ -59,7 +63,9 @@
     except:
         return None
 
+
 def _parse_month_arg(string, tzinfo):
+    """Determine month of date object"""
     if string:
         try:
             tt = time.strptime(string, '%Y-%m')
@@ -68,7 +74,11 @@
             pass
     return get_today(tzinfo).replace(day=1)
 
+
 def _parse_duration_arg(arg, tzinfo):
+    """If a duration has been specified through '/P'-option, 
+    then return duration, else duration is 1 day.
+    """
     default = get_today(tzinfo), 7
     if not arg or '/P' not in arg:
         return default
@@ -115,6 +125,7 @@
                 if isinstance(val, (list, tuple)):
                     val = '|'.join(val)
                 args.append((key, val))
+
         def to_pair(key, val):
             if val is empty:
                 return key
@@ -133,7 +144,7 @@
             return {}
         db = self.env.get_read_db()
         cursor = db.cursor()
-        cursor.execute('SELECT name FROM enum WHERE type=%s'
+        cursor.execute('SELECT name FROM enum WHERE type = %s'
                        ' ORDER BY value',
                        (type,))
         names = [row[0] for row in cursor]
@@ -210,30 +221,30 @@
         if background:
             style = 'background-color: %s' % background
         item = tag.li(title='#%d %s' % (t.get('id'), t.get('summary')),
-                      style=style,
-                      data_href=req.href('ticketcalendar-ticket', id=tktid))
+                      style = style,
+                      data_href = req.href('ticketcalendar-ticket', id = tktid))
 
         for key, icon_class in (('_begin', 'arrowthick-1-e'),
                                 ('_end',   'arrowthick-1-w')):
             if t.get(key):
                 class_ = 'ui-icon ui-icon-' + icon_class
-                item(tag.span(tag.span('', class_=class_), class_='ui-icon-w'))
+                item(tag.span(tag.span('', class_ = class_), class_ = 'ui-icon-w'))
 
         if t.get('_beginend'):
             item(tag.span(u'\u2666',
-                          style='display: inline-block; margin: 0 0.4em;'))
+                          style = 'display: inline-block; margin: 0 0.4em;'))
 
         icon = self.get_ticket_type_icon(t.get('type'))
         if icon:
-            item(tag.span(tag.span('', title=t.get('type'),
+            item(tag.span(tag.span('', title = t.get('type'),
                                    class_ = 'ui-icon %s' % icon),
                           class_ = 'ui-icon-w'))
         else:
-            item(tag.span(t.get('type'), class_='type'))
+            item(tag.span(t.get('type'), class_ = 'type'))
 
         item(tag.span(tag.a('#%d' % tktid,
-                            href=req.href('ticket', tktid),
-                            class_='open-ticketcalendar-ticket-detail %s' %
+                            href = req.href('ticket', tktid),
+                            class_ = 'open-ticketcalendar-ticket-detail %s' %
                                    t.get('status')),
                       u'\u00a0',
                       t.get('summary')))
@@ -241,8 +252,8 @@
         return item
 
     def _get_cols(self):
-        cols = ['id','time','status','summary','priority',
-                'milestone','owner','type','description']
+        cols = ['id', 'time', 'status', 'summary', 'priority',
+                'milestone', 'owner', 'type', 'description']
         cols.extend(name
                     for name in set((self.mod.start_date_name,
                                      self.mod.due_date_name))
@@ -410,8 +421,8 @@
 
             def nav_macro():
                 macro = (
-                    '[[TicketCalendar(type=box,month=%(month)s,'
-                    'query=%(query)s,order=%(order)s%(extra)s)]]' %
+                    '[[TicketCalendar(type=box, month=%(month)s,'
+                    'query=%(query)s, order=%(order)s%(extra)s)]]' %
                     (dict(month=month.strftime('%Y-%m'),
                           query=self.build_query_string(query.constraints),
                           order=query.order,
@@ -437,24 +448,24 @@
         can_create = 'TICKET_CREATE' in req.perm
 
         ticket_box = tag.div(
-            tag.h4(tag.span('', class_='tc-today-date')),
+            tag.h4(tag.span('', class_ = 'tc-today-date')),
             tag.ul(
                 tag.li(tag.a(
                     tag_("New ticket with \"%(date)s\" as the start date",
-                         date=tag.span('', data='start-date')),
-                    data_href=req.href('newticket',
+                         date = tag.span('', data = 'start-date')),
+                    data_href = req.href('newticket',
                                        [(self.mod.start_date_name, '')]),
                     class_='newticket-start-date')),
                 tag.li(tag.a(
                     tag_("New ticket with \"%(date)s\" as the due date",
-                         date=tag.span('', data='due-date')),
+                         date=tag.span('', data = 'due-date')),
                     data_href=req.href('newticket',
                                        [(self.mod.due_date_name, '')]),
                     class_='newticket-due-date'))),
-            title=_("Create new ticket"),
-            class_='ticketcalendar-newticket-box',
-            style='display:none',
-            data_writable=(None, 'writable')[can_create])
+            title = _("Create new ticket"),
+            class_ = 'ticketcalendar-newticket-box',
+            style = 'display:none',
+            data_writable = (None, 'writable')[can_create])
 
         class_ = ('ticketcalendar',
                   'ticketcalendar ticketcalendar-can-create')[can_create]
@@ -539,7 +550,7 @@
             return locale
 
         if not locale.territory:
-            # search first locale which has the same `langauge` and territory
+            # search first locale which has the same `language` and territory
             # in preferred languages
             for l in self.req.languages:
                 l = l.replace('-', '_').lower()
@@ -582,6 +593,7 @@
 
 
 class TicketCalendarModule(Component):
+    """Main class to display tickets and milestones in calendar or list view."""
 
     implements(ITemplateProvider, IRequestHandler, IRequestFilter,
                INavigationContributor, IWikiMacroProvider)
@@ -657,7 +669,7 @@
     def get_due_date(self, ticket):
         return self._getdate(
                 ticket.get(self.due_date_name)
-                , self.due_date_format)
+               , self.due_date_format)
 
     def _getdate(self, d, format='%d/%m/%Y'):
         if isinstance(d, int):
