[Apt-listbugs-commits] [apt-listbugs] 03/04: internationalize non-debug messages in aptcleanup
Francesco Poli
frx-guest at moszumanska.debian.org
Mon Jun 30 20:08:26 UTC 2014
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 5bf564aff227e43e874757a6f5ed94ad34be7c66
Author: Francesco Poli (wintermute) <invernomuto at paranoici.org>
Date: Mon Jun 30 22:01:51 2014 +0200
internationalize non-debug messages in aptcleanup
---
Makefile | 4 ++--
aptcleanup | 11 ++++++++---
debian/changelog | 1 +
3 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index 02b6012..b03874c 100644
--- a/Makefile
+++ b/Makefile
@@ -29,13 +29,13 @@ update-po: po/apt-listbugs.pot
msgfmt --statistics -v -c po/$$po.po -o /dev/null; \
done
-po/apt-listbugs.pot: apt-listbugs lib/apt-listbugs/logic.rb
+po/apt-listbugs.pot: apt-listbugs lib/apt-listbugs/logic.rb aptcleanup
rxgettext --add-comments=TRANSLATORS --no-wrap \
--copyright-holder="Masato Taruishi et al." \
--copyright-year=2002-$(YEAR) \
--package-name=apt-listbugs --package-version=$(VERSION) \
--msgid-bugs-address=$$DEBEMAIL \
- apt-listbugs lib/apt-listbugs/logic.rb \
+ apt-listbugs lib/apt-listbugs/logic.rb aptcleanup \
-o po/apt-listbugs.pot
.PHONY: call-for-translation
diff --git a/aptcleanup b/aptcleanup
index 41cf2f8..ff07ef2 100755
--- a/aptcleanup
+++ b/aptcleanup
@@ -30,6 +30,11 @@ else
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), "lib"))
end
+require 'gettext'
+include GetText
+
+GetText::bindtextdomain("apt-listbugs")
+
require 'debian/apt_preferences'
require 'tempfile'
@@ -44,10 +49,10 @@ rescue Errno::ENOENT
$stderr.puts sprintf("Cannot find %s: exiting!", pref_file) if $DEBUG
exit 0
rescue Errno::EACCES
- $stderr.puts "E: " + sprintf("Cannot read from %s", pref_file)
+ $stderr.puts _("E: ") + sprintf(_("Cannot read from %s"), pref_file)
exit 1
rescue
- $stderr.puts "E: " + "#{$!}"
+ $stderr.puts _("E: ") + "#{$!}"
exit 1
end
pinned_pkg_keys = []
@@ -107,7 +112,7 @@ $stderr.puts "Pinned packages: #{pinned_pkg_keys.sort.join(' ')}" if $DEBUG
$stderr.puts "Buggy packages : #{buggy_pkg_keys.sort.join(' ')}" if $DEBUG
if (pinned_pkg_keys - buggy_pkg_keys).size > 0
- $stderr.puts "Fixed packages : #{(pinned_pkg_keys - buggy_pkg_keys).sort.join(' ')}"
+ $stderr.puts _("Fixed packages : ") + (pinned_pkg_keys - buggy_pkg_keys).sort.join(' ')
end
# write out filtered preferences file
diff --git a/debian/changelog b/debian/changelog
index 4fec9d3..deb197e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -21,6 +21,7 @@ apt-listbugs (0.1.14) UNRELEASED; urgency=medium
- added file access error handling for cases where /etc/apt/preferences
does not exist or is not readable
- clarified one debug message
+ - internationalized non-debug messages
-- Francesco Poli (wintermute) <invernomuto at paranoici.org> Sun, 11 May 2014 16:45:18 +0200
--
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