diff options
author | David Lord <davidism@gmail.com> | 2020-01-27 14:12:52 -0800 |
---|---|---|
committer | David Lord <davidism@gmail.com> | 2020-02-05 08:37:40 -0800 |
commit | f28b25ea623fdc08dcdf573af837048314360bb7 (patch) | |
tree | 72273fad1c243ffdba59811cdaca5a082f783eb2 /docs/extensions.rst | |
parent | 0c75d4805889ca97948d727917dbf8f301981956 (diff) | |
download | jinja2-f28b25ea623fdc08dcdf573af837048314360bb7.tar.gz |
remove Python 2 from docs
Diffstat (limited to 'docs/extensions.rst')
-rw-r--r-- | docs/extensions.rst | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/docs/extensions.rst b/docs/extensions.rst index 7abed65..bb81f21 100644 --- a/docs/extensions.rst +++ b/docs/extensions.rst @@ -44,8 +44,7 @@ additional methods: .. method:: jinja2.Environment.install_gettext_translations(translations, newstyle=False) Installs a translation globally for the environment. The - ``translations`` object must implement ``gettext`` and ``ngettext`` - (or ``ugettext`` and ``ungettext`` for Python 2). + ``translations`` object must implement ``gettext`` and ``ngettext``. :class:`gettext.NullTranslations`, :class:`gettext.GNUTranslations`, and `Babel`_\s ``Translations`` are supported. @@ -63,8 +62,7 @@ additional methods: Install the given ``gettext`` and ``ngettext`` callables into the environment. They should behave exactly like - :func:`gettext.gettext` and :func:`gettext.ngettext` (or - ``ugettext`` and ``ungettext`` for Python 2). + :func:`gettext.gettext` and :func:`gettext.ngettext`. If ``newstyle`` is activated, the callables are wrapped to work like newstyle callables. See :ref:`newstyle-gettext` for more information. @@ -86,8 +84,8 @@ additional methods: found. - ``function`` is the name of the ``gettext`` function used (if the string was extracted from embedded Python code). - - ``message`` is the string itself (``unicode`` on Python 2), or a - tuple of strings for functions with multiple arguments. + - ``message`` is the string itself, or a tuple of strings for + functions with multiple arguments. If `Babel`_ is installed, see :ref:`babel-integration` to extract the strings. |