diff options
| author | Claude Paroz <claude@2xlibre.net> | 2013-07-13 11:43:14 +0200 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2013-07-13 16:20:09 +0200 |
| commit | db33b25e8617185acbadb4ff04eaa4c37ae67dd6 (patch) | |
| tree | 1451e3cf6197ada7a09f58f9a64183ba638ded41 /docs | |
| parent | 7f210563ab90d4d3957e7e1efc5b102777357e8b (diff) | |
[1.6.x] Fixed #20582 -- Allowed default Form.label_suffix to be translated
Thanks Tim Graham for the review.
Backport of 7557207983 from master.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/forms/api.txt | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/docs/ref/forms/api.txt b/docs/ref/forms/api.txt index 5d54e01c3d..7c1601d3ea 100644 --- a/docs/ref/forms/api.txt +++ b/docs/ref/forms/api.txt @@ -500,9 +500,15 @@ By default, ``auto_id`` is set to the string ``'id_%s'``. .. attribute:: Form.label_suffix -Normally, a colon (``:``) will be appended after any label name when a form is -rendered. It's possible to change the colon to another character, or omit it -entirely, using the ``label_suffix`` parameter:: +A translatable string (defaults to a colon (``:``) in English) that will be +appended after any label name when a form is rendered. + +.. versionchanged:: 1.6 + + The default ``label_suffix`` is translatable. + +It's possible to customize that character, or omit it entirely, using the + ``label_suffix`` parameter:: >>> f = ContactForm(auto_id='id_for_%s', label_suffix='') >>> print(f.as_ul()) @@ -518,7 +524,8 @@ entirely, using the ``label_suffix`` parameter:: <li><label for="id_for_cc_myself">Cc myself -></label> <input type="checkbox" name="cc_myself" id="id_for_cc_myself" /></li> Note that the label suffix is added only if the last character of the -label isn't a punctuation character (``.``, ``!``, ``?`` or ``:``) +label isn't a punctuation character (in English, those are ``.``, ``!``, ``?`` +or ``:``). Notes on field ordering ~~~~~~~~~~~~~~~~~~~~~~~ |
