From e2ff1dca39194edbb2edde86726df89b49f24549 Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Wed, 26 Jul 2017 05:28:56 +0200 Subject: [PATCH] [mod] simplify code again --- moulinette/core.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/moulinette/core.py b/moulinette/core.py index e97f6f01..e3d8f395 100644 --- a/moulinette/core.py +++ b/moulinette/core.py @@ -150,11 +150,6 @@ class Moulinette18n(object): self._namespaces = {} self._current_namespace = None - @property - def _namespace(self): - """Return current namespace's Translator object""" - return self._namespaces[self._current_namespace] - def load_namespace(self, namespace): """Load the namespace to use @@ -206,7 +201,7 @@ class Moulinette18n(object): - key -- The key to translate """ - return self._namespace.translate(key, *args, **kwargs) + return self._namespaces[self._current_namespace].translate(key, *args, **kwargs) class MoulinetteSignals(object):