backend/satellite_tools/disk_dumper/iss.py |
3 ++-
backend/satellite_tools/satsync.py |
3 ++-
client/rhel/rhn-client-tools/src/bin/rhn-profile-sync.py |
3 ++-
client/rhel/rhn-client-tools/src/bin/rhn_register.py |
3 ++-
client/rhel/rhn-client-tools/src/bin/rhnreg_ks.py |
3 ++-
client/rhel/rhn-client-tools/src/bin/spacewalk-channel.py |
4 ++--
client/rhel/rhn-client-tools/src/firstboot-legacy-rhel5/rhn_choose_server_gui.py |
4 ++--
client/rhel/rhn-client-tools/src/firstboot-legacy-rhel5/rhn_create_profile_gui.py |
4 ++--
client/rhel/rhn-client-tools/src/firstboot-legacy-rhel5/rhn_finish_gui.py |
5 ++---
client/rhel/rhn-client-tools/src/firstboot-legacy-rhel5/rhn_login_gui.py |
9 ++-------
client/rhel/rhn-client-tools/src/firstboot-legacy-rhel5/rhn_provide_certificate_gui.py |
5 ++---
client/rhel/rhn-client-tools/src/firstboot-legacy-rhel5/rhn_review_gui.py |
5 ++---
client/rhel/rhn-client-tools/src/firstboot-legacy-rhel5/rhn_start_gui.py |
5 ++---
client/rhel/rhn-client-tools/src/up2date_client/capabilities.py |
3 ++-
client/rhel/rhn-client-tools/src/up2date_client/config.py |
3 ++-
client/rhel/rhn-client-tools/src/up2date_client/gui.py |
3 ++-
client/rhel/rhn-client-tools/src/up2date_client/hardware.py |
3 ++-
client/rhel/rhn-client-tools/src/up2date_client/messageWindow.py |
3 ++-
client/rhel/rhn-client-tools/src/up2date_client/rhnChannel.py |
6 ++----
client/rhel/rhn-client-tools/src/up2date_client/rhncli.py |
4 ++--
client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py |
4 ++--
client/rhel/rhn-client-tools/src/up2date_client/rhnregGui.py |
4 ++--
client/rhel/rhn-client-tools/src/up2date_client/rhnreg_constants.py |
3 ++-
client/rhel/rhn-client-tools/src/up2date_client/rpcServer.py |
4 ++--
client/rhel/rhn-client-tools/src/up2date_client/rpmUtils.py |
4 ++--
client/rhel/rhn-client-tools/src/up2date_client/tui.py |
4 ++--
client/rhel/rhn-client-tools/src/up2date_client/up2dateErrors.py |
3 ++-
client/rhel/rhn-client-tools/src/up2date_client/up2dateUtils.py |
6 ++----
client/rhel/yum-rhn-plugin/rhnplugin.py |
3 ++-
client/tools/rhn-virtualization/virtualization/poller.py |
4 ++--
client/tools/rhn-virtualization/virtualization/support.py |
5 ++---
31 files changed, 62 insertions(+), 63 deletions(-)
New commits:
commit ceb71f81a3b64d8a71781f65f9d82b88340601e8
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Mar 10 14:02:42 2011 +0100
683546 - optparse isn't friendly to translations in unicode
addressing:
d64:~ # export LANG=de_DE.UTF-8
d64:~ # rhnreg_ks --help
Ein Fehler trat auf:
<type 'exceptions.UnicodeDecodeError'>
Siehe /var/log/up2date für weitere Informationen
/var/log/up2date:
[Mon Jan 17 11:51:00 2011] up2date
Traceback (most recent call last):
File "/usr/sbin/rhnreg_ks", line 205, in <module>
cli.run()
File "rhncli.py", line 73, in run
File "rhncli.py", line 112, in initialize
File "/usr/lib64/python2.6/optparse.py", line 1378, in parse_args
stop = self._process_args(largs, rargs, values)
File "/usr/lib64/python2.6/optparse.py", line 1418, in _process_args
self._process_long_opt(rargs, values)
File "/usr/lib64/python2.6/optparse.py", line 1493, in _process_long_opt
option.process(opt, value, values, self)
File "/usr/lib64/python2.6/optparse.py", line 782, in process
self.action, self.dest, opt, value, values, parser)
File "/usr/lib64/python2.6/optparse.py", line 804, in take_action
parser.print_help()
File "/usr/lib64/python2.6/optparse.py", line 1648, in print_help
file.write(self.format_help().encode(encoding, "replace"))
<type 'exceptions.UnicodeDecodeError'>: 'ascii' codec can't
decode byte 0xc3 in
position 781: ordinal not in range(128)
diff --git a/backend/satellite_tools/disk_dumper/iss.py
b/backend/satellite_tools/disk_dumper/iss.py
index 06ef7da..0cd6e44 100644
--- a/backend/satellite_tools/disk_dumper/iss.py
+++ b/backend/satellite_tools/disk_dumper/iss.py
@@ -33,7 +33,8 @@ import iss_isos
from spacewalk.common.checksum import getFileChecksum
import gettext
-_ = gettext.gettext
+t = gettext.translation('spacewalk-backend-server', fallback=True)
+_ = t.ugettext
class ISSError(Exception):
def __init__(self, msg, tb):
diff --git a/backend/satellite_tools/satsync.py b/backend/satellite_tools/satsync.py
index 39fed19..1506242 100644
--- a/backend/satellite_tools/satsync.py
+++ b/backend/satellite_tools/satsync.py
@@ -29,7 +29,8 @@ import locale
from optparse import Option, OptionParser
import gettext
-_ = gettext.gettext
+t = gettext.translation('spacewalk-backend-server', fallback=True)
+_ = t.ugettext
# __rhn imports__
from spacewalk.common import CFG, initCFG, initLOG, exitWithTraceback, rhnMail, \
diff --git a/client/rhel/rhn-client-tools/src/bin/rhn-profile-sync.py
b/client/rhel/rhn-client-tools/src/bin/rhn-profile-sync.py
index 2ed2dcb..ee8f8e9 100644
--- a/client/rhel/rhn-client-tools/src/bin/rhn-profile-sync.py
+++ b/client/rhel/rhn-client-tools/src/bin/rhn-profile-sync.py
@@ -12,7 +12,8 @@
import sys
import gettext
-_ = gettext.gettext
+t = gettext.translation('rhn-client-tools', fallback=True)
+_ = t.ugettext
sys.path.append("/usr/share/rhn/")
diff --git a/client/rhel/rhn-client-tools/src/bin/rhn_register.py
b/client/rhel/rhn-client-tools/src/bin/rhn_register.py
index 7116dfd..568d82c 100644
--- a/client/rhel/rhn-client-tools/src/bin/rhn_register.py
+++ b/client/rhel/rhn-client-tools/src/bin/rhn_register.py
@@ -14,7 +14,8 @@ import sys
import os
import gettext
-_ = gettext.gettext
+t = gettext.translation('rhn-client-tools', fallback=True)
+_ = t.ugettext
sys.path.append("/usr/share/rhn/")
diff --git a/client/rhel/rhn-client-tools/src/bin/rhnreg_ks.py
b/client/rhel/rhn-client-tools/src/bin/rhnreg_ks.py
index e1b6c4d..072f69b 100755
--- a/client/rhel/rhn-client-tools/src/bin/rhnreg_ks.py
+++ b/client/rhel/rhn-client-tools/src/bin/rhnreg_ks.py
@@ -24,7 +24,8 @@ import sys
import os
import gettext
-_ = gettext.gettext
+t = gettext.translation('rhn-client-tools', fallback=True)
+_ = t.ugettext
sys.path.append("/usr/share/rhn/")
diff --git a/client/rhel/rhn-client-tools/src/bin/spacewalk-channel.py
b/client/rhel/rhn-client-tools/src/bin/spacewalk-channel.py
index b798b4f..f1b1cde 100644
--- a/client/rhel/rhn-client-tools/src/bin/spacewalk-channel.py
+++ b/client/rhel/rhn-client-tools/src/bin/spacewalk-channel.py
@@ -25,8 +25,8 @@ from rhn import rpclib
from optparse import Option, OptionParser
import gettext
-_ = gettext.gettext
-gettext.textdomain("rhn-client-tools")
+t = gettext.translation('rhn-client-tools', fallback=True)
+_ = t.ugettext
def systemExit(code, msgs=None):
"Exit with a code and optional message(s). Saved a few lines of code."
diff --git
a/client/rhel/rhn-client-tools/src/firstboot-legacy-rhel5/rhn_choose_server_gui.py
b/client/rhel/rhn-client-tools/src/firstboot-legacy-rhel5/rhn_choose_server_gui.py
index 83f88ab..7865c2b 100644
--- a/client/rhel/rhn-client-tools/src/firstboot-legacy-rhel5/rhn_choose_server_gui.py
+++ b/client/rhel/rhn-client-tools/src/firstboot-legacy-rhel5/rhn_choose_server_gui.py
@@ -29,9 +29,9 @@ from rhn_register_firstboot_gui_window import
RhnRegisterFirstbootGuiWindow
import gtk
from gtk import glade
import gettext
-_ = gettext.gettext
+t = gettext.translation('rhn-client-tools', fallback=True)
+_ = t.ugettext
-gettext.textdomain("rhn-client-tools")
gtk.glade.bindtextdomain("rhn-client-tools")
diff --git
a/client/rhel/rhn-client-tools/src/firstboot-legacy-rhel5/rhn_create_profile_gui.py
b/client/rhel/rhn-client-tools/src/firstboot-legacy-rhel5/rhn_create_profile_gui.py
index e49b520..d35218c 100644
--- a/client/rhel/rhn-client-tools/src/firstboot-legacy-rhel5/rhn_create_profile_gui.py
+++ b/client/rhel/rhn-client-tools/src/firstboot-legacy-rhel5/rhn_create_profile_gui.py
@@ -37,8 +37,8 @@ import up2dateErrors
import messageWindow
import gettext
-_ = gettext.gettext
-gettext.textdomain("rhn-client-tools")
+t = gettext.translation('rhn-client-tools', fallback=True)
+_ = t.ugettext
gtk.glade.bindtextdomain("rhn-client-tools")
diff --git a/client/rhel/rhn-client-tools/src/firstboot-legacy-rhel5/rhn_finish_gui.py
b/client/rhel/rhn-client-tools/src/firstboot-legacy-rhel5/rhn_finish_gui.py
index fa4c6ce..ef22afe 100644
--- a/client/rhel/rhn-client-tools/src/firstboot-legacy-rhel5/rhn_finish_gui.py
+++ b/client/rhel/rhn-client-tools/src/firstboot-legacy-rhel5/rhn_finish_gui.py
@@ -28,9 +28,8 @@ import config
import gtk
from gtk import glade
import gettext
-_ = gettext.gettext
-
-gettext.textdomain("rhn-client-tools")
+t = gettext.translation('rhn-client-tools', fallback=True)
+_ = t.ugettext
gtk.glade.bindtextdomain("rhn-client-tools")
diff --git a/client/rhel/rhn-client-tools/src/firstboot-legacy-rhel5/rhn_login_gui.py
b/client/rhel/rhn-client-tools/src/firstboot-legacy-rhel5/rhn_login_gui.py
index 7bd11b0..267c44c 100644
--- a/client/rhel/rhn-client-tools/src/firstboot-legacy-rhel5/rhn_login_gui.py
+++ b/client/rhel/rhn-client-tools/src/firstboot-legacy-rhel5/rhn_login_gui.py
@@ -34,14 +34,9 @@ sys.path.insert(1,"/usr/share/rhn")
import rhnreg
import rhnregGui
-
-##
-## I18N
-##
import gettext
-_ = gettext.gettext
-
-gettext.textdomain("rhn-client-tools")
+t = gettext.translation('rhn-client-tools', fallback=True)
+_ = t.ugettext
gtk.glade.bindtextdomain("rhn-client-tools", "/usr/share/locale")
diff --git
a/client/rhel/rhn-client-tools/src/firstboot-legacy-rhel5/rhn_provide_certificate_gui.py
b/client/rhel/rhn-client-tools/src/firstboot-legacy-rhel5/rhn_provide_certificate_gui.py
index 319d29a..41b8f73 100644
---
a/client/rhel/rhn-client-tools/src/firstboot-legacy-rhel5/rhn_provide_certificate_gui.py
+++
b/client/rhel/rhn-client-tools/src/firstboot-legacy-rhel5/rhn_provide_certificate_gui.py
@@ -29,9 +29,8 @@ from rhn_register_firstboot_gui_window import
RhnRegisterFirstbootGuiWindow
import gtk
from gtk import glade
import gettext
-_ = gettext.gettext
-
-gettext.textdomain("rhn-client-tools")
+t = gettext.translation('rhn-client-tools', fallback=True)
+_ = t.ugettext
gtk.glade.bindtextdomain("rhn-client-tools")
diff --git a/client/rhel/rhn-client-tools/src/firstboot-legacy-rhel5/rhn_review_gui.py
b/client/rhel/rhn-client-tools/src/firstboot-legacy-rhel5/rhn_review_gui.py
index 982a67f..8baaa1f 100644
--- a/client/rhel/rhn-client-tools/src/firstboot-legacy-rhel5/rhn_review_gui.py
+++ b/client/rhel/rhn-client-tools/src/firstboot-legacy-rhel5/rhn_review_gui.py
@@ -27,9 +27,8 @@ from rhn_register_firstboot_gui_window import
RhnRegisterFirstbootGuiWindow
import gtk
from gtk import glade
import gettext
-_ = gettext.gettext
-
-gettext.textdomain("rhn-client-tools")
+t = gettext.translation('rhn-client-tools', fallback=True)
+_ = t.ugettext
gtk.glade.bindtextdomain("rhn-client-tools")
diff --git a/client/rhel/rhn-client-tools/src/firstboot-legacy-rhel5/rhn_start_gui.py
b/client/rhel/rhn-client-tools/src/firstboot-legacy-rhel5/rhn_start_gui.py
index 0a587c2..5fd6f27 100644
--- a/client/rhel/rhn-client-tools/src/firstboot-legacy-rhel5/rhn_start_gui.py
+++ b/client/rhel/rhn-client-tools/src/firstboot-legacy-rhel5/rhn_start_gui.py
@@ -28,9 +28,8 @@ from rhn_register_firstboot_gui_window import
RhnRegisterFirstbootGuiWindow
import gtk
from gtk import glade
import gettext
-_ = gettext.gettext
-
-gettext.textdomain("rhn-client-tools")
+t = gettext.translation('rhn-client-tools', fallback=True)
+_ = t.ugettext
gtk.glade.bindtextdomain("rhn-client-tools")
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/capabilities.py
b/client/rhel/rhn-client-tools/src/up2date_client/capabilities.py
index 905b878..74f8cf9 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/capabilities.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/capabilities.py
@@ -5,7 +5,8 @@ import up2dateErrors
import string
import gettext
-_ = gettext.gettext
+t = gettext.translation('rhn-client-tools', fallback=True)
+_ = t.ugettext
# a dict with "capability name" as the key, and the version
# as the value.
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/config.py
b/client/rhel/rhn-client-tools/src/up2date_client/config.py
index 44d24e2..0c0330f 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/config.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/config.py
@@ -15,7 +15,8 @@ import os
import sys
import gettext
-_ = gettext.gettext
+t = gettext.translation('rhn-client-tools', fallback=True)
+_ = t.ugettext
# XXX: This could be moved in a more "static" location if it is too
# much of an eye sore
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/gui.py
b/client/rhel/rhn-client-tools/src/up2date_client/gui.py
index af8f204..a0d9509 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/gui.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/gui.py
@@ -24,7 +24,8 @@ import signal
import xmlrpclib
import gettext
-_ = gettext.gettext
+t = gettext.translation('rhn-client-tools', fallback=True)
+_ = t.ugettext
import up2dateErrors
import config
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/hardware.py
b/client/rhel/rhn-client-tools/src/up2date_client/hardware.py
index e384315..363a1e9 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/hardware.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/hardware.py
@@ -25,7 +25,8 @@ import config
import ethtool
import gettext
-_ = gettext.gettext
+t = gettext.translation('rhn-client-tools', fallback=True)
+_ = t.ugettext
import dbus
import dmidecode
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/messageWindow.py
b/client/rhel/rhn-client-tools/src/up2date_client/messageWindow.py
index 61f97e0..11dcc3a 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/messageWindow.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/messageWindow.py
@@ -3,7 +3,8 @@ import string
import gtk
import gettext
-_ = gettext.gettext
+t = gettext.translation('rhn-client-tools', fallback=True)
+_ = t.ugettext
# wrap a long line...
def wrap_line(line, max_line_size = 100):
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/rhnChannel.py
b/client/rhel/rhn-client-tools/src/up2date_client/rhnChannel.py
index 379e587..b6a94d4 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/rhnChannel.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/rhnChannel.py
@@ -7,11 +7,9 @@ import up2dateErrors
import config
import rhnserver
-
import gettext
-_ = gettext.gettext
-
-
+t = gettext.translation('rhn-client-tools', fallback=True)
+_ = t.ugettext
# heh, dont get much more generic than this...
class rhnChannel:
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/rhncli.py
b/client/rhel/rhn-client-tools/src/up2date_client/rhncli.py
index 72f4446..b3d1ccd 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/rhncli.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/rhncli.py
@@ -32,7 +32,8 @@ from OpenSSL import crypto
from rhn import rpclib
import gettext
-_ = gettext.gettext
+t = gettext.translation('rhn-client-tools', fallback=True)
+_ = t.ugettext
sys.path.append("/usr/share/rhn/")
@@ -56,7 +57,6 @@ _optionsTable = [
class RhnCli(object):
def __init__(self):
- gettext.textdomain("rhn-client-tools")
self.optparser = OptionParser(option_list = _optionsTable,
version = RhnCli.__versionString())
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py
b/client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py
index 1324d84..9843ee6 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py
@@ -31,8 +31,8 @@ except ImportError:
support = None
import gettext
-_ = gettext.gettext
-
+t = gettext.translation('rhn-client-tools', fallback=True)
+_ = t.ugettext
# global variables
YUM_PLUGIN_CONF = '/etc/yum/pluginconf.d/rhnplugin.conf'
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/rhnregGui.py
b/client/rhel/rhn-client-tools/src/up2date_client/rhnregGui.py
index bc4b7d8..686f521 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/rhnregGui.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/rhnregGui.py
@@ -40,8 +40,8 @@ import gobject
import sys
import os
import gettext
-_ = gettext.gettext
-gettext.textdomain("rhn-client-tools")
+t = gettext.translation('rhn-client-tools', fallback=True)
+_ = t.ugettext
gtk.glade.bindtextdomain("rhn-client-tools")
import rhnreg
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/rhnreg_constants.py
b/client/rhel/rhn-client-tools/src/up2date_client/rhnreg_constants.py
index bc70615..ba9a9d9 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/rhnreg_constants.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/rhnreg_constants.py
@@ -8,7 +8,8 @@
import gettext
-_ = gettext.gettext
+t = gettext.translation('rhn-client-tools', fallback=True)
+_ = t.ugettext
COPYRIGHT_TEXT = _("Copyright © 2006--2010 Red Hat, Inc. All rights
reserved.")
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/rpcServer.py
b/client/rhel/rhn-client-tools/src/up2date_client/rpcServer.py
index cffc917..4e255b0 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/rpcServer.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/rpcServer.py
@@ -19,8 +19,8 @@ import xmlrpclib
from rhn import rpclib
import gettext
-_ = gettext.gettext
-
+t = gettext.translation('rhn-client-tools', fallback=True)
+_ = t.ugettext
def stdoutMsgCallback(msg):
print msg
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/rpmUtils.py
b/client/rhel/rhn-client-tools/src/up2date_client/rpmUtils.py
index e8e3c1b..991616a 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/rpmUtils.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/rpmUtils.py
@@ -19,8 +19,8 @@ import rpm
import transaction
import gettext
-_ = gettext.gettext
-
+t = gettext.translation('rhn-client-tools', fallback=True)
+_ = t.ugettext
def installedHeaderByKeyword(**kwargs):
""" just cause this is such a potentially useful looking method...
"""
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/tui.py
b/client/rhel/rhn-client-tools/src/up2date_client/tui.py
index 627047d..345ae37 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/tui.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/tui.py
@@ -19,8 +19,8 @@ import sys
import string
import gettext
-_ = gettext.gettext
-gettext.textdomain("rhn-client-tools")
+t = gettext.translation('rhn-client-tools', fallback=True)
+_ = t.ugettext
import snack
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/up2dateErrors.py
b/client/rhel/rhn-client-tools/src/up2date_client/up2dateErrors.py
index ded7ea8..da0f529 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/up2dateErrors.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/up2dateErrors.py
@@ -9,7 +9,8 @@
import up2dateLog
import gettext
-_ = gettext.gettext
+t = gettext.translation('rhn-client-tools', fallback=True)
+_ = t.ugettext
import OpenSSL
import config
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/up2dateUtils.py
b/client/rhel/rhn-client-tools/src/up2date_client/up2dateUtils.py
index 117c9d0..b367fe0 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/up2dateUtils.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/up2dateUtils.py
@@ -12,11 +12,9 @@ import string
import up2dateErrors
import transaction
import config
-
-
import gettext
-_ = gettext.gettext
-
+t = gettext.translation('rhn-client-tools', fallback=True)
+_ = t.ugettext
def _getOSVersionAndRelease():
cfg = config.initUp2dateConfig()
diff --git a/client/rhel/yum-rhn-plugin/rhnplugin.py
b/client/rhel/yum-rhn-plugin/rhnplugin.py
index cc32716..d2ac6a7 100644
--- a/client/rhel/yum-rhn-plugin/rhnplugin.py
+++ b/client/rhel/yum-rhn-plugin/rhnplugin.py
@@ -23,7 +23,8 @@ except:
from iniparse import INIConfig
import gettext
-_ = gettext.gettext
+t = gettext.translation('yum-rhn-plugin', fallback=True)
+_ = t.ugettext
# TODO: Get the up2date stuff that we need in a better place,
# so we don't have to do path magic.
diff --git a/client/tools/rhn-virtualization/virtualization/poller.py
b/client/tools/rhn-virtualization/virtualization/poller.py
index 6c19a98..c54ec96 100644
--- a/client/tools/rhn-virtualization/virtualization/poller.py
+++ b/client/tools/rhn-virtualization/virtualization/poller.py
@@ -19,8 +19,8 @@ sys.path.append("/usr/share/rhn/")
import binascii
import traceback
import gettext
-_ = gettext.gettext
-gettext.textdomain("rhn-virtualization")
+t = gettext.translation('rhn-virtualization', fallback=True)
+_ = t.ugettext
try:
import libvirt
diff --git a/client/tools/rhn-virtualization/virtualization/support.py
b/client/tools/rhn-virtualization/virtualization/support.py
index 78a05b0..bc3704d 100755
--- a/client/tools/rhn-virtualization/virtualization/support.py
+++ b/client/tools/rhn-virtualization/virtualization/support.py
@@ -26,9 +26,8 @@ from virtualization.notification import Plan, \
from virtualization.domain_config import DomainConfig
from virtualization.domain_directory import DomainDirectory
import gettext
-_ = gettext.gettext
-gettext.textdomain("rhn-virtualization")
-
+t = gettext.translation('rhn-virtualization', fallback=True)
+_ = t.ugettext
try:
import libvirt