From e67b775c7267825b9f2d353793dc4cd25b5fdec1 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Wed, 30 Mar 2016 20:53:17 +0300 Subject: [PATCH] Do not install translations globally to satisfy flake8 --- m_librarian/translations.py | 1 - scripts/ml-search.py | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) 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): -- 2.39.5