]> git.phdru.name Git - m_librarian.git/commitdiff
Do not install translations globally to satisfy flake8
authorOleg Broytman <phd@phdru.name>
Wed, 30 Mar 2016 17:53:17 +0000 (20:53 +0300)
committerOleg Broytman <phd@phdru.name>
Wed, 30 Mar 2016 17:53:17 +0000 (20:53 +0300)
m_librarian/translations.py
scripts/ml-search.py

index a979472c454e94df377ccaf4e7c85a5c74bb22ac..ba5f44c7f6c7719a2839c7182976b7b9e0de9a0d 100644 (file)
@@ -16,4 +16,3 @@ if language:
 
 if translations is None:
     translations = gettext.NullTranslations()
-translation.install(unicode=True)
index 0f9c9b52019c97b72ab758877ff8a2b75c87d614..231bdc44941852d181a788b36a5db0e7d1f7a10d 100755 (executable)
@@ -5,7 +5,8 @@ import sys
 from m_lib.defenc import default_encoding
 from m_librarian.search import search_authors, search_books, \
     search_extensions, search_genres, search_languages
-import m_librarian.translations
+from m_librarian.translations import translations
+_ = translations.ugettext
 
 
 def _guess_case_sensitivity(values):