]> git.0d.be Git - empathy.git/blobdiff - release.py
Updated Oriya Translation
[empathy.git] / release.py
index aa93355422d1a53863a0c913b8e6e13754df0f15..c7b773363d98c3fac6fc31b2623aee7f8911c420 100755 (executable)
@@ -161,6 +161,16 @@ class Project:
                        translations += format % (lang, authors)
                return translations
 
+       def get_bug_author(self, bug_number):
+               cmd = 'git log %s.. | grep -B 20 -E "(bug %s|#%s)"' \
+                     ' | tac | grep ^Author: | head -1' \
+                     % (self.last_tag, bug_number, bug_number)
+               line = self.exec_cmd (cmd)
+               p1 = line.find(" ")
+               p2 = line.find("<")
+
+               return line[p1:p2].strip()
+
        def get_bugs(self):
                commit_str = self.exec_cmd('git show %s' % (self.last_tag))
                for line in commit_str.splitlines():
@@ -196,12 +206,18 @@ class Project:
                for row in reader:
                        bug_number = row[col_bug_id]
                        description = row[col_description]
-                       bugs += ' - Fixed #%s, %s\n' % (bug_number, description)
+                       author = self.get_bug_author(bug_number)
+                       bugs += ' - Fixed #%s, %s' % (bug_number, description)
+                       if author != '':
+                               bugs += ' (%s)' % (author)
+                       bugs += '\n'
                return bugs
 
        def generate_news(self):
-               translations = self.get_translations("ls -l po/*.po", "Updated %s Translation (%s)\n")
-               help_translations = self.get_translations("ls -l help/*/*.po", "Updated %s Documentation translation (%s)\n")
+               translations = self.get_translations("ls -l po/*.po", \
+                       " - Updated %s Translation (%s)\n")
+               help_translations = self.get_translations("ls -l help/*/*.po", \
+                       " - Updated %s Documentation translation (%s)\n")
                bugs = self.get_bugs()
 
                news = 'NEW in '+ self.package_version + '\n==============\n'