# HG changeset patch
# User gibus
# Date 1372425023 -7200
# Node ID 9172f4c6ad70ed83903f14a0e84a24f11ef9bf8a
# Parent e7bc083fa9dc1e43187ada716e037388612ed919
Better translation of help text
diff -r e7bc083fa9dc -r 9172f4c6ad70 src/cm/models.py
--- a/src/cm/models.py Thu Jun 27 16:54:29 2013 +0200
+++ b/src/cm/models.py Fri Jun 28 15:10:23 2013 +0200
@@ -194,11 +194,11 @@
from django.utils.safestring import mark_safe
- category_1 = models.CharField(ugettext_lazy("Label for the first category of comments"), help_text=mark_safe(_("Paragraphs including at least one comment of this category will have a vertical bar with this color: ") + '
' + _("Leave blank to use the value configured for the workspace.") + '
' + _("To disable this category for this text whatever the configuration for the workspace, enter: ") + 'none'), max_length=20, null=True, blank=True)
- category_2 = models.CharField(ugettext_lazy("Label for the second category of comments"), help_text=mark_safe(_("Paragraphs including at least one comment of this category will have a vertical bar with this color: ") + '
' + _("Leave blank to use the value configured for the workspace. ") + '
' + _("To disable this category for this text whatever the configuration for the workspace, enter: ") + 'none'), max_length=20, null=True, blank=True)
- category_3 = models.CharField(ugettext_lazy("Label for the third category of comments"), help_text=mark_safe(_("Paragraphs including at least one comment of this category will have a vertical bar with this color: ") + '
' + _("Leave blank to use the value configured for the workspace. ") + '
' + _("To disable this category for this text whatever the configuration for the workspace, enter: ") + 'none'), max_length=20, null=True, blank=True)
- category_4 = models.CharField(ugettext_lazy("Label for the fourth category of comments"), help_text=mark_safe(_("Paragraphs including at least one comment of this category will have a vertical bar with this color: ") + '
' + _("Leave blank to use the value configured for the workspace. ") + '
' + _("To disable this category for this text whatever the configuration for the workspace, enter: ") + 'none'), max_length=20, null=True, blank=True)
- category_5 = models.CharField(ugettext_lazy("Label for the fifth category of comments"), help_text=mark_safe(_("Paragraphs including at least one comment of this category will have a vertical bar with this color: ") + '
' + _("Leave blank to use the value configured for the workspace. ") + '
' + _("To disable this category for this text whatever the configuration for the workspace, enter: ") + 'none'), max_length=20, null=True, blank=True)
+ category_1 = models.CharField(ugettext_lazy("Label for the first category of comments"), max_length=20, null=True, blank=True)
+ category_2 = models.CharField(ugettext_lazy("Label for the second category of comments"), max_length=20, null=True, blank=True)
+ category_3 = models.CharField(ugettext_lazy("Label for the third category of comments"), max_length=20, null=True, blank=True)
+ category_4 = models.CharField(ugettext_lazy("Label for the fourth category of comments"), max_length=20, null=True, blank=True)
+ category_5 = models.CharField(ugettext_lazy("Label for the fifth category of comments"), max_length=20, null=True, blank=True)
text = models.ForeignKey("Text")
diff -r e7bc083fa9dc -r 9172f4c6ad70 src/cm/views/texts.py
--- a/src/cm/views/texts.py Thu Jun 27 16:54:29 2013 +0200
+++ b/src/cm/views/texts.py Fri Jun 28 15:10:23 2013 +0200
@@ -922,6 +922,12 @@
class SettingsTextForm(ModelForm):
+ from django.utils.safestring import mark_safe
+ category_1 = forms.CharField(label=_("Label for the first category of comments"), help_text=mark_safe(_("Paragraphs including at least one comment of this category will have a vertical bar with this color: ") + '
' + _("Leave blank to use the value configured for the workspace.") + '
' + _("To disable this category for this text whatever the configuration for the workspace, enter: ") + 'none'), required=False)
+ category_2 = forms.CharField(label=ugettext_lazy("Label for the second category of comments"), help_text=mark_safe(_("Paragraphs including at least one comment of this category will have a vertical bar with this color: ") + '
' + _("Leave blank to use the value configured for the workspace.") + '
' + _("To disable this category for this text whatever the configuration for the workspace, enter: ") + 'none'), required=False)
+ category_3 = forms.CharField(label=ugettext_lazy("Label for the third category of comments"), help_text=mark_safe(_("Paragraphs including at least one comment of this category will have a vertical bar with this color: ") + '
' + _("Leave blank to use the value configured for the workspace.") + '
' + _("To disable this category for this text whatever the configuration for the workspace, enter: ") + 'none'), required=False)
+ category_4 = forms.CharField(label=ugettext_lazy("Label for the fourth category of comments"), help_text=mark_safe(_("Paragraphs including at least one comment of this category will have a vertical bar with this color: ") + '
' + _("Leave blank to use the value configured for the workspace.") + '
' + _("To disable this category for this text whatever the configuration for the workspace, enter: ") + 'none'), required=False)
+ category_5 = forms.CharField(label=ugettext_lazy("Label for the fifth category of comments"), help_text=mark_safe(_("Paragraphs including at least one comment of this category will have a vertical bar with this color: ") + '
' + _("Leave blank to use the value configured for the workspace.") + '
' + _("To disable this category for this text whatever the configuration for the workspace, enter: ") + 'none'), required=False)
# example name = forms.CharField(label=_("Name (optional)"), widget=forms.TextInput, required=False)
class Meta: