package apt-listchanges severity 318581 minor tags 238203 - help merge 318581 309470 238203 thanks
I confirm Junichi's patch fixes the two other bugs. I'm also re-attaching the patch after fixing a typo (s/linda/apt-listchanges) Kind Regards, -- Nekral
diff -rauN ../orig/apt-listchanges-2.59/apt-listchanges ./apt-listchanges-2.59/apt-listchanges --- ../orig/apt-listchanges-2.59/apt-listchanges 2004-11-14 02:34:08.000000000 +0100 +++ ./apt-listchanges-2.59/apt-listchanges 2006-02-15 00:06:06.000000000 +0100 @@ -29,6 +29,7 @@ import sys import apt_pkg import gettext +import locale import string import anydbm import DebianControlParser @@ -37,7 +38,13 @@ def main(): try: - _ = gettext.translation('apt-listchanges').gettext + # This is for python 2.3 compatibility. + # Replace with "_ = gettext.translation('apt-listchanges').lgettext" line for python2.4 + gettext_encoding=locale.getpreferredencoding() + my_ugettext = gettext.translation('apt-listchanges').ugettext + def lgettext(msgid): + return my_ugettext(msgid).encode(gettext_encoding) + _ = lgettext except IOError: _ = lambda str: str diff -rauN ../orig/apt-listchanges-2.59/apt_listchanges.py ./apt-listchanges-2.59/apt_listchanges.py --- ../orig/apt-listchanges-2.59/apt_listchanges.py 2005-02-13 20:48:03.000000000 +0100 +++ ./apt-listchanges-2.59/apt_listchanges.py 2006-02-15 00:06:24.000000000 +0100 @@ -23,7 +23,13 @@ locale.setlocale(locale.LC_ALL,'') try: - _ = gettext.translation('apt-listchanges').gettext + # This is for python 2.3 compatibility. + # Replace with "_ = gettext.translation('apt-listchanges').lgettext" line for python2.4 + gettext_encoding=locale.getpreferredencoding() + my_ugettext = gettext.translation('apt-listchanges').ugettext + def lgettext(msgid): + return my_ugettext(msgid).encode(gettext_encoding) + _ = lgettext except IOError: _ = lambda str: str