summaryrefslogtreecommitdiff
path: root/oslo_i18n
diff options
context:
space:
mode:
authorDoug Hellmann <doug@doughellmann.com>2015-07-02 20:43:02 +0000
committerDoug Hellmann <doug@doughellmann.com>2015-07-02 20:43:02 +0000
commitecb91209d861a12a751ef17a6b6f5aae2ca495ce (patch)
treeb04870fbe828599f3f7db7b69fd80a382f74e3eb /oslo_i18n
parent9e3132bc2f06da87b5c78257a267c5431f433e74 (diff)
downloadoslo-i18n-ecb91209d861a12a751ef17a6b6f5aae2ca495ce.tar.gz
Only define CONTEXT_SEPARATOR once
Replace 2 of 3 definitions of CONTEXT_SEPARATOR with a reference to the variable in _message.py. Change-Id: I37020ca7cf26b523d3739b5613ea5d9be9051e0a
Diffstat (limited to 'oslo_i18n')
-rw-r--r--oslo_i18n/_factory.py2
-rw-r--r--oslo_i18n/tests/test_factory.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/oslo_i18n/_factory.py b/oslo_i18n/_factory.py
index 886798a..7d6c7e4 100644
--- a/oslo_i18n/_factory.py
+++ b/oslo_i18n/_factory.py
@@ -31,7 +31,7 @@ __all__ = [
]
# magic gettext number to separate context from message
-CONTEXT_SEPARATOR = "\x04"
+CONTEXT_SEPARATOR = _message.CONTEXT_SEPARATOR
class TranslatorFactory(object):
diff --git a/oslo_i18n/tests/test_factory.py b/oslo_i18n/tests/test_factory.py
index 5d1373f..8a3599d 100644
--- a/oslo_i18n/tests/test_factory.py
+++ b/oslo_i18n/tests/test_factory.py
@@ -23,7 +23,7 @@ from oslo_i18n import _lazy
from oslo_i18n import _message
# magic gettext number to separate context from message
-CONTEXT_SEPARATOR = "\x04"
+CONTEXT_SEPARATOR = _message.CONTEXT_SEPARATOR
class TranslatorFactoryTest(test_base.BaseTestCase):