You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
424 B

4 years ago
  1. """Translation related utilities. When imported, injects _ to builtins"""
  2. # Copyright (c) Jupyter Development Team.
  3. # Distributed under the terms of the Modified BSD License.
  4. import os
  5. import gettext
  6. # Set up message catalog access
  7. base_dir = os.path.realpath(os.path.join(__file__, '..', '..'))
  8. trans = gettext.translation('notebook', localedir=os.path.join(base_dir, 'notebook/i18n'), fallback=True)
  9. _ = trans.gettext