Blame SOURCES/system-config-printer-utf8-971973.patch

0a882b
diff -up system-config-printer-1.4.1/applet.py.utf8-971973 system-config-printer-1.4.1/applet.py
0a882b
--- system-config-printer-1.4.1/applet.py.utf8-971973	2013-07-02 09:36:22.064027939 +0100
0a882b
+++ system-config-printer-1.4.1/applet.py	2013-07-02 09:36:31.200068904 +0100
0a882b
@@ -117,7 +117,7 @@ class NewPrinterNotification(dbus.servic
0a882b
                     device = "%s %s" % (mfg, mdl)
0a882b
                 else:
0a882b
                     device = des
0a882b
-                text = _("No printer driver for %s.") % device
0a882b
+                text = _("No printer driver for %s.").decode ('utf-8') % device
0a882b
             else:
0a882b
                 text = _("No driver for this printer.")
0a882b
             n = Notify.Notification.new (title, text, 'printer')
0a882b
@@ -202,7 +202,7 @@ class NewPrinterNotification(dbus.servic
0a882b
                                   lambda x, y: self.configure (x, y, name))
0a882b
             else: # Model mismatch
0a882b
                 devid = "MFG:%s;MDL:%s;DES:%s;CMD:%s;" % (mfg, mdl, des, cmd)
0a882b
-                text = (_("`%s' has been added, using the `%s' driver.") %
0a882b
+                text = (_("`%s' has been added, using the `%s' driver.").decode ('utf-8') %
0a882b
                         (name, driver))
0a882b
                 n = Notify.Notification.new (title, text, 'printer')
0a882b
                 if "actions" in Notify.get_server_caps():
0a882b
diff -up system-config-printer-1.4.1/asyncipp.py.utf8-971973 system-config-printer-1.4.1/asyncipp.py
0a882b
--- system-config-printer-1.4.1/asyncipp.py.utf8-971973	2013-07-02 09:36:22.056027904 +0100
0a882b
+++ system-config-printer-1.4.1/asyncipp.py	2013-07-02 09:36:31.200068904 +0100
0a882b
@@ -474,7 +474,7 @@ class _IPPAuthOperation:
0a882b
         if op == None:
0a882b
             d = authconn.AuthDialog (parent=conn.parent)
0a882b
         else:
0a882b
-            title = _("Authentication (%s)") % op
0a882b
+            title = _("Authentication (%s)").decode ('utf-8') % op
0a882b
             d = authconn.AuthDialog (title=title,
0a882b
                                      parent=conn.parent)
0a882b
 
0a882b
@@ -551,7 +551,7 @@ class _IPPAuthOperation:
0a882b
         if op == None:
0a882b
             msg = _("CUPS server error")
0a882b
         else:
0a882b
-            msg = _("CUPS server error (%s)") % op
0a882b
+            msg = _("CUPS server error (%s)").decode ('utf-8') % op
0a882b
 
0a882b
         d = Gtk.MessageDialog (self._conn.parent,
0a882b
                                Gtk.DialogFlags.MODAL |
0a882b
diff -up system-config-printer-1.4.1/authconn.py.utf8-971973 system-config-printer-1.4.1/authconn.py
0a882b
--- system-config-printer-1.4.1/authconn.py.utf8-971973	2013-07-02 09:36:22.051027881 +0100
0a882b
+++ system-config-printer-1.4.1/authconn.py	2013-07-02 09:36:31.200068904 +0100
0a882b
@@ -286,7 +286,8 @@ class Connection:
0a882b
             Gdk.threads_enter ()
0a882b
 
0a882b
         try:
0a882b
-            msg = _("CUPS server error (%s)") % self._operation_stack[0]
0a882b
+            msg = (_("CUPS server error (%s)").decode ('utf-8') %
0a882b
+                   self._operation_stack[0])
0a882b
         except IndexError:
0a882b
             msg = _("CUPS server error")
0a882b
 
0a882b
@@ -461,7 +462,8 @@ class Connection:
0a882b
         # Prompt.
0a882b
         if len (self._operation_stack) > 0:
0a882b
             try:
0a882b
-                title = _("Authentication (%s)") % self._operation_stack[0]
0a882b
+                title = (_("Authentication (%s)").decode ('utf-8') %
0a882b
+                         self._operation_stack[0])
0a882b
             except IndexError:
0a882b
                 title = _("Authentication")
0a882b
 
0a882b
diff -up system-config-printer-1.4.1/errordialogs.py.utf8-971973 system-config-printer-1.4.1/errordialogs.py
0a882b
--- system-config-printer-1.4.1/errordialogs.py.utf8-971973	2013-05-09 12:10:43.000000000 +0100
0a882b
+++ system-config-printer-1.4.1/errordialogs.py	2013-07-02 09:36:31.201068906 +0100
0a882b
@@ -2,7 +2,7 @@
0a882b
 
0a882b
 ## system-config-printer
0a882b
 
0a882b
-## Copyright (C) 2006, 2007, 2008, 2010 Red Hat, Inc.
0a882b
+## Copyright (C) 2006, 2007, 2008, 2010, 2013 Red Hat, Inc.
0a882b
 ## Authors:
0a882b
 ##  Florian Festi <ffesti@redhat.com>
0a882b
 ##  Tim Waugh <twaugh@redhat.com>
0a882b
@@ -52,7 +52,7 @@ def show_IPP_Error(exception, message, p
0a882b
     else:
0a882b
         title = _("CUPS server error")
0a882b
         text = (_("There was an error during the CUPS "
0a882b
-                  "operation: '%s'.")) % message
0a882b
+                  "operation: '%s'.").decode ('utf-8')) % message
0a882b
 
0a882b
     show_error_dialog (title, text, parent)
0a882b
 
0a882b
@@ -78,8 +78,8 @@ def show_HTTP_Error(status, parent=None)
0a882b
         elif status == -1:
0a882b
             msg = _("Not connected")
0a882b
         else:
0a882b
-            msg = _("status %s") % status
0a882b
+            msg = _("status %s").decode ('utf-8') % status
0a882b
 
0a882b
-        text = _("There was an HTTP error: %s.") % msg
0a882b
+        text = _("There was an HTTP error: %s.").decode ('utf-8') % msg
0a882b
 
0a882b
     show_error_dialog (title, text, parent)
0a882b
diff -up system-config-printer-1.4.1/jobviewer.py.utf8-971973 system-config-printer-1.4.1/jobviewer.py
0a882b
--- system-config-printer-1.4.1/jobviewer.py.utf8-971973	2013-07-02 09:36:22.064027939 +0100
0a882b
+++ system-config-printer-1.4.1/jobviewer.py	2013-07-02 09:36:31.201068906 +0100
0a882b
@@ -267,7 +267,7 @@ class CancelJobsOperation(GObject.GObjec
0a882b
         else:
0a882b
             operation = _("canceling job")
0a882b
 
0a882b
-        self.connection._begin_operation (operation)
0a882b
+        self.connection._begin_operation (operation.decode ('utf-8'))
0a882b
         self.connection.cancelJob (self.jobids[0], self.purge_job,
0a882b
                                    reply_handler=self.cancelJob_finish,
0a882b
                                    error_handler=self.cancelJob_error)
0a882b
@@ -502,7 +502,7 @@ class JobViewer (GtkGUI):
0a882b
                 title = _("my jobs")
0a882b
         else:
0a882b
             if specific_dests:
0a882b
-                title = "%s" % the_dests
0a882b
+                title = "%s" % the_dests.encode ('utf-8')
0a882b
             else:
0a882b
                 title = _("all jobs")
0a882b
         self.JobsWindow.set_title (_("Document Print Status (%s)") % title)
0a882b
@@ -971,7 +971,7 @@ class JobViewer (GtkGUI):
0a882b
 
0a882b
                 if try_keyring and auth_info != None:
0a882b
                     try:
0a882b
-                        c._begin_operation (_("authenticating job"))
0a882b
+                        c._begin_operation (_("authenticating job").decode ('utf-8'))
0a882b
                         c.authenticateJob (job, auth_info)
0a882b
                         c._end_operation ()
0a882b
                         self.update_monitor ()
0a882b
@@ -1053,7 +1053,7 @@ class JobViewer (GtkGUI):
0a882b
             return
0a882b
 
0a882b
         remember = False
0a882b
-        c._begin_operation (_("authenticating job"))
0a882b
+        c._begin_operation (_("authenticating job").decode ('utf-8'))
0a882b
         try:
0a882b
             c.authenticateJob (jobid, auth_info)
0a882b
             remember = dialog.get_remember_password ()
0a882b
@@ -1313,7 +1313,7 @@ class JobViewer (GtkGUI):
0a882b
             return
0a882b
 
0a882b
         for jobid in self.jobids:
0a882b
-            c._begin_operation (_("holding job"))
0a882b
+            c._begin_operation (_("holding job").decode ('utf-8'))
0a882b
             try:
0a882b
                 c.setJobHoldUntil (jobid, "indefinite")
0a882b
             except cups.IPPError, (e, m):
0a882b
@@ -1338,7 +1338,7 @@ class JobViewer (GtkGUI):
0a882b
             return
0a882b
 
0a882b
         for jobid in self.jobids:
0a882b
-            c._begin_operation (_("releasing job"))
0a882b
+            c._begin_operation (_("releasing job").decode ('utf-8'))
0a882b
             try:
0a882b
                 c.setJobHoldUntil (jobid, "no-hold")
0a882b
             except cups.IPPError, (e, m):
0a882b
@@ -2246,7 +2246,8 @@ class JobViewer (GtkGUI):
0a882b
                             os.environ["TZ"] = old_tz
0a882b
 
0a882b
                         local = time.localtime (simpletime)
0a882b
-                        state = _("Held until %s") % time.strftime ("%X", local)
0a882b
+                        state = (_("Held until %s") %
0a882b
+                                 time.strftime ("%X", local).encode ('utf-8'))
0a882b
                 except ValueError:
0a882b
                     pass
0a882b
             if until == "day-time":
0a882b
diff -up system-config-printer-1.4.1/newprinter.py.utf8-971973 system-config-printer-1.4.1/newprinter.py
0a882b
--- system-config-printer-1.4.1/newprinter.py.utf8-971973	2013-07-02 09:36:22.061027926 +0100
0a882b
+++ system-config-printer-1.4.1/newprinter.py	2013-07-02 09:36:31.202068908 +0100
0a882b
@@ -716,8 +716,7 @@ class NewPrinterGUI(GtkGUI):
0a882b
                 if scheme in ["socket", "lpd", "ipp"]:
0a882b
                     schemes.extend (["snmp", "dnssd"])
0a882b
                 self.fetchDevices_conn = asyncconn.Connection ()
0a882b
-                self.fetchDevices_conn._begin_operation (_("fetching device "
0a882b
-                                                           "list"))
0a882b
+                self.fetchDevices_conn._begin_operation (_("fetching device list").decode ('utf-8'))
0a882b
                 self.inc_spinner_task ()
0a882b
                 cupshelpers.getDevices (self.fetchDevices_conn,
0a882b
                                         include_schemes=schemes,
0a882b
@@ -946,7 +945,7 @@ class NewPrinterGUI(GtkGUI):
0a882b
                     repr (repo),
0a882b
                     repr (keyid)))
0a882b
 
0a882b
-        fmt = _("Installing driver %s" % name)
0a882b
+        fmt = _("Installing driver %s").decode ('utf-8') % name
0a882b
         self._installdialog = Gtk.MessageDialog (parent=self.NewPrinterWindow,
0a882b
                                                  flags=Gtk.DialogFlags.MODAL |
0a882b
                                                  Gtk.DialogFlags.DESTROY_WITH_PARENT,
0a882b
@@ -1986,7 +1985,7 @@ class NewPrinterGUI(GtkGUI):
0a882b
 
0a882b
     def start_fetching_devices (self):
0a882b
         self.fetchDevices_conn = asyncconn.Connection ()
0a882b
-        self.fetchDevices_conn._begin_operation (_("fetching device list"))
0a882b
+        self.fetchDevices_conn._begin_operation (_("fetching device list").decode ('utf-8'))
0a882b
         self.fetchDevices (network=False, current_uri=self.current_uri)
0a882b
         del self.current_uri
0a882b
 
0a882b
@@ -2625,7 +2624,8 @@ class NewPrinterGUI(GtkGUI):
0a882b
                     if queue[0] == '/':
0a882b
                         queue = queue[1:]
0a882b
 
0a882b
-                    device.menuentry = _("LPD/LPR queue '%s'") % queue
0a882b
+                    device.menuentry = (_("LPD/LPR queue '%s'").decode ('utf-8')
0a882b
+                                        % queue)
0a882b
                 else:
0a882b
                     device.menuentry = _("LPD/LPR queue")
0a882b
 
0a882b
@@ -2641,7 +2641,8 @@ class NewPrinterGUI(GtkGUI):
0a882b
                     if queue.startswith("printers/"):
0a882b
                         queue = queue[9:]
0a882b
                 if queue != '':
0a882b
-                    device.menuentry = _("IPP") + " (%s)" % queue
0a882b
+                    device.menuentry = (_("IPP").decode ('utf-8') +
0a882b
+                                        " (%s)" % queue)
0a882b
                 else:
0a882b
                     device.menuentry = _("IPP")
0a882b
             elif device.type == "http" or device.type == "https":
0a882b
@@ -2665,8 +2666,8 @@ class NewPrinterGUI(GtkGUI):
0a882b
                     elif name.find("._pdl-datastream") != -1:
0a882b
                         protocol = "AppSocket/JetDirect"
0a882b
                     if protocol != None:
0a882b
-                        device.menuentry = \
0a882b
-                            _("%s network printer via DNS-SD") % protocol
0a882b
+                        device.menuentry = (_("%s network printer via DNS-SD").decode ('utf-8')
0a882b
+                                            % protocol)
0a882b
                     else:
0a882b
                         device.menuentry = \
0a882b
                             _("Network printer via DNS-SD")
0a882b
@@ -3751,7 +3752,7 @@ class NewPrinterGUI(GtkGUI):
0a882b
                 # Foomatic database problem of some sort.
0a882b
                 err_title = _('Database error')
0a882b
                 err_text = _("The '%s' driver cannot be "
0a882b
-                             "used with printer '%s %s'.")
0a882b
+                             "used with printer '%s %s'.").decode ('utf-8')
0a882b
                 model, iter = (self.tvNPDrivers.get_selection().
0a882b
                                get_selected())
0a882b
                 nr = model.get_path(iter)[0]
0a882b
@@ -3761,7 +3762,7 @@ class NewPrinterGUI(GtkGUI):
0a882b
                     # installed by default.  Point the user at the
0a882b
                     # package they need to install.
0a882b
                     err = _("You will need to install the '%s' package "
0a882b
-                            "in order to use this driver.") % \
0a882b
+                            "in order to use this driver.").decode ('utf-8') % \
0a882b
                             "gutenprint-foomatic"
0a882b
                 else:
0a882b
                     err = err_text % (driver, self.NPMake, self.NPModel)
0a882b
@@ -3796,7 +3797,7 @@ class NewPrinterGUI(GtkGUI):
0a882b
         debugprint("ppd: " + repr(ppd))
0a882b
 
0a882b
         if isinstance(ppd, str) or isinstance(ppd, unicode):
0a882b
-            self.cups._begin_operation (_("fetching PPD"))
0a882b
+            self.cups._begin_operation (_("fetching PPD").decode ('utf-8'))
0a882b
             try:
0a882b
                 if ppd != "raw":
0a882b
                     f = self.cups.getServerPPD(ppd)
0a882b
@@ -3929,8 +3930,8 @@ class NewPrinterGUI(GtkGUI):
0a882b
             busy (self.NewPrinterWindow)
0a882b
             while Gtk.events_pending ():
0a882b
                 Gtk.main_iteration ()
0a882b
-            self.cups._begin_operation (_("adding printer %s") %
0a882b
-                                        name.encode ('utf-8'))
0a882b
+            self.cups._begin_operation (_("adding printer %s").decode ('utf-8')
0a882b
+                                        % name)
0a882b
             try:
0a882b
                 if isinstance(ppd, str) or isinstance(ppd, unicode):
0a882b
                     self.cups.addPrinter(name, ppdname=ppd,
0a882b
@@ -3957,8 +3958,8 @@ class NewPrinterGUI(GtkGUI):
0a882b
             self.cups._end_operation()
0a882b
             ready (self.NewPrinterWindow)
0a882b
         if self.dialog_mode in ("class", "printer", "printer_with_uri"):
0a882b
-            self.cups._begin_operation (_("modifying printer %s") %
0a882b
-                                        name.encode ('utf-8'))
0a882b
+            self.cups._begin_operation (_("modifying printer %s").decode ('utf-8')
0a882b
+                                        % name)
0a882b
             try:
0a882b
                 cupshelpers.activateNewPrinter (self.cups, name)
0a882b
                 self.cups.setPrinterLocation(name, location)
0a882b
@@ -3969,8 +3970,8 @@ class NewPrinterGUI(GtkGUI):
0a882b
                 return
0a882b
             self.cups._end_operation ()
0a882b
         elif self.dialog_mode == "device":
0a882b
-            self.cups._begin_operation (_("modifying printer %s") %
0a882b
-                                        name.encode ('utf-8'))
0a882b
+            self.cups._begin_operation (_("modifying printer %s").decode ('utf-8')
0a882b
+                                        % name)
0a882b
             try:
0a882b
                 uri = self.getDeviceURI()
0a882b
                 self.cups.addPrinter(name, device=uri)
0a882b
@@ -3987,8 +3988,8 @@ class NewPrinterGUI(GtkGUI):
0a882b
                     self.nextNPTab(-1)
0a882b
                     return
0a882b
 
0a882b
-            self.cups._begin_operation (_("modifying printer %s") %
0a882b
-                                        name.encode ('utf-8'))
0a882b
+            self.cups._begin_operation (_("modifying printer %s").decode ('utf-8')
0a882b
+                                        % name)
0a882b
             # set ppd on server and retrieve it
0a882b
             # cups doesn't offer a way to just download a ppd ;(=
0a882b
             raw = False
0a882b
diff -up system-config-printer-1.4.1/ppdsloader.py.utf8-971973 system-config-printer-1.4.1/ppdsloader.py
0a882b
--- system-config-printer-1.4.1/ppdsloader.py.utf8-971973	2013-07-02 09:36:22.053027890 +0100
0a882b
+++ system-config-printer-1.4.1/ppdsloader.py	2013-07-02 09:36:31.203068915 +0100
0a882b
@@ -151,7 +151,7 @@ class PPDsLoader(GObject.GObject):
0a882b
             self._cups_connect_reply(self._conn, None)
0a882b
 
0a882b
     def _cups_connect_reply (self, conn, UNUSED):
0a882b
-        conn._begin_operation (_("fetching PPDs"))
0a882b
+        conn._begin_operation (_("fetching PPDs").decode ('utf-8'))
0a882b
         conn.getPPDs2 (reply_handler=self._cups_reply,
0a882b
                        error_handler=self._cups_error)
0a882b
 
0a882b
diff -up system-config-printer-1.4.1/printerproperties.py.utf8-971973 system-config-printer-1.4.1/printerproperties.py
0a882b
--- system-config-printer-1.4.1/printerproperties.py.utf8-971973	2013-07-02 09:36:22.049027872 +0100
0a882b
+++ system-config-printer-1.4.1/printerproperties.py	2013-07-02 09:36:31.203068915 +0100
0a882b
@@ -1000,11 +1000,11 @@ class PrinterPropertiesDialog(GtkGUI):
0a882b
         name = printer.name
0a882b
 
0a882b
         if printer.is_class:
0a882b
-            self.cups._begin_operation (_("modifying class %s") %
0a882b
-                                        name.encode ('utf-8'))
0a882b
+            self.cups._begin_operation (_("modifying class %s").decode ('utf-8')
0a882b
+                                        % name)
0a882b
         else:
0a882b
-            self.cups._begin_operation (_("modifying printer %s") %
0a882b
-                                        name.encode ('utf-8'))
0a882b
+            self.cups._begin_operation (_("modifying printer %s").decode ('utf-8')
0a882b
+                                        % name)
0a882b
 
0a882b
         try:
0a882b
             if not printer.is_class and self.ppd:
0a882b
@@ -1112,7 +1112,7 @@ class PrinterPropertiesDialog(GtkGUI):
0a882b
             # but we have never fetched the server settings to see whether
0a882b
             # the server is publishing shared printers.  Fetch the settings
0a882b
             # now so that we can update the "not published" label if necessary.
0a882b
-            self.cups._begin_operation (_("fetching server settings"))
0a882b
+            self.cups._begin_operation (_("fetching server settings").decode ('utf-8'))
0a882b
             try:
0a882b
                 self.server_settings = self.cups.adminGetServerSettings()
0a882b
             except:
0a882b
@@ -1195,7 +1195,7 @@ class PrinterPropertiesDialog(GtkGUI):
0a882b
             return
0a882b
 
0a882b
         job_id = None
0a882b
-        c._begin_operation (_("printing test page"))
0a882b
+        c._begin_operation (_("printing test page").decode ('utf-8'))
0a882b
         try:
0a882b
             if custom_testpage and os.path.exists(custom_testpage):
0a882b
                 debugprint ('Printing custom test page ' + custom_testpage)
0a882b
@@ -1234,7 +1234,7 @@ class PrinterPropertiesDialog(GtkGUI):
0a882b
         (tmpfd, tmpfname) = tempfile.mkstemp ()
0a882b
         os.write (tmpfd, "#CUPS-COMMAND\n%s\n" % command)
0a882b
         os.close (tmpfd)
0a882b
-        self.cups._begin_operation (_("sending maintenance command"))
0a882b
+        self.cups._begin_operation (_("sending maintenance command").decode ('utf-8'))
0a882b
         try:
0a882b
             format = "application/vnd.cups-command"
0a882b
             job_id = self.cups.printTestPage (printer.name,
0a882b
@@ -1432,10 +1432,10 @@ class PrinterPropertiesDialog(GtkGUI):
0a882b
                     nonfatalException()
0a882b
                     option_editable = False
0a882b
                     show_error_dialog (_("Error"),
0a882b
-                                       _("Option '%s' has value '%s' "
0a882b
-                                         "and cannot be edited.") %
0a882b
-                                       (option.name.encode ('utf-8'),
0a882b
-                                        value.encode ('utf-8')),
0a882b
+                                       _("Option '%s' has value '%s' and "
0a882b
+                                         "cannot be edited.").decode ('utf-8') %
0a882b
+                                       (option.name,
0a882b
+                                        value),
0a882b
                                        self.parent)
0a882b
             option.widget.set_sensitive (option_editable)
0a882b
             if not editable:
0a882b
diff -up system-config-printer-1.4.1/pysmb.py.utf8-971973 system-config-printer-1.4.1/pysmb.py
0a882b
--- system-config-printer-1.4.1/pysmb.py.utf8-971973	2013-07-02 09:36:22.059027917 +0100
0a882b
+++ system-config-printer-1.4.1/pysmb.py	2013-07-02 09:36:31.203068915 +0100
0a882b
@@ -109,7 +109,8 @@ class AuthContext:
0a882b
         hbox.pack_start (image, False, False, 0)
0a882b
         vbox = Gtk.VBox (False, 12)
0a882b
         label = Gtk.Label(label='' +
0a882b
-                           _("You must log in to access %s.") % self.for_server +
0a882b
+                           _("You must log in to access %s.").decode ('utf-8')
0a882b
+                          % self.for_server +
0a882b
                            '')
0a882b
         label.set_use_markup (True)
0a882b
         label.set_alignment (0, 0)
0a882b
diff -up system-config-printer-1.4.1/serversettings.py.utf8-971973 system-config-printer-1.4.1/serversettings.py
0a882b
--- system-config-printer-1.4.1/serversettings.py.utf8-971973	2013-05-09 12:10:45.000000000 +0100
0a882b
+++ system-config-printer-1.4.1/serversettings.py	2013-07-02 09:36:31.204068921 +0100
0a882b
@@ -2,7 +2,7 @@
0a882b
 
0a882b
 ## system-config-printer
0a882b
 
0a882b
-## Copyright (C) 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.
0a882b
+## Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
0a882b
 ## Authors:
0a882b
 ##  Tim Waugh <twaugh@redhat.com>
0a882b
 
0a882b
@@ -194,7 +194,7 @@ class ServerSettings(GtkGUI):
0a882b
 
0a882b
     def _fillBasic(self):
0a882b
         self.changed = set()
0a882b
-        self.cupsconn._begin_operation (_("fetching server settings"))
0a882b
+        self.cupsconn._begin_operation (_("fetching server settings").decode ('utf-8'))
0a882b
         try:
0a882b
             self.server_settings = self.cupsconn.adminGetServerSettings()
0a882b
         except cups.IPPError, (e, m):
0a882b
@@ -511,7 +511,7 @@ class ServerSettings(GtkGUI):
0a882b
             (self.chkServerLogDebug, cups.CUPS_SERVER_DEBUG_LOGGING),]:
0a882b
             if not self.server_settings.has_key(setting): continue
0a882b
             setting_dict[setting] = str(int(widget.get_active()))
0a882b
-        self.cupsconn._begin_operation (_("modifying server settings"))
0a882b
+        self.cupsconn._begin_operation (_("modifying server settings").decode ('utf-8'))
0a882b
         try:
0a882b
             self.cupsconn.adminSetServerSettings(setting_dict)
0a882b
         except cups.IPPError, (e, m):
0a882b
diff -up system-config-printer-1.4.1/system-config-printer.py.utf8-971973 system-config-printer-1.4.1/system-config-printer.py
0a882b
--- system-config-printer-1.4.1/system-config-printer.py.utf8-971973	2013-07-02 09:36:22.062027931 +0100
0a882b
+++ system-config-printer-1.4.1/system-config-printer.py	2013-07-02 09:36:31.204068921 +0100
0a882b
@@ -664,10 +664,11 @@ class GUI(GtkGUI):
0a882b
         connected = bool(self.cups)
0a882b
 
0a882b
         host = CUPS_server_hostname ()
0a882b
-        self.PrintersWindow.set_title(_("Print Settings - %s") % host)
0a882b
+        self.PrintersWindow.set_title(_("Print Settings - %s")
0a882b
+                                      .decode ('utf-8') % host)
0a882b
 
0a882b
         if connected:
0a882b
-            status_msg = _("Connected to %s") % host
0a882b
+            status_msg = _("Connected to %s").decode ('utf-8') % host
0a882b
         else:
0a882b
             status_msg = _("Not connected")
0a882b
         self.statusbarMain.push(self.status_context_id, status_msg)
0a882b
@@ -718,7 +719,7 @@ class GUI(GtkGUI):
0a882b
         if self.cups:
0a882b
             kill_connection = False
0a882b
             self.cups._set_prompt_allowed (prompt_allowed)
0a882b
-            self.cups._begin_operation (_("obtaining queue details"))
0a882b
+            self.cups._begin_operation (_("obtaining queue details").decode ('utf-8'))
0a882b
             try:
0a882b
                 # get Printers
0a882b
                 self.printers = cupshelpers.getPrinters(self.cups)
0a882b
@@ -1028,8 +1029,8 @@ class GUI(GtkGUI):
0a882b
 
0a882b
         servername = self.cmbServername.get_child().get_text()
0a882b
 
0a882b
-        self.lblConnecting.set_markup(_("Opening connection to %s") %
0a882b
-                                      servername)
0a882b
+        self.lblConnecting.set_markup(_("Opening connection to %s")
0a882b
+                                      .decode ('utf-8') % servername)
0a882b
         self.ConnectingDialog.set_transient_for(self.PrintersWindow)
0a882b
         self.ConnectingDialog.show()
0a882b
         GLib.timeout_add (40, self.update_connecting_pbar)
0a882b
@@ -1195,7 +1196,7 @@ class GUI(GtkGUI):
0a882b
     def set_default_printer (self, name):
0a882b
         printer = self.printers[name]
0a882b
         reload = False
0a882b
-        self.cups._begin_operation (_("setting default printer"))
0a882b
+        self.cups._begin_operation (_("setting default printer").decode ('utf-8'))
0a882b
         try:
0a882b
             reload = printer.setAsDefault ()
0a882b
         except cups.HTTPError, (s,):
0a882b
@@ -1370,7 +1371,7 @@ class GUI(GtkGUI):
0a882b
         if not self.is_rename_possible (old_name):
0a882b
             return
0a882b
 
0a882b
-        self.cups._begin_operation (_("renaming printer"))
0a882b
+        self.cups._begin_operation (_("renaming printer").decode ('utf-8'))
0a882b
         rejecting = self.propertiesDlg.printer.rejecting
0a882b
         if not rejecting:
0a882b
             try:
0a882b
@@ -1523,11 +1524,11 @@ class GUI(GtkGUI):
0a882b
             obj = model.get_value (itr, 0)
0a882b
             name = model.get_value (itr, 2).decode ('utf-8')
0a882b
             if obj.is_class:
0a882b
-                message_format = (_("Really delete class '%s'?") %
0a882b
-                                  name.encode ('utf-8'))
0a882b
+                message_format = (_("Really delete class '%s'?").decode ('utf-8')
0a882b
+                                  % name)
0a882b
             else:
0a882b
-                message_format = (_("Really delete printer '%s'?") %
0a882b
-                                  name.encode ('utf-8'))
0a882b
+                message_format = (_("Really delete printer '%s'?").decode ('utf-8')
0a882b
+                                  % name)
0a882b
 
0a882b
             to_delete.append (name)
0a882b
         else:
0a882b
@@ -1554,8 +1555,8 @@ class GUI(GtkGUI):
0a882b
 
0a882b
         try:
0a882b
             for name in to_delete:
0a882b
-                self.cups._begin_operation (_("deleting printer %s") %
0a882b
-                                            name.encode ('utf-8'))
0a882b
+                self.cups._begin_operation (_("deleting printer %s").decode ('utf-8')
0a882b
+                                            % name)
0a882b
                 self.cups.deletePrinter (name)
0a882b
                 self.cups._end_operation ()
0a882b
         except cups.IPPError, (e, msg):
0a882b
@@ -1580,8 +1581,8 @@ class GUI(GtkGUI):
0a882b
 
0a882b
         for printer in printers:
0a882b
             print repr (printer.name)
0a882b
-            self.cups._begin_operation (_("modifying printer %s") %
0a882b
-                                        printer.name.encode ('utf-8'))
0a882b
+            self.cups._begin_operation (_("modifying printer %s").decode ('utf-8')
0a882b
+                                        % printer.name)
0a882b
             try:
0a882b
                 printer.setEnabled (enable)
0a882b
             except cups.IPPError, (e, m):
0a882b
@@ -1610,8 +1611,8 @@ class GUI(GtkGUI):
0a882b
 
0a882b
         success = False
0a882b
         for printer in printers:
0a882b
-            self.cups._begin_operation (_("modifying printer %s") %
0a882b
-                                        printer.name.encode ('utf-8'))
0a882b
+            self.cups._begin_operation (_("modifying printer %s").decode ('utf-8')
0a882b
+                                        % printer.name)
0a882b
             try:
0a882b
                 printer.setShared (share)
0a882b
                 success = True
0a882b
@@ -1954,8 +1955,8 @@ class GUI(GtkGUI):
0a882b
                 install_text = ('' +
0a882b
                                 _('Install driver') + '\n\n' +
0a882b
                                 _("Printer '%s' requires the %s package but "
0a882b
-                                  "it is not currently installed.") %
0a882b
-                                (name.encode ('utf-8'), pkg))
0a882b
+                                  "it is not currently installed.")
0a882b
+                                .decode ('utf-8') % (name, pkg))
0a882b
                 dialog = self.InstallDialog
0a882b
                 self.lblInstall.set_markup(install_text)
0a882b
                 dialog.set_transient_for (parent)
0a882b
@@ -1972,8 +1973,9 @@ class GUI(GtkGUI):
0a882b
                                    _("Printer '%s' requires the '%s' program "
0a882b
                                      "but it is not currently installed.  "
0a882b
                                      "Please install it before using this "
0a882b
-                                     "printer.") % (name.encode ('utf-8'),
0a882b
-                                                    (exes + pkgs)[0]),
0a882b
+                                     "printer.").decode ('utf-8') %
0a882b
+                                   (name,
0a882b
+                                    (exes + pkgs)[0]),
0a882b
                                    parent)
0a882b
 
0a882b
     def on_printer_modified (self, obj, name, ppd_has_changed):