Issue #39, Explicitly captalize string now that they are not capitalized blindly by the templates

This commit is contained in:
Roberto Rosario
2014-10-02 01:17:27 -04:00
parent 488efbe43f
commit 06dd1b3368
70 changed files with 547 additions and 546 deletions

View File

@@ -9,9 +9,9 @@ from .literals import (OPERATOR_CHOICES, INCLUSION_AND,
class SmartLink(models.Model):
title = models.CharField(max_length=96, verbose_name=_(u'title'))
dynamic_title = models.CharField(blank=True, max_length=96, verbose_name=_(u'dynamic title'), help_text=_(u'This expression will be evaluated against the current selected document. The document metadata is available as variables `metadata` and document properties under the variable `document`.'))
enabled = models.BooleanField(default=True, verbose_name=_(u'enabled'))
title = models.CharField(max_length=96, verbose_name=_(u'Title'))
dynamic_title = models.CharField(blank=True, max_length=96, verbose_name=_(u'Dynamic title'), help_text=_(u'This expression will be evaluated against the current selected document. The document metadata is available as variables `metadata` and document properties under the variable `document`.'))
enabled = models.BooleanField(default=True, verbose_name=_(u'Enabled'))
objects = SmartLinkManager()
@@ -19,22 +19,22 @@ class SmartLink(models.Model):
return self.title
class Meta:
verbose_name = _(u'smart link')
verbose_name_plural = _(u'smart links')
verbose_name = _(u'Smart link')
verbose_name_plural = _(u'Smart links')
class SmartLinkCondition(models.Model):
smart_link = models.ForeignKey(SmartLink, verbose_name=_(u'smart link'))
smart_link = models.ForeignKey(SmartLink, verbose_name=_(u'Smart link'))
inclusion = models.CharField(default=INCLUSION_AND, max_length=16, choices=INCLUSION_CHOICES, help_text=_(u'The inclusion is ignored for the first item.'))
foreign_document_data = models.CharField(max_length=32, verbose_name=_(u'foreign document data'), help_text=_(u'This represents the metadata of all other documents. Available objects: `document.<attribute>` and `metadata.<metadata_type_name>`.'))
foreign_document_data = models.CharField(max_length=32, verbose_name=_(u'Foreign document data'), help_text=_(u'This represents the metadata of all other documents. Available objects: `document.<attribute>` and `metadata.<metadata_type_name>`.'))
operator = models.CharField(max_length=16, choices=OPERATOR_CHOICES)
expression = models.TextField(verbose_name=_(u'expression'), help_text=_(u'This expression will be evaluated against the current selected document. The document metadata is available as variables `metadata` and document properties under the variable `document`.'))
negated = models.BooleanField(default=False, verbose_name=_(u'negated'), help_text=_(u'Inverts the logic of the operator.'))
enabled = models.BooleanField(default=True, verbose_name=_(u'enabled'))
expression = models.TextField(verbose_name=_(u'Expression'), help_text=_(u'This expression will be evaluated against the current selected document. The document metadata is available as variables `metadata` and document properties under the variable `document`.'))
negated = models.BooleanField(default=False, verbose_name=_(u'Negated'), help_text=_(u'Inverts the logic of the operator.'))
enabled = models.BooleanField(default=True, verbose_name=_(u'Enabled'))
def __unicode__(self):
return u'%s foreign %s %s %s %s' % (self.get_inclusion_display(), self.foreign_document_data, _(u'not') if self.negated else u'', self.get_operator_display(), self.expression)
class Meta:
verbose_name = _(u'link condition')
verbose_name_plural = _(u'link conditions')
verbose_name = _(u'Link condition')
verbose_name_plural = _(u'Link conditions')