Example #1
0
def reviewer_list(review_request):
    """
    Returns a humanized list of target reviewers in a review request.
    """
    return humanize_list([group.display_name or group.name
                          for group in review_request.target_groups.all()] +
                         [user.get_full_name() or user.username
                          for user in review_request.target_people.all()])
Example #2
0
def reviewer_list(review_request):
    """
    Returns a humanized list of target reviewers in a review request.
    """
    return humanize_list([group.display_name or group.name
                          for group in review_request.target_groups.all()] +
                         [user.get_full_name() or user.username
                          for user in review_request.target_people.all()])
Example #3
0
    def __init__(self, allowed_types=[], msg=None, user_key=None):
        if allowed_types:
            msg = _('Unable to authenticate against this repository using one '
                    'of the supported authentication types '
                    '(%(allowed_types)s).') % {
                        'allowed_types': humanize_list(allowed_types),
                    }
        elif not msg:
            msg = _('Unable to authenticate against this repository using one '
                    'of the supported authentication types.')

        SCMError.__init__(self, msg)
        self.allowed_types = allowed_types
        self.user_key = user_key
Example #4
0
    def __init__(self, allowed_types=[], msg=None, user_key=None):
        if allowed_types:
            msg = _('Unable to authenticate against this repository using one '
                    'of the supported authentication types '
                    '(%(allowed_types)s).') % {
                'allowed_types': humanize_list(allowed_types),
            }
        elif not msg:
            msg = _('Unable to authenticate against this repository using one '
                    'of the supported authentication types.')

        SCMError.__init__(self, msg)
        self.allowed_types = allowed_types
        self.user_key = user_key
Example #5
0
    class Meta:
        if ES_VERSION_SUPPORTED:
            title = _('Elasticsearch %s.x') % es_version[0]
        else:
            title = _('Elasticsearch')

        fieldsets = ((None, {
            'description':
            _('Elasticsearch support requires a version of the '
              '<a href="%(elasticsearch_url)s" target="_blank">'
              'elasticsearch</a> Python package that both matches your '
              'version of the Elasticsearch server and is compatible '
              'with Review Board.'
              '\n'
              'We provide convenient packages for each supported major '
              'version of Elasticsearch. For example, for Elasticsearch '
              '%(major_version)s.x, install '
              '<code>ReviewBoard[elasticsearch%(major_version)s]</code> '
              'and then restart your web server:'
              '\n'
              '<code><strong>$</strong> pip install '
              '"ReviewBoard[elasticsearch%(major_version)s]"</code>'
              '\n'
              '%(supported_versions)s are supported.') % {
                  'elasticsearch_url':
                  'https://pypi.org/project/elasticsearch/',
                  'major_version':
                  LATEST_ES_MAJOR_VERSION,
                  'supported_versions':
                  humanize_list([
                      '%s.x' % _major_version
                      for _major_version in SUPPORTED_ES_MAJOR_VERSIONS
                  ]),
              },
            'fields': ('url', 'index_name'),
        }), )