From: st4lk Date: Mon, 23 Feb 2015 09:16:02 +0000 (+0300) Subject: Fix doc typos (pgettext) X-Git-Tag: v4.2.0b1~95^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1348%2Fhead;p=thirdparty%2Ftornado.git Fix doc typos (pgettext) --- diff --git a/tornado/locale.py b/tornado/locale.py index c6492a172..1a87ed1eb 100644 --- a/tornado/locale.py +++ b/tornado/locale.py @@ -454,20 +454,20 @@ class GettextLocale(Locale): return self.gettext(message) def pgettext(self, context, message, plural_message=None, count=None): - """Allows to set context for translation, accept plural forms. + """Allows to set context for translation, accepts plural forms. - Usage example: + Usage example:: pgettext("law", "right") pgettext("good", "right") - Plural message example: + Plural message example:: pgettext("organization", "club", "clubs", len(clubs)) pgettext("stick", "club", "clubs", len(clubs)) - To generate POT file with context, add following option to step 1 - of `load_gettext_translations` sequence: + To generate POT file with context, add following options to step 1 + of `load_gettext_translations` sequence:: xgettext [basic options] --keyword=pgettext:1c,2 --keyword=pgettext:1c,2,3 """