diff options
author | Tim Peters <tim.peters@gmail.com> | 2001-01-14 23:47:14 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2001-01-14 23:47:14 (GMT) |
commit | 07e99cb77406e1bc84606f49b743e41b0de8a6d5 (patch) | |
tree | b922cda3a970bffa797269fd550f8d8b032afe5b /Lib/gettext.py | |
parent | 88869f9787cd4ceb2298e4b13980beb057687824 (diff) | |
download | cpython-07e99cb77406e1bc84606f49b743e41b0de8a6d5.zip cpython-07e99cb77406e1bc84606f49b743e41b0de8a6d5.tar.gz cpython-07e99cb77406e1bc84606f49b743e41b0de8a6d5.tar.bz2 |
Whitespace normalization.
Diffstat (limited to 'Lib/gettext.py')
-rw-r--r-- | Lib/gettext.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Lib/gettext.py b/Lib/gettext.py index 9bebb11..7ef4259 100644 --- a/Lib/gettext.py +++ b/Lib/gettext.py @@ -51,7 +51,7 @@ from errno import ENOENT _default_localedir = os.path.join(sys.prefix, 'share', 'locale') - + def _expand_lang(locale): from locale import normalize locale = normalize(locale) @@ -94,7 +94,7 @@ def _expand_lang(locale): return ret - + class NullTranslations: def __init__(self, fp=None): self._info = {} @@ -192,7 +192,7 @@ class GNUTranslations(NullTranslations): return unicode(tmsg, self._charset) - + # Locate a .mo file using the gettext strategy def find(domain, localedir=None, languages=None): # Get some reasonable defaults for arguments that were not supplied @@ -223,7 +223,7 @@ def find(domain, localedir=None, languages=None): return None - + # a mapping between absolute .mo file path and Translation object _translations = {} @@ -243,12 +243,12 @@ def translation(domain, localedir=None, languages=None, class_=None): return t - + def install(domain, localedir=None, unicode=0): translation(domain, localedir).install(unicode) - + # a mapping b/w domains and locale directories _localedirs = {} # current global domain, `messages' used for compatibility w/ GNU gettext @@ -275,7 +275,7 @@ def dgettext(domain, message): except IOError: return message return t.gettext(message) - + def gettext(message): return dgettext(_current_domain, message) |