Browse files

Moved translator comment just above the target string

  • Loading branch information...
1 parent 8d65b60 commit 8cd8742981020e315acc4e70bdf3613fcf68e3a8 @claudep claudep committed Aug 22, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 django/forms/forms.py
View
2 django/forms/forms.py
@@ -526,9 +526,9 @@ def label_tag(self, contents=None, attrs=None, label_suffix=None):
"""
contents = contents or self.label
# Only add the suffix if the label does not end in punctuation.
+ label_suffix = label_suffix if label_suffix is not None else self.form.label_suffix
# Translators: If found as last label character, these punctuation
# characters will prevent the default label_suffix to be appended to the label
- label_suffix = label_suffix if label_suffix is not None else self.form.label_suffix
if label_suffix and contents and contents[-1] not in _(':?.!'):
contents = format_html('{0}{1}', contents, label_suffix)
widget = self.field.widget

0 comments on commit 8cd8742

Please sign in to comment.