Make sure candidate names are properly capitalized

Change-Id: I3f7ef0571f0b598739dea22d9a9bfd37603bd7af
This commit is contained in:
Tristan Cacqueray 2015-09-11 10:59:51 -04:00
parent 3f3a30a819
commit 1fbae32077
3 changed files with 3 additions and 2 deletions

View File

@ -4,7 +4,7 @@
* `{{ project.replace('_', ' ') }} <http://git.openstack.org/cgit/openstack/election/plain/candidates/{{ election }}/{{ project }}>`_
{% for candidate in candidates[project] %}
* `{{ candidate.split('/')[-1][:-4].replace('_', ' ') }} <http://git.openstack.org/cgit/openstack/election/plain/{{ candidate }}>`_
* `{{ candidate.split('/')[-1][:-4].replace('_', ' ').title() }} <http://git.openstack.org/cgit/openstack/election/plain/{{ candidate }}>`_
{% endfor %}
{% endif %}{% endfor %}

View File

@ -2,5 +2,5 @@
======================
{% for candidate in candidates['TC'] %}
* `{{ candidate.split('/')[-1][:-4].replace('_', ' ') }} <http://git.openstack.org/cgit/openstack/election/plain/{{ candidate }}>`_
* `{{ candidate.split('/')[-1][:-4].replace('_', ' ').title() }} <http://git.openstack.org/cgit/openstack/election/plain/{{ candidate }}>`_
{% endfor %}

View File

@ -22,6 +22,7 @@ def main(argv):
print "* %s" % project.replace('_', ' ')
for candidate in candidates_list['candidates'][project]:
candidate_name = candidate.split('/')[-1][:-4].replace('_', ' ')
candidate_name = candidate_name.title()
print "** [%s/%s %s]" % (GIT_BASE,
candidate.replace(' ', '%20'),
candidate_name)