Commit f197358e authored by Philipp Hörist's avatar Philipp Hörist
Browse files

Import _() instead of using builtin namespace

- Prepare for removing the global installed _() method in builtins
- Sort some imports along the way
parent 8ace1f2b
......@@ -25,6 +25,7 @@
import nbxmpp
from gajim.common import app
from gajim.common.i18n import _
from gajim.common.modules import dataforms
from gajim.common import ged
......
......@@ -46,6 +46,7 @@
from gajim.common import exceptions
from gajim.common import caps_cache
from gajim.common import logger
from gajim.common.i18n import _
class GajimApplication(Gtk.Application):
......
......@@ -23,9 +23,11 @@
from gi.repository import Gdk
from gi.repository import GLib
from gajim import gtkgui_helpers
from gajim.common import helpers
from gajim.common import i18n
from gajim.common.i18n import _
from gajim import gtkgui_helpers
class AtomWindow:
window = None
......
......@@ -37,22 +37,24 @@
from nbxmpp.protocol import NS_JINGLE_RTP_AUDIO, NS_JINGLE_RTP_VIDEO
from nbxmpp.protocol import NS_JINGLE_ICE_UDP, NS_JINGLE_FILE_TRANSFER_5
from gajim import gtkgui_helpers
from gajim import gui_menu_builder
from gajim import message_control
from gajim import dialogs
from gajim.gtk.dialogs import ConfirmationDialog
from gajim.gtk.add_contact import AddNewContactWindow
from gajim.common import app
from gajim.common import helpers
from gajim.common import ged
from gajim.common import i18n
from gajim.common.i18n import _
from gajim.common.contacts import GC_Contact
from gajim.common.const import AvatarSize
from gajim.common.const import KindConstant
from gajim.common.const import Chatstate
from gajim import gtkgui_helpers
from gajim import gui_menu_builder
from gajim import message_control
from gajim import dialogs
from gajim.gtk.dialogs import ConfirmationDialog
from gajim.gtk.add_contact import AddNewContactWindow
from gajim.command_system.implementation.hosts import ChatCommands
from gajim.command_system.framework import CommandHost # pylint: disable=unused-import
from gajim.chat_control_base import ChatControlBase
......
......@@ -32,25 +32,29 @@
from gi.repository import GLib
from gi.repository import Gio
from gajim import gtkgui_helpers
from gajim import message_control
from gajim.gtk.dialogs import NonModalConfirmationDialog
from gajim.gtk.util import convert_rgb_to_hex
from gajim import notify
from gajim.gtk.emoji_chooser import emoji_chooser
from gajim.common import events
from gajim.common import app
from gajim.common import helpers
from gajim.common import ged
from gajim.common import i18n
from gajim.message_control import MessageControl
from gajim.conversation_textview import ConversationTextview
from gajim.message_textview import MessageTextView
from gajim.common.i18n import _
from gajim.common.contacts import GC_Contact
from gajim.common.connection_handlers_events import MessageOutgoingEvent
from gajim.common.const import StyleAttr
from gajim.common.const import Chatstate
from gajim import notify
from gajim import gtkgui_helpers
from gajim import message_control
from gajim.message_control import MessageControl
from gajim.conversation_textview import ConversationTextview
from gajim.message_textview import MessageTextView
from gajim.gtk.dialogs import NonModalConfirmationDialog
from gajim.gtk.util import convert_rgb_to_hex
from gajim.gtk.emoji_chooser import emoji_chooser
from gajim.command_system.implementation.middleware import ChatCommandProcessor
from gajim.command_system.implementation.middleware import CommandTools
......
......@@ -56,6 +56,7 @@
from gajim.common import gpg
from gajim.common import passwords
from gajim.common import idle
from gajim.common.i18n import _
from gajim.common.connection_handlers import *
from gajim.common.contacts import GC_Contact
from gajim.common import modules
......
......@@ -28,6 +28,7 @@
from gajim.common import helpers
from gajim.common import app
from gajim.common import i18n
from gajim.common.i18n import _
from gajim.common.modules import dataforms
from gajim.common.const import KindConstant, SSLError
from gajim.common.pep import SUPPORTED_PERSONAL_USER_EVENTS
......
......@@ -17,6 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with Gajim. If not, see <http://www.gnu.org/licenses/>.
from gajim.common.i18n import _
class PysqliteOperationalError(Exception):
"""
......
......@@ -27,7 +27,7 @@
from gi.repository import GLib
from gajim.common import app
from gajim.common.i18n import _
from gajim.common.jingle_transport import JingleTransportICEUDP
from gajim.common.jingle_content import contents, JingleContent, JingleContentSetupException
from gajim.common.connection_handlers_events import InformationEvent
......
......@@ -41,6 +41,7 @@
from gajim.common import exceptions
from gajim.common import app
from gajim.common import configpaths
from gajim.common.i18n import _
from gajim.common.const import (
JIDConstant, KindConstant, ShowConstant, TypeConstant,
SubscriptionConstant)
......
......@@ -18,6 +18,8 @@
import os
import sys
from gajim.common.i18n import _
def parseLogLevel(arg):
"""
Eiter numeric value or level name from logging module
......
......@@ -32,6 +32,7 @@
from gajim.common import app
from gajim.common import ged
from gajim.common.i18n import _
from gajim.common.nec import NetworkIncomingEvent
from gajim.common.connection_handlers_events import InformationEvent
from gajim.common.connection_handlers_events import MessageOutgoingEvent
......
......@@ -21,6 +21,7 @@
from gajim.common import app
from gajim.common import helpers
from gajim.common.i18n import _
from gajim.common.nec import NetworkIncomingEvent, NetworkEvent
from gajim.common.modules.security_labels import parse_securitylabel
from gajim.common.modules.user_nickname import parse_nickname
......
......@@ -19,6 +19,7 @@
import nbxmpp
from gajim.common import app
from gajim.common.i18n import _
from gajim.common.nec import NetworkEvent
from gajim.common.modules.user_nickname import parse_nickname
......
......@@ -20,6 +20,7 @@
from gajim.common import app
from gajim.common import helpers
from gajim.common.i18n import _
from gajim.common.nec import NetworkIncomingEvent
log = logging.getLogger('gajim.c.m.roster_item_exchange')
......
......@@ -19,6 +19,8 @@
gi.require_version('Gst', '1.0')
from gi.repository import Gst
from gajim.common.i18n import _
log = logging.getLogger('gajim.c.multimedia_helpers')
......
......@@ -30,6 +30,7 @@
from gajim.common import app
from gajim.common import caps_cache
from gajim.common.i18n import _
log = logging.getLogger('gajim.c.optparser')
......
......@@ -29,6 +29,7 @@
from gajim.common.protocol.bytestream import ConnectionSocks5BytestreamZeroconf
from gajim.common.zeroconf.zeroconf import Constant
from gajim.common import connection_handlers
from gajim.common.i18n import _
from gajim.common.nec import NetworkIncomingEvent, NetworkEvent
from gajim.common.modules.user_nickname import parse_nickname
from gajim.common.modules.misc import parse_eme
......
......@@ -44,6 +44,7 @@
from gajim.common import app
from gajim.common import ged
from gajim.common import modules
from gajim.common.i18n import _
from gajim.common.zeroconf import client_zeroconf
from gajim.common.zeroconf import zeroconf
from gajim.common.zeroconf.connection_handlers_zeroconf import *
......
......@@ -22,6 +22,7 @@
except ImportError:
pass
from gajim.common.i18n import _
from gajim.common.zeroconf.zeroconf import Constant, ConstantRI
from gajim.common.zeroconf.zeroconf_avahi_const import *
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment