grampslocale: Remove unused numeric
This commit is contained in:
parent
2accc585f3
commit
6ef80b8d50
@ -325,11 +325,6 @@ class GrampsLocale:
|
|||||||
else:
|
else:
|
||||||
self.calendar = self.lang
|
self.calendar = self.lang
|
||||||
|
|
||||||
if 'LC_NUMERIC' in os.environ:
|
|
||||||
self.numeric = os.environ['LC_NUMERIC']
|
|
||||||
else:
|
|
||||||
self.numeric = self.lang
|
|
||||||
|
|
||||||
def _init_from_environment(self):
|
def _init_from_environment(self):
|
||||||
|
|
||||||
def _check_locale(locale):
|
def _check_locale(locale):
|
||||||
@ -392,12 +387,6 @@ class GrampsLocale:
|
|||||||
if HAVE_ICU and 'COLLATION' in os.environ:
|
if HAVE_ICU and 'COLLATION' in os.environ:
|
||||||
self.collation = os.environ['COLLATION']
|
self.collation = os.environ['COLLATION']
|
||||||
|
|
||||||
loc = locale.getlocale(locale.LC_NUMERIC)
|
|
||||||
if loc and loc[0]:
|
|
||||||
self.numeric = '.'.join(loc)
|
|
||||||
else:
|
|
||||||
self.numeric = self.lang
|
|
||||||
|
|
||||||
# $LANGUAGE overrides $LANG, $LC_MESSAGES
|
# $LANGUAGE overrides $LANG, $LC_MESSAGES
|
||||||
if "LANGUAGE" in os.environ:
|
if "LANGUAGE" in os.environ:
|
||||||
language = [x for x in [self.check_available_translations(l)
|
language = [x for x in [self.check_available_translations(l)
|
||||||
@ -457,7 +446,7 @@ class GrampsLocale:
|
|||||||
else:
|
else:
|
||||||
self._init_from_environment()
|
self._init_from_environment()
|
||||||
else:
|
else:
|
||||||
self.numeric = self.calendar = self.collation = self.lang
|
self.calendar = self.collation = self.lang
|
||||||
|
|
||||||
if not self.lang:
|
if not self.lang:
|
||||||
self.lang = 'en_US.UTF-8'
|
self.lang = 'en_US.UTF-8'
|
||||||
@ -559,7 +548,7 @@ class GrampsLocale:
|
|||||||
if not self.language and _first.language:
|
if not self.language and _first.language:
|
||||||
self.language = _first.language
|
self.language = _first.language
|
||||||
|
|
||||||
self.numeric = self.calendar = self.collation = self.lang
|
self.calendar = self.collation = self.lang
|
||||||
|
|
||||||
self.rtl_locale = False
|
self.rtl_locale = False
|
||||||
if self.language[0] in _RTL_LOCALES:
|
if self.language[0] in _RTL_LOCALES:
|
||||||
|
@ -55,7 +55,7 @@ formatting. POSIX specifies a locale for this, but ICU uses format
|
|||||||
strings, and there is no good way to map those strings into one of the
|
strings, and there is no good way to map those strings into one of the
|
||||||
available locales. Users who whan to specify particular ways of
|
available locales. Users who whan to specify particular ways of
|
||||||
formatting different from their base locales will have to figure out
|
formatting different from their base locales will have to figure out
|
||||||
the appropriate locale on their own and set LC_TIME and LC_NUMERIC
|
the appropriate locale on their own and set LC_TIME
|
||||||
appropriately. The "Formats" page on the Languages & Text
|
appropriately. The "Formats" page on the Languages & Text
|
||||||
(International in Leopard) System Preferences pane is a good way to
|
(International in Leopard) System Preferences pane is a good way to
|
||||||
quickly assess the formats in various locales.
|
quickly assess the formats in various locales.
|
||||||
@ -288,5 +288,3 @@ def mac_setup_localization(glocale):
|
|||||||
glocale.calendar = time
|
glocale.calendar = time
|
||||||
else:
|
else:
|
||||||
glocale.calendar = glocale.lang[:5]
|
glocale.calendar = glocale.lang[:5]
|
||||||
|
|
||||||
glocale.numeric = locale.getlocale(locale.LC_NUMERIC)[0] or glocale.lang
|
|
||||||
|
@ -581,7 +581,6 @@ def run():
|
|||||||
LOG.debug("Translating Gramps to %s", glocale.language[0])
|
LOG.debug("Translating Gramps to %s", glocale.language[0])
|
||||||
LOG.debug("Collation Locale: %s", glocale.collation)
|
LOG.debug("Collation Locale: %s", glocale.collation)
|
||||||
LOG.debug("Date/Time Locale: %s", glocale.calendar)
|
LOG.debug("Date/Time Locale: %s", glocale.calendar)
|
||||||
LOG.debug("Number-format Locale: %s", glocale.numeric)
|
|
||||||
|
|
||||||
if 'LANG' in os.environ:
|
if 'LANG' in os.environ:
|
||||||
LOG.debug('Using LANG: %s' %
|
LOG.debug('Using LANG: %s' %
|
||||||
|
Loading…
Reference in New Issue
Block a user