[Apt-listbugs-commits] [apt-listbugs] 01/06: improve and internationalize RSS output

Francesco Poli frx-guest at moszumanska.debian.org
Wed Apr 15 20:35:30 UTC 2015


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

frx-guest pushed a commit to branch master
in repository apt-listbugs.

commit 017eb5d30539a9d3f6851c500bdebec442535b69
Author: Francesco Poli (wintermute) <invernomuto at paranoici.org>
Date:   Sun Mar 29 19:02:00 2015 +0200

    improve and internationalize RSS output
---
 debian/changelog         |  1 +
 lib/aptlistbugs/logic.rb | 20 ++++++++++----------
 2 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index a440453..62cb103 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -14,6 +14,7 @@ apt-listbugs (0.1.17) UNRELEASED; urgency=medium
     the presence of the "b<id>" identifiers
   * improved HTML bug lists (strings are now encoded to be valid XML)
   * fixed RSS output (suppressed double encoding of strings)
+  * improved and internationalized RSS output
 
  -- Francesco Poli (wintermute) <invernomuto at paranoici.org>  Sun, 04 Jan 2015 11:42:30 +0100
 
diff --git a/lib/aptlistbugs/logic.rb b/lib/aptlistbugs/logic.rb
index e4a3800..4bc1b0f 100644
--- a/lib/aptlistbugs/logic.rb
+++ b/lib/aptlistbugs/logic.rb
@@ -224,7 +224,7 @@ class AppConfig
       $stderr.puts _("W: ") + sprintf(_("Unrecognized severity '%s' will be ignored by the Debian BTS."), unrec)
     }
 
-    @title = "Debian Bugs (#{@severity.join(', ')})" if ! @title
+    @title = sprintf(_("Bugs of severity %s"), @severity.join(', ')) if ! @title
 
     # http_proxy sanity check
     if ENV["HTTP_PROXY"] != nil && ENV["http_proxy"] == nil
@@ -823,26 +823,26 @@ class Viewer
           if @config.stats.include?( bug.stat )
             item = maker.items.new_item
             item.link = "http://bugs.debian.org/#{bug.bug_number}"
-            item.title = "Bug##{bug.bug_number}: #{bug.desc}"
+            item.title = "##{bug.bug_number} - #{bug.desc}"
             item.date = Time.parse("#{bug.time.year}/#{bug.time.month}/#{bug.time.day} #{bug.time.hour}:#{bug.time.min}:#{bug.time.sec}")
 
             buf = ""
 
             buf << "<ul>\n"
-            buf << "<li>Bug##{bug.bug_number}</li>\n"
-            buf << "<li>Package: #{bug.pkg_key}</li>\n"
-            buf << "<li>Severity: #{bug.severity}</li>\n"
-            buf << "<li>Status: #{bug.stat}</li>\n"
-            buf << "<li>Tags: #{bug.tags.join(',')}</li>\n" if bug.tags != nil
+            buf << "<li>" + _("bug number") + ": ##{bug.bug_number}</li>\n"
+            buf << "<li>" + _("package")    + ": #{bug.pkg_key}</li>\n"
+            buf << "<li>" + _("severity")   + ": #{bug.severity}</li>\n"
+            buf << "<li>" + _("state")      + ": #{@config.statmap(bug.stat)}</li>\n"
+            buf << "<li>" + _("tags")       + ": #{bug.tags.join(',')}</li>\n" if bug.tags != nil
 
             if bug.mergeids.size > 0
-              buf << "<li>Merged with:\n"
+              buf << "<li>" + _("   Merged with:")
               bug.mergeids.each { |id|
                 url  = "http://bugs.debian.org/#{id}"
-                buf << "<a href=\"#{url}\">#{id}</a>"
+                buf << " <a href=\"#{url}\">#{id}</a>"
               }
+              buf << "</li>\n"
             end
-            buf << "</li>\n"
             buf << "</ul>\n"
 
             item.description = buf

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/apt-listbugs/apt-listbugs.git



More information about the Apt-listbugs-commits mailing list