From e34f4e6f8735a6ad102fda096aa99cbb5600761e Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Thu, 26 Jan 2017 20:56:34 +0100 Subject: Made ugettext* functions aliases of gettext* Thanks Tim Graham for the review. --- docs/ref/utils.txt | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'docs/ref') diff --git a/docs/ref/utils.txt b/docs/ref/utils.txt index 7acf057e08..cd5bbee707 100644 --- a/docs/ref/utils.txt +++ b/docs/ref/utils.txt @@ -1011,10 +1011,11 @@ appropriate entities. For a complete discussion on the usage of the following see the :doc:`translation documentation `. -.. function:: gettext(message) - - Translates ``message`` and returns it in a UTF-8 bytestring. +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:: ugettext(message) Translates ``message`` and returns it as a string. @@ -1042,19 +1043,15 @@ For a complete discussion on the usage of the following see the later. .. function:: ngettext(singular, plural, number) - - Translates ``singular`` and ``plural`` and returns the appropriate string - based on ``number`` in a UTF-8 bytestring. - .. function:: ungettext(singular, plural, number) Translates ``singular`` and ``plural`` and returns the appropriate string - based on ``number`` as a string. + based on ``number``. .. function:: npgettext(context, singular, plural, number) Translates ``singular`` and ``plural`` and returns the appropriate string - based on ``number`` and the ``context`` as a string. + based on ``number`` and the ``context``. .. function:: ngettext_lazy(singular, plural, number) .. function:: ungettext_lazy(singular, plural, number) -- cgit v1.3