[Apt-listbugs-commits] [SCM] apt-listbugs development tree branch, master, updated. apt-listbugs/0.1.7-1-geb856ed
Francesco Poli (wintermute)
invernomuto at paranoici.org
Sat Jul 7 22:24:58 UTC 2012
The following commit has been merged in the master branch:
commit eb856ed4deada33fd326590c356d26607f2c214e
Author: Francesco Poli (wintermute) <invernomuto at paranoici.org>
Date: Sun Jul 8 00:20:20 2012 +0200
improve i18n
diff --git a/debian/changelog b/debian/changelog
index b0f730b..d70e8d0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+apt-listbugs (0.1.8) UNRELEASED; urgency=low
+
+ * improved internationalization
+
+ -- Francesco Poli (wintermute) <invernomuto at paranoici.org> Sat, 07 Jul 2012 23:05:28 +0200
+
apt-listbugs (0.1.7) unstable; urgency=low
* dropped one more dependency on a transitional package (libdpkg-ruby1.8
diff --git a/lib/apt-listbugs/logic.rb b/lib/apt-listbugs/logic.rb
index d735d70..58f65bf 100644
--- a/lib/apt-listbugs/logic.rb
+++ b/lib/apt-listbugs/logic.rb
@@ -446,7 +446,12 @@ class Viewer
}
end
if pkgs.size != 0
- if @config.frontend.yes_or_no? sprintf(ngettext("The following %d package will be pinned or on hold:\n %s\nAre you sure?", "The following %d packages will be pinned or on hold:\n %s\nAre you sure?", pkgs.size), pkgs.size, pkgs.keys.join(', '))
+ if @config.frontend.yes_or_no? ngettext(
+ # TRANSLATORS: %{plist} is a comma-separated list of %{npkgs} packages to be pinned or put on hold.
+ "The following package will be pinned or on hold:\n %{plist}\nAre you sure?",
+ "The following %{npkgs} packages will be pinned or on hold:\n %{plist}\nAre you sure?",
+ pkgs.size) % {:npkgs => pkgs.size,
+ :plist => pkgs.keys.join(', ')}
if key == "h"
h = on_hold(pkgs.keys)
else
@@ -498,17 +503,12 @@ class Viewer
pin_ver = "*"
pin_pri = "-30000"
end
- holdstr << "
-Explanation: Pinned by apt-listbugs at #{Time.now}"
+ holdstr << "\nExplanation: Pinned by apt-listbugs at #{Time.now}"
bugs_of_pkg( bugs, pkg ).each { |bug|
- holdstr << "
-Explanation: ##{bug.bug_number}: #{bug.desc}"
+ holdstr << "\nExplanation: ##{bug.bug_number}: #{bug.desc}"
}
- holdstr << "
-Package: #{pkg}
-Pin: version #{pin_ver}
-Pin-Priority: #{pin_pri}
-"
+ holdstr << "\nPackage: #{pkg}\nPin: version #{pin_ver}"
+ holdstr << "\nPin-Priority: #{pin_pri}\n"
}
$stderr.puts holdstr if $DEBUG
if holdstr != ""
@@ -548,7 +548,9 @@ Pin-Priority: #{pin_pri}
bugs_statistics[pkg] += 1
p_bug_numbers << bug.bug_number
if bug_exist == 0
- buf = sprintf(_("%s bugs of %s ("), severity, pkg)
+ # TRANSLATORS: %{sevty} is the severity of some of the bugs found for package %{packg}.
+ buf = _("%{sevty} bugs of %{packg} (") % {:sevty => severity,
+ :packg => pkg}
buf += "#{cur_pkgs[pkg]['version']} " if cur_pkgs[pkg] != nil
buf += "-> #{new_pkgs[pkg]['version']}) <#{@config.statmap(bug.stat)}>"
@config.frontend.puts buf
@@ -573,8 +575,10 @@ Pin-Priority: #{pin_pri}
stat_str_ary = []
bugs_statistics.each { |pkg, num|
if num > 0
- # TRANSLATORS: the %s is the package name, and the %d is the number of bugs found for that package.
- buf = sprintf(ngettext("%s(%d bug)", "%s(%d bugs)", num), pkg, num)
+ # TRANSLATORS: %{nbugs} is the number of bugs found for package %{packg}.
+ buf = ngettext("%{packg}(%{nbugs} bug)",
+ "%{packg}(%{nbugs} bugs)", num) % {:packg => pkg,
+ :nbugs => num}
stat_str_ary << buf
end
}
--
apt-listbugs development tree
More information about the Apt-listbugs-commits
mailing list