view website/issues/detectors/severityauditor.py @ 8080:d1c29284ccd9

feat: issue2551287 - roundup-gettext extracts strings from detectors/extensions Enhance roundup_gettext.py to extract strings from detectors/extensions. If the polib module is available, roundup-gettext will extract translatable strings from the tracker's Python code. If polib is missing, it will print a warning. Marcus did most of the work, I had to do a python 2-> conversion of pygettext.py.
author John Rouillard <rouilj@ieee.org>
date Sat, 13 Jul 2024 18:27:11 -0400
parents 0942fe89e82e
children
line wrap: on
line source


def init_severity(db, cl, nodeid, newvalues):
    """Make sure severity is set on new issues"""
    if 'severity' in newvalues and newvalues['severity']:
        return

    normal = db.severity.lookup('normal')
    newvalues['severity'] = normal

def init(db):
    db.issue.audit('create', init_severity)

Roundup Issue Tracker: http://roundup-tracker.org/