[r22026]Remove some imports of locale where nothing it exports was used.
svn: r22043
This commit is contained in:
parent
7005b63a43
commit
7c2469a3ca
@ -30,7 +30,6 @@ from __future__ import unicode_literals
|
||||
# Python modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import locale
|
||||
import os
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
|
@ -32,7 +32,6 @@ Utility functions to cast types
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import os
|
||||
import locale
|
||||
import sys
|
||||
import logging
|
||||
LOG = logging.getLogger(".")
|
||||
|
@ -33,7 +33,6 @@ File and folder related utility functions
|
||||
#-------------------------------------------------------------------------
|
||||
import os
|
||||
import sys
|
||||
import locale
|
||||
import shutil
|
||||
import logging
|
||||
LOG = logging.getLogger(".gen.utils.file")
|
||||
|
@ -26,9 +26,6 @@
|
||||
# Python modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from gramps.gen.const import GRAMPS_LOCALE as glocale
|
||||
_ = glocale.translation.gettext
|
||||
import locale
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -42,6 +39,8 @@ from gi.repository import Gtk
|
||||
# GRAMPS modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from gramps.gen.const import GRAMPS_LOCALE as glocale
|
||||
_ = glocale.translation.gettext
|
||||
from ... import widgets
|
||||
from gramps.gen.lib import Date, Event, EventType
|
||||
from gramps.gen.datehandler import displayer
|
||||
|
@ -370,7 +370,6 @@ class ViewManager(CLIManager):
|
||||
from urllib2 import urlopen
|
||||
else:
|
||||
from urllib.request import urlopen
|
||||
import locale
|
||||
LOG.debug("Checking for updated addons...")
|
||||
langs = glocale.get_language_list()
|
||||
langs.append("en")
|
||||
|
@ -35,10 +35,7 @@ This module provides the model that is used for all hierarchical treeviews.
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import time
|
||||
import locale
|
||||
import sys
|
||||
from gramps.gen.const import GRAMPS_LOCALE as glocale
|
||||
_ = glocale.translation.gettext
|
||||
import logging
|
||||
|
||||
_LOG = logging.getLogger(".gui.treebasemodel")
|
||||
@ -57,6 +54,7 @@ from gi.repository import Gtk
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from gramps.gen.const import GRAMPS_LOCALE as glocale
|
||||
_ = glocale.translation.gettext
|
||||
import gramps.gui.widgets.progressdialog as progressdlg
|
||||
from gramps.gen.constfunc import cuni, UNITYPE
|
||||
from .lru import LRU
|
||||
|
@ -70,7 +70,6 @@ except ImportError:
|
||||
from md5 import md5
|
||||
import zipfile
|
||||
import time
|
||||
import locale
|
||||
import sys
|
||||
if sys.version_info[0] < 3:
|
||||
from cStringIO import StringIO
|
||||
@ -496,8 +495,7 @@ class ODFDoc(BaseDoc, TextDoc, DrawDoc):
|
||||
wrt = self.cntnt.write
|
||||
wrt1, wrt2 = self.cntnt1.write, self.cntnt2.write
|
||||
|
||||
current_locale = locale.getlocale()
|
||||
self.lang = current_locale[0]
|
||||
self.lang = glocale.lang
|
||||
self.lang = self.lang.replace('_', '-') if self.lang else "en-US"
|
||||
|
||||
self.StyleList_notes = [] # styles to create depending on styled notes.
|
||||
|
@ -30,12 +30,9 @@ Geography for events
|
||||
# Python modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from gramps.gen.const import GRAMPS_LOCALE as glocale
|
||||
_ = glocale.translation.gettext
|
||||
import os
|
||||
import sys
|
||||
import operator
|
||||
import locale
|
||||
from gi.repository import Gdk
|
||||
KEY_TAB = Gdk.KEY_Tab
|
||||
import socket
|
||||
@ -54,6 +51,8 @@ _LOG = logging.getLogger("GeoGraphy.geoevents")
|
||||
# Gramps Modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from gramps.gen.const import GRAMPS_LOCALE as glocale
|
||||
_ = glocale.translation.gettext
|
||||
from gramps.gen.lib import EventType
|
||||
from gramps.gen.config import config
|
||||
from gramps.gen.datehandler import displayer
|
||||
|
@ -30,12 +30,9 @@ Geography for one family
|
||||
# Python modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from gramps.gen.const import GRAMPS_LOCALE as glocale
|
||||
_ = glocale.translation.gettext
|
||||
import os
|
||||
import sys
|
||||
import operator
|
||||
import locale
|
||||
from gi.repository import Gdk
|
||||
KEY_TAB = Gdk.KEY_Tab
|
||||
import socket
|
||||
@ -54,6 +51,8 @@ _LOG = logging.getLogger("GeoGraphy.geofamily")
|
||||
# Gramps Modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from gramps.gen.const import GRAMPS_LOCALE as glocale
|
||||
_ = glocale.translation.gettext
|
||||
from gramps.gen.lib import EventRoleType, EventType
|
||||
from gramps.gen.config import config
|
||||
from gramps.gen.datehandler import displayer
|
||||
|
@ -30,12 +30,9 @@ Geography for one person
|
||||
# Python modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from gramps.gen.const import GRAMPS_LOCALE as glocale
|
||||
_ = glocale.translation.gettext
|
||||
import os
|
||||
import sys
|
||||
import operator
|
||||
import locale
|
||||
from gi.repository import Gdk
|
||||
KEY_TAB = Gdk.KEY_Tab
|
||||
import socket
|
||||
@ -56,6 +53,8 @@ _LOG = logging.getLogger("GeoGraphy.geoperson")
|
||||
# Gramps Modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from gramps.gen.const import GRAMPS_LOCALE as glocale
|
||||
_ = glocale.translation.gettext
|
||||
from gramps.gen.lib import EventRoleType, EventType
|
||||
from gramps.gen.config import config
|
||||
from gramps.gen.datehandler import displayer
|
||||
|
@ -30,13 +30,10 @@ Geography for places
|
||||
# Python modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from gramps.gen.const import GRAMPS_LOCALE as glocale
|
||||
_ = glocale.translation.gettext
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
import operator
|
||||
import locale
|
||||
from gi.repository import Gdk
|
||||
KEY_TAB = Gdk.KEY_Tab
|
||||
import socket
|
||||
@ -55,6 +52,8 @@ _LOG = logging.getLogger("GeoGraphy.geoplaces")
|
||||
# Gramps Modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from gramps.gen.const import GRAMPS_LOCALE as glocale
|
||||
_ = glocale.translation.gettext
|
||||
from gramps.gen.lib import EventType
|
||||
from gramps.gen.config import config
|
||||
from gramps.gen.display.name import displayer as _nd
|
||||
|
Loading…
Reference in New Issue
Block a user