From: Oleg Broytman Date: Wed, 30 Mar 2016 17:53:17 +0000 (+0300) Subject: Do not install translations globally to satisfy flake8 X-Git-Tag: 0.0.4~40 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=e67b775c7267825b9f2d353793dc4cd25b5fdec1;p=m_librarian.git Do not install translations globally to satisfy flake8 --- diff --git a/m_librarian/translations.py b/m_librarian/translations.py index a979472..ba5f44c 100644 --- a/m_librarian/translations.py +++ b/m_librarian/translations.py @@ -16,4 +16,3 @@ if language: if translations is None: translations = gettext.NullTranslations() -translation.install(unicode=True) diff --git a/scripts/ml-search.py b/scripts/ml-search.py index 0f9c9b5..231bdc4 100755 --- a/scripts/ml-search.py +++ b/scripts/ml-search.py @@ -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):