aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authororlovgb <orlovgb@yandex-team.ru>2022-02-10 16:48:20 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:48:20 +0300
commit805923d9caf5cf5b7fd5f4aa268f783503260d62 (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8
parent0315e42217b6a79d49980d6139c0e487cab2426f (diff)
downloadydb-805923d9caf5cf5b7fd5f4aa268f783503260d62.tar.gz
Restoring authorship annotation for <orlovgb@yandex-team.ru>. Commit 2 of 2.
-rw-r--r--contrib/python/ya.make4
-rw-r--r--contrib/tools/python3/src/Lib/gettext.py24
2 files changed, 14 insertions, 14 deletions
diff --git a/contrib/python/ya.make b/contrib/python/ya.make
index bd10cab342..d01ced9f3a 100644
--- a/contrib/python/ya.make
+++ b/contrib/python/ya.make
@@ -254,7 +254,7 @@ RECURSE(
django-filter
django-fsm
django-grappelli
- django-guardian
+ django-guardian
django-hosts
django-http-proxy
django-import-export
@@ -893,7 +893,7 @@ RECURSE(
python-datemath
python-debian
python-decouple
- python-docx
+ python-docx
python-dotenv
python-editor
python-geohash
diff --git a/contrib/tools/python3/src/Lib/gettext.py b/contrib/tools/python3/src/Lib/gettext.py
index 41c86fbf11..9df74c91f0 100644
--- a/contrib/tools/python3/src/Lib/gettext.py
+++ b/contrib/tools/python3/src/Lib/gettext.py
@@ -49,12 +49,12 @@ internationalized, to the local language and cultural habits.
import os
import re
import sys
-import io
+import io
-try:
- import __res
-except ImportError:
- __res = None
+try:
+ import __res
+except ImportError:
+ __res = None
__all__ = ['NullTranslations', 'GNUTranslations', 'Catalog',
'find', 'translation', 'install', 'textdomain', 'bindtextdomain',
@@ -572,7 +572,7 @@ def find(domain, localedir=None, languages=None, all=False):
if lang == 'C':
break
mofile = os.path.join(localedir, lang, 'LC_MESSAGES', '%s.mo' % domain)
- if __res and __res.resfs_src(mofile.encode('utf-8'), resfs_file=True) or os.path.exists(mofile):
+ if __res and __res.resfs_src(mofile.encode('utf-8'), resfs_file=True) or os.path.exists(mofile):
if all:
result.append(mofile)
else:
@@ -603,12 +603,12 @@ def translation(domain, localedir=None, languages=None,
key = (class_, os.path.abspath(mofile))
t = _translations.get(key)
if t is None:
- mores = __res and __res.resfs_read(mofile.encode('utf-8'))
- if mores:
- t = _translations.setdefault(key, class_(io.BytesIO(mores)))
- else:
- with open(mofile, 'rb') as fp:
- t = _translations.setdefault(key, class_(fp))
+ mores = __res and __res.resfs_read(mofile.encode('utf-8'))
+ if mores:
+ t = _translations.setdefault(key, class_(io.BytesIO(mores)))
+ else:
+ with open(mofile, 'rb') as fp:
+ t = _translations.setdefault(key, class_(fp))
# Copy the translation object to allow setting fallbacks and
# output charset. All other instance data is shared with the
# cached object.