Import it in conf.py (docs) Fixes https://github.com/jupyter/notebook/issues/2798
parent
5a3d7c63d0
commit
6e1ac76423
@ -0,0 +1,14 @@
|
||||
"""Translation related utilities. When imported, injects _ to builtins"""
|
||||
|
||||
# Copyright (c) Jupyter Development Team.
|
||||
# Distributed under the terms of the Modified BSD License.
|
||||
|
||||
import os
|
||||
import gettext
|
||||
|
||||
|
||||
# Set up message catalog access
|
||||
base_dir = os.path.realpath(os.path.join(__file__, '..', '..'))
|
||||
trans = gettext.translation('notebook', localedir=os.path.join(base_dir, 'notebook/i18n'), fallback=True)
|
||||
trans.install()
|
||||
_ = trans.gettext
|
||||
Loading…
Reference in new issue