diff options
| author | Claude Paroz <claude@2xlibre.net> | 2017-01-26 20:56:34 +0100 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2017-01-28 12:01:30 +0100 |
| commit | e34f4e6f8735a6ad102fda096aa99cbb5600761e (patch) | |
| tree | 100d6376c40d0da163b0c4ae3ad613ffd371f48b /docs/ref | |
| parent | 9e9e73735e9aa651b5c8ad7a700f90ccb5d3b18b (diff) | |
Made ugettext* functions aliases of gettext*
Thanks Tim Graham for the review.
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/utils.txt | 15 |
1 files changed, 6 insertions, 9 deletions
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 </topics/i18n/translation>`. -.. 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) |
