Refs #30165 -- Removed obsolete doc references to deprecated ugettext() & co.

The u-prefixed variants were removed from the documentation in
6eb4996672.
This commit is contained in:
Jon Dufresne 2020-04-19 22:57:24 -07:00 committed by GitHub
parent 5673d4b102
commit fb21625270
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 10 deletions

View File

@ -1027,10 +1027,6 @@ appropriate entities.
For a complete discussion on the usage of the following see the For a complete discussion on the usage of the following see the
:doc:`translation documentation </topics/i18n/translation>`. :doc:`translation documentation </topics/i18n/translation>`.
The ``u`` prefix on the functions below comes from a difference in Python 2
between unicode and bytestrings. If your code doesn't support Python 2, use the
functions without the ``u``.
.. function:: gettext(message) .. function:: gettext(message)
Translates ``message`` and returns it as a string. Translates ``message`` and returns it as a string.

View File

@ -52,12 +52,6 @@ Specify a translation string by using the function
:func:`~django.utils.translation.gettext`. It's convention to import this :func:`~django.utils.translation.gettext`. It's convention to import this
as a shorter alias, ``_``, to save typing. as a shorter alias, ``_``, to save typing.
.. note::
The ``u`` prefixing of ``gettext`` functions was originally to distinguish
usage between unicode strings and bytestrings on Python 2. For code that
supports only Python 3, they can be used interchangeably. A deprecation for
the prefixed functions may happen in a future Django release.
.. note:: .. note::
Python's standard library ``gettext`` module installs ``_()`` into the Python's standard library ``gettext`` module installs ``_()`` into the
global namespace, as an alias for ``gettext()``. In Django, we have chosen global namespace, as an alias for ``gettext()``. In Django, we have chosen