Commit c03e92f3 authored by Aymeric Barantal's avatar Aymeric Barantal

fix some i18n issues

parent 3f000279
......@@ -35,8 +35,8 @@ class Argumentary(models.Model):
text = models.TextField(null=True)
def __unicode__(self):
return _('Argumentary in %(lang) for %(title)') % {'lang': self.lang,
'title': self.campaign.title}
args = {'lang': self.lang, 'title': self.campaign.title}
return _('Argumentary in %(lang)s for %(title)s') % args
class CampaignContact(models.Model):
......@@ -47,8 +47,8 @@ class CampaignContact(models.Model):
weight = models.IntegerField(default=0)
def __unicode__(self):
return _('Contact %(ccontact) on %(title)') % {'contact': self.contact,
'title': self.campaign.title}
args = {'contact': self.contact, 'title': self.campaign.title}
return _('Contact %(contact)s on %(title)s') % args
def all_groups(self):
return [x.name for x in self.contact.groups.all()]
......@@ -13,8 +13,8 @@ class Contact(models.Model):
photo = models.ImageField(upload_to='contacts/photos', blank=True)
def __unicode__(self):
return _('%(firstname) %(lastname)') % {'firstname': self.first_name,
'lastname': self.last_name}
return _('%(firstname)s %(lastname)s') % {'firstname': self.first_name,
'lastname': self.last_name}
def get_photo_url(self):
if self.photo:
......
......@@ -11,6 +11,6 @@ class Feedback(models.Model):
comment = models.CharField(max_length=512, blank=True)
def __unicode__(self):
return _('feedback for %(callee contact) on %(campaign title)') % \
return _('feedback for %(callee contact)s on %(campaign title)s') % \
{'callee contact': self.callee.contact,
'campaign title': self.callee.campaign.title}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment