From 3f3a30a81974bb38fb3bde27d822c5e00d263848 Mon Sep 17 00:00:00 2001 From: Tristan Cacqueray Date: Thu, 10 Sep 2015 21:14:41 -0400 Subject: [PATCH] Fix candidate name's space Change-Id: Iea4f6feb0af64e078c37e8c957ca7c0ea4b8adef --- doc/source/_exts/ptl.jinja | 4 ++-- doc/source/_exts/tc.jinja | 2 +- tools/render-wiki-list.py | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/doc/source/_exts/ptl.jinja b/doc/source/_exts/ptl.jinja index 7d149bd1..2142f07a 100644 --- a/doc/source/_exts/ptl.jinja +++ b/doc/source/_exts/ptl.jinja @@ -1,10 +1,10 @@ {{ election.capitalize() }} PTL Candidates ====================== {% for project in projects %}{% if project != 'TC' %} -* `{{ project }} `_ +* `{{ project.replace('_', ' ') }} `_ {% for candidate in candidates[project] %} - * `{{ candidate.split('/')[-1][:-4] }} `_ + * `{{ candidate.split('/')[-1][:-4].replace('_', ' ') }} `_ {% endfor %} {% endif %}{% endfor %} diff --git a/doc/source/_exts/tc.jinja b/doc/source/_exts/tc.jinja index 650dedac..9e2b441c 100644 --- a/doc/source/_exts/tc.jinja +++ b/doc/source/_exts/tc.jinja @@ -2,5 +2,5 @@ ====================== {% for candidate in candidates['TC'] %} - * `{{ candidate.split('/')[-1][:-4] }} `_ + * `{{ candidate.split('/')[-1][:-4].replace('_', ' ') }} `_ {% endfor %} diff --git a/tools/render-wiki-list.py b/tools/render-wiki-list.py index 59b3d722..3ed4620a 100755 --- a/tools/render-wiki-list.py +++ b/tools/render-wiki-list.py @@ -19,11 +19,12 @@ def main(argv): candidates_list['projects'] = ['TC'] for project in candidates_list['projects']: - print "* %s" % project + print "* %s" % project.replace('_', ' ') for candidate in candidates_list['candidates'][project]: + candidate_name = candidate.split('/')[-1][:-4].replace('_', ' ') print "** [%s/%s %s]" % (GIT_BASE, candidate.replace(' ', '%20'), - candidate.split('/')[-1][:-4]) + candidate_name) if __name__ == "__main__": main(sys.argv)