@register.function
def summarize_validation(validation):
    # L10n: first parameter is the number of errors
    errors = ngettext('{0} error', '{0} errors',
                      validation.errors).format(validation.errors)
    # L10n: first parameter is the number of warnings
    warnings = ngettext('{0} warning', '{0} warnings',
                        validation.warnings).format(validation.warnings)
    return "%s, %s" % (errors, warnings)
Readable summary of add-on validation results.
dataset/ETHPy150Open mozilla/addons-server/src/olympia/devhub/helpers.py/summarize_validation