[game-data-packager] 02/02: HTML: better match bug numbers

Alexandre Detiste detiste-guest at moszumanska.debian.org
Wed Jan 13 08:37:26 UTC 2016


This is an automated email from the git hooks/post-receive script.

detiste-guest pushed a commit to branch master
in repository game-data-packager.

commit 885c2ac1eb49c78860be722cdaf0b680b6d1d6a2
Author: Alexandre Detiste <alexandre.detiste at gmail.com>
Date:   Wed Jan 13 09:36:36 2016 +0100

    HTML: better match bug numbers
---
 tools/babel.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/tools/babel.py b/tools/babel.py
index 14a6a68..f57f0b2 100755
--- a/tools/babel.py
+++ b/tools/babel.py
@@ -96,7 +96,13 @@ with open('debian/TODO', 'r', encoding='utf8') as missing:
                 stats['longname'] = line
             else:
                 longname, bug = line.split('#')
-                stats['longname'] = '%s <a href="https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=%s">#%s</a>' % (longname, bug, bug)
+                if ' ' in bug:
+                    bug, remainder = bug.split(maxsplit=1)
+                else:
+                    remainder = ''
+                stats['longname'] = ('%s <a href="https://bugs.debian.org/'
+                                   'cgi-bin/bugreport.cgi?bug=%s">#%s</a> %s'
+                                   % (longname, bug, bug, remainder))
             games.append(stats)
 
 games = sorted(games, key=lambda k: (k['genre'], k['shortname'], k['longname']))

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/game-data-packager.git



More information about the Pkg-games-commits mailing list