summaryrefslogtreecommitdiff
path: root/portato
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xportato.py4
-rw-r--r--portato/backend/catapult/package.py1
-rw-r--r--portato/backend/catapult/system.py1
-rw-r--r--portato/backend/flags.py1
-rw-r--r--portato/backend/portage/package.py1
-rw-r--r--portato/backend/portage/system.py1
-rw-r--r--portato/config_parser.py1
-rw-r--r--portato/gui/__init__.py1
-rw-r--r--portato/gui/dialogs.py2
-rw-r--r--portato/gui/exception_handling.py2
-rw-r--r--portato/gui/queue.py2
-rw-r--r--portato/gui/session.py2
-rw-r--r--portato/gui/updater.py2
-rw-r--r--portato/gui/utils.py2
-rw-r--r--portato/gui/views.py2
-rw-r--r--portato/gui/windows/main.py2
-rw-r--r--portato/gui/windows/plugin.py2
-rw-r--r--portato/gui/windows/preference.py2
-rw-r--r--portato/gui/windows/search.py2
-rw-r--r--portato/gui/windows/splash.py1
-rw-r--r--portato/gui/windows/update.py2
-rw-r--r--portato/gui/wrapper.py2
-rw-r--r--portato/helper.py1
-rw-r--r--portato/plistener.py1
-rw-r--r--portato/plugin.py1
-rw-r--r--portato/plugins/etc_proposals.py1
-rw-r--r--portato/plugins/notify.py1
-rw-r--r--portato/plugins/resume_loop.py1
-rw-r--r--portato/session.py2
29 files changed, 15 insertions, 31 deletions
diff --git a/portato.py b/portato.py
index c7cea74..9a068ad 100755
--- a/portato.py
+++ b/portato.py
@@ -24,9 +24,7 @@ from portato.constants import VERSION, XSD_LOCATION, LOCALE_DIR, APP, SU_COMMAND
def main ():
# set gettext stuff
locale.setlocale(locale.LC_ALL, '')
- gettext.bindtextdomain(APP, LOCALE_DIR)
- gettext.textdomain(APP)
- _ = gettext.lgettext
+ gettext.install(APP, LOCALE_DIR, unicode = True)
# build the parser
desc = "Portato - A Portage GUI."
diff --git a/portato/backend/catapult/package.py b/portato/backend/catapult/package.py
index ea5cdda..2e4f471 100644
--- a/portato/backend/catapult/package.py
+++ b/portato/backend/catapult/package.py
@@ -22,7 +22,6 @@ import dbus
import catapult
import os.path
-from gettext import lgettext as _
class CatapultPackage(Package):
diff --git a/portato/backend/catapult/system.py b/portato/backend/catapult/system.py
index 7584d13..3a3bac5 100644
--- a/portato/backend/catapult/system.py
+++ b/portato/backend/catapult/system.py
@@ -13,7 +13,6 @@
from __future__ import absolute_import
import re, os
-from gettext import lgettext as _
from threading import Event
import dbus
import catapult
diff --git a/portato/backend/flags.py b/portato/backend/flags.py
index 163a4f7..d388e08 100644
--- a/portato/backend/flags.py
+++ b/portato/backend/flags.py
@@ -15,7 +15,6 @@ from __future__ import absolute_import, with_statement
import os
import os.path
from subprocess import Popen, PIPE # needed for grep
-from gettext import lgettext as _
from . import system, is_package
from ..helper import debug, error, unique_array
diff --git a/portato/backend/portage/package.py b/portato/backend/portage/package.py
index 767df5b..591afd6 100644
--- a/portato/backend/portage/package.py
+++ b/portato/backend/portage/package.py
@@ -21,7 +21,6 @@ from ...helper import debug, error, unique_array
import portage, portage_dep
import os.path
-from gettext import lgettext as _
class PortagePackage (Package):
"""This is a class abstracting a normal package which can be installed for the portage-system."""
diff --git a/portato/backend/portage/system.py b/portato/backend/portage/system.py
index 13ec76e..ae17d75 100644
--- a/portato/backend/portage/system.py
+++ b/portato/backend/portage/system.py
@@ -13,7 +13,6 @@
from __future__ import absolute_import
import re, os
-from gettext import lgettext as _
import portage
from .package import PortagePackage
diff --git a/portato/config_parser.py b/portato/config_parser.py
index ee838b2..1383d69 100644
--- a/portato/config_parser.py
+++ b/portato/config_parser.py
@@ -44,7 +44,6 @@ from __future__ import absolute_import, with_statement
__docformat__ = "restructuredtext"
import re
-from gettext import lgettext as _
from threading import Lock
from .helper import debug, error
diff --git a/portato/gui/__init__.py b/portato/gui/__init__.py
index ba7bb3e..20bcba6 100644
--- a/portato/gui/__init__.py
+++ b/portato/gui/__init__.py
@@ -12,7 +12,6 @@
from __future__ import absolute_import
-from ..helper import _
from .. import get_listener
from .exception_handling import register_ex_handler
diff --git a/portato/gui/dialogs.py b/portato/gui/dialogs.py
index 1beb6be..0313cae 100644
--- a/portato/gui/dialogs.py
+++ b/portato/gui/dialogs.py
@@ -11,7 +11,7 @@
# Written by René 'Necoro' Neumann <necoro@necoro.net>
import gtk
-from ..helper import _, error
+from ..helper import error
def queue_not_empty_dialog():
dialog = gtk.MessageDialog(None, gtk.DIALOG_MODAL, gtk.MESSAGE_QUESTION, gtk.BUTTONS_NONE, _("There are some packages in the emerge queue and/or an emerge process is running.\nDo you really want to quit?"))
diff --git a/portato/gui/exception_handling.py b/portato/gui/exception_handling.py
index 33e58ab..d8ff7ba 100644
--- a/portato/gui/exception_handling.py
+++ b/portato/gui/exception_handling.py
@@ -19,7 +19,7 @@ import sys, traceback
from threading import Thread
from StringIO import StringIO
-from ..helper import _, debug, error
+from ..helper import debug, error
from .dialogs import file_chooser_dialog, io_ex_dialog
class GtkThread (Thread):
diff --git a/portato/gui/queue.py b/portato/gui/queue.py
index 40b765d..f203920 100644
--- a/portato/gui/queue.py
+++ b/portato/gui/queue.py
@@ -20,7 +20,7 @@ from subprocess import Popen
# some backend things
from .. import backend, plugin
from ..backend import flags, system
-from ..helper import _, debug, info, send_signal_to_group, unique_array
+from ..helper import debug, info, send_signal_to_group, unique_array
from ..waiting_queue import WaitingQueue
from .updater import Updater
diff --git a/portato/gui/session.py b/portato/gui/session.py
index e356fbd..a37cd85 100644
--- a/portato/gui/session.py
+++ b/portato/gui/session.py
@@ -10,7 +10,7 @@
#
# Written by René 'Necoro' Neumann <necoro@necoro.net>
-from ..helper import _, debug
+from ..helper import debug
# the current version for saved sessions
# change this, whenever the change is incompatible with previous versions
diff --git a/portato/gui/updater.py b/portato/gui/updater.py
index d6087ee..f293fbc 100644
--- a/portato/gui/updater.py
+++ b/portato/gui/updater.py
@@ -15,7 +15,7 @@ from __future__ import absolute_import
from ..backend import system
import threading, subprocess, time
-from ..helper import _, debug, error
+from ..helper import debug, error
class Updater (object):
"""
diff --git a/portato/gui/utils.py b/portato/gui/utils.py
index a6bd800..151ec22 100644
--- a/portato/gui/utils.py
+++ b/portato/gui/utils.py
@@ -21,7 +21,7 @@ from functools import wraps
# some backend things
from ..backend import flags, system, set_system
-from ..helper import _, debug, info, set_log_level
+from ..helper import debug, info, set_log_level
from ..constants import USE_CATAPULT
# parser
diff --git a/portato/gui/views.py b/portato/gui/views.py
index 41e6ae5..bd98ad8 100644
--- a/portato/gui/views.py
+++ b/portato/gui/views.py
@@ -17,7 +17,7 @@ import pango
import gtksourceview2
import logging
-from ..helper import _, warning
+from ..helper import warning
class LazyView (object):
def __init__ (self):
diff --git a/portato/gui/windows/main.py b/portato/gui/windows/main.py
index 14a0181..32b6660 100644
--- a/portato/gui/windows/main.py
+++ b/portato/gui/windows/main.py
@@ -23,7 +23,7 @@ import itertools as itt
# our backend stuff
from ...backend import flags, system # must be the first to avoid circular deps
from ... import get_listener, plugin, dependency
-from ...helper import debug, warning, error, info, unique_array, N_, _
+from ...helper import debug, warning, error, info, unique_array
from ...session import Session
from ...constants import CONFIG_LOCATION, VERSION, APP_ICON
from ...backend.exceptions import PackageNotFoundException, BlockedException
diff --git a/portato/gui/windows/plugin.py b/portato/gui/windows/plugin.py
index 672bff5..fb9446e 100644
--- a/portato/gui/windows/plugin.py
+++ b/portato/gui/windows/plugin.py
@@ -15,7 +15,7 @@ from __future__ import absolute_import
import gtk
from .basic import AbstractDialog
-from ...helper import _, debug
+from ...helper import debug
class PluginWindow (AbstractDialog):
diff --git a/portato/gui/windows/preference.py b/portato/gui/windows/preference.py
index 41db921..991e7b3 100644
--- a/portato/gui/windows/preference.py
+++ b/portato/gui/windows/preference.py
@@ -16,7 +16,7 @@ import gtk
from .basic import AbstractDialog
from ..dialogs import io_ex_dialog
-from ...helper import _, debug
+from ...helper import debug
class PreferenceWindow (AbstractDialog):
"""Window displaying some preferences."""
diff --git a/portato/gui/windows/search.py b/portato/gui/windows/search.py
index 6e34a0e..e776dd1 100644
--- a/portato/gui/windows/search.py
+++ b/portato/gui/windows/search.py
@@ -14,7 +14,7 @@ from __future__ import absolute_import
import gtk
from .basic import AbstractDialog
-from ...helper import _, debug
+from ...helper import debug
class SearchWindow (AbstractDialog):
"""A window showing the results of a search process."""
diff --git a/portato/gui/windows/splash.py b/portato/gui/windows/splash.py
index 52c2543..df19a9b 100644
--- a/portato/gui/windows/splash.py
+++ b/portato/gui/windows/splash.py
@@ -15,7 +15,6 @@ from __future__ import absolute_import
import gtk
from .basic import Window
-from ...helper import _
from ...constants import VERSION, APP_ICON
class SplashScreen (Window):
diff --git a/portato/gui/windows/update.py b/portato/gui/windows/update.py
index 8e4fad1..e369c49 100644
--- a/portato/gui/windows/update.py
+++ b/portato/gui/windows/update.py
@@ -17,7 +17,7 @@ from .basic import AbstractDialog
from ..dialogs import unmask_dialog, blocked_dialog
from ...backend import system
from ...backend.exceptions import PackageNotFoundException, BlockedException
-from ...helper import _, debug
+from ...helper import debug
class UpdateWindow (AbstractDialog):
diff --git a/portato/gui/wrapper.py b/portato/gui/wrapper.py
index 8be3b6a..2c492d4 100644
--- a/portato/gui/wrapper.py
+++ b/portato/gui/wrapper.py
@@ -13,7 +13,7 @@
from __future__ import absolute_import
import vte
-from ..helper import _,debug
+from ..helper import debug
class GtkTree (object):
"""The implementation of the abstract tree."""
diff --git a/portato/helper.py b/portato/helper.py
index 331bf9a..31e25d9 100644
--- a/portato/helper.py
+++ b/portato/helper.py
@@ -16,7 +16,6 @@ Some nice functions used in the program.
from __future__ import absolute_import
import os, signal, logging, grp
-from gettext import lgettext as _
debug = logging.getLogger("portatoLogger").debug
info = logging.getLogger("portatoLogger").info
diff --git a/portato/plistener.py b/portato/plistener.py
index 848e71e..1a5197a 100644
--- a/portato/plistener.py
+++ b/portato/plistener.py
@@ -14,7 +14,6 @@ from __future__ import absolute_import
import os
from subprocess import Popen
-from gettext import lgettext as _
try:
import pynotify
diff --git a/portato/plugin.py b/portato/plugin.py
index 08e651b..bf9dc91 100644
--- a/portato/plugin.py
+++ b/portato/plugin.py
@@ -17,7 +17,6 @@ from __future__ import absolute_import
import os, os.path
from xml.dom.minidom import parse
from lxml import etree
-from gettext import lgettext as _
from .constants import PLUGIN_DIR, XSD_LOCATION
from .helper import debug, info, warning, error, flatten
diff --git a/portato/plugins/etc_proposals.py b/portato/plugins/etc_proposals.py
index 62605c8..d5f707f 100644
--- a/portato/plugins/etc_proposals.py
+++ b/portato/plugins/etc_proposals.py
@@ -14,7 +14,6 @@ from portato.helper import error
import os
from subprocess import Popen
-from gettext import lgettext as _
PROG=["/usr/sbin/etc-proposals"]
diff --git a/portato/plugins/notify.py b/portato/plugins/notify.py
index 8bb0a87..78812b3 100644
--- a/portato/plugins/notify.py
+++ b/portato/plugins/notify.py
@@ -1,4 +1,3 @@
-from gettext import lgettext as _
import pynotify
from portato import get_listener
diff --git a/portato/plugins/resume_loop.py b/portato/plugins/resume_loop.py
index c4191a8..e4531d0 100644
--- a/portato/plugins/resume_loop.py
+++ b/portato/plugins/resume_loop.py
@@ -12,7 +12,6 @@
import pty, time
from subprocess import Popen, STDOUT
-from gettext import lgettext as _
from portato.backend import system
from portato.helper import debug, warning
diff --git a/portato/session.py b/portato/session.py
index 636e00a..6abd899 100644
--- a/portato/session.py
+++ b/portato/session.py
@@ -16,7 +16,7 @@ import os, os.path
from .config_parser import ConfigParser
from .constants import SESSION_DIR
-from .helper import _,debug, info
+from .helper import debug, info
class Session (object):
"""