[Apt-listbugs-commits] [SCM] apt-listbugs development tree branch, master, updated. 0.1.0-13-g667cc58
Ryan Niebur
ryanryan52 at gmail.com
Sun Oct 18 18:10:44 UTC 2009
The following commit has been merged in the master branch:
commit 667cc58858c6bfd01a6858ac3462aae15c230625
Author: Ryan Niebur <ryanryan52 at gmail.com>
Date: Sun Oct 18 11:10:33 2009 -0700
fix some strings to actually use translations. the problem before was that they were being 'gettext'ed during class loadtime, before gettext was initialized properly, so it didn't yet know that it was supposed to use the spanish/french/italian/whatever strings (at least that's my theory...and the solution supports my theory).
diff --git a/lib/apt-listbugs/logic.rb b/lib/apt-listbugs/logic.rb
index 4f0316a..ead7a66 100644
--- a/lib/apt-listbugs/logic.rb
+++ b/lib/apt-listbugs/logic.rb
@@ -682,11 +682,10 @@ end
module Factory
- Done = _("Done")
CONCURRENCY_LEVEL = 3
def done?(done)
- Done == done
+ _("Done") == done
end
def config
@@ -770,7 +769,7 @@ module Factory
pkgs[f["package"]] = f
}
if block_given?
- yield reading, Done
+ yield reading, _("Done")
end
pkgs
end
@@ -788,13 +787,11 @@ module Factory
module StatusFactory
extend Factory
- ReadStatusMsg = _("Reading package status...")
-
def create(pkgs, *args)
# creating status database, which contains the list of packages.
if block_given?
- yield ReadStatusMsg, "0%"
+ yield _("Reading package status..."), "0%"
end
pkgres = []
pkgs.each_key { |pkg|
@@ -804,12 +801,12 @@ module Factory
max=pkgres.size
step=(pkgres.size/100)*10+1
status = Debian::Packages.new(Debian::Dpkg::STATUS_FILE, pkgres) do
- yield ReadStatusMsg,
+ yield _("Reading package status..."),
"#{(i.to_f/max.to_f*100).to_i}%" if (i % step) == 0
i += 1
end
if block_given?
- yield ReadStatusMsg, Done
+ yield _("Reading package status..."), _("Done")
end
status
end
@@ -833,8 +830,6 @@ module Factory
module BugsFactory
extend Factory
- RetrvBTSMsg = _("Retrieving bug reports...")
-
def create(new_pkgs, *args, &progress)
cur_pkgs = args[0]
bugs = Debian::Bugs.new
@@ -844,7 +839,7 @@ module Factory
size = new_pkgs.size
mutex = Mutex.new
threads = []
- yield RetrvBTSMsg, "0%"
+ yield _("Retrieving bug reports..."), "0%"
begin
# obtain a list of package names
tmppkgs = []
@@ -852,7 +847,7 @@ module Factory
# send the list of package names and severity to be parsed.
bugs = config.parser.parse(tmppkgs, config.severity) { |pct|
- yield RetrvBTSMsg, pct
+ yield _("Retrieving bug reports..."), pct
}
rescue SOAP::HTTPStreamError => exception
config.frontend.puts _(" Fail")
@@ -885,10 +880,10 @@ module Factory
raise _("Exiting with error") if config.frontend.yes_or_no?(_("Abort the installation"))
bugs = []
end
- yield RetrvBTSMsg, "100%"
+ yield _("Retrieving bug reports..."), "100%"
if block_given?
- yield RetrvBTSMsg, Done
+ yield _("Retrieving bug reports..."), _("Done")
end
bugs
end
@@ -1061,15 +1056,13 @@ module Factory
val
end
- BugFixedParseMsg = _("Parsing Found/Fixed information...")
-
def delete_irrelevant_bugs (bugs, cur_pkgs, new_pkgs)
# Ignore bugs that do not apply to the installing version.
max=bugs.size
step=(max/100)*10+1
i=0
- yield BugFixedParseMsg, "0%"
+ yield _("Parsing Found/Fixed information..."), "0%"
bugs.delete_if { |bug|
val = false
@@ -1080,7 +1073,7 @@ module Factory
cur_ver = cur_pkgs[name]["version"] if cur_pkgs[name] != nil
# show progress
- yield BugFixedParseMsg,
+ yield _("Parsing Found/Fixed information..."),
"#{(i.to_f/max.to_f*100).to_i}%" if (i % step) == 0
i += 1
@@ -1088,8 +1081,8 @@ module Factory
bug.bug_number, bug.fixed, bug.found, bug.stat)
val
}
- yield BugFixedParseMsg, "100%"
- yield BugFixedParseMsg, Done
+ yield _("Parsing Found/Fixed information..."), "100%"
+ yield _("Parsing Found/Fixed information..."), _("Done")
bugs
end
--
apt-listbugs development tree
More information about the Apt-listbugs-commits
mailing list