Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
La Quadrature du Net
piphone
campaign
Commits
c03e92f3
Commit
c03e92f3
authored
Nov 23, 2014
by
Aymeric Barantal
Browse files
fix some i18n issues
parent
3f000279
Changes
3
Show whitespace changes
Inline
Side-by-side
picampaign/campaign/models.py
View file @
c03e92f3
...
...
@@ -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
()]
picampaign/contact/models.py
View file @
c03e92f3
...
...
@@ -13,7 +13,7 @@ class Contact(models.Model):
photo
=
models
.
ImageField
(
upload_to
=
'contacts/photos'
,
blank
=
True
)
def
__unicode__
(
self
):
return
_
(
'%(firstname) %(lastname)'
)
%
{
'firstname'
:
self
.
first_name
,
return
_
(
'%(firstname)
s
%(lastname)
s
'
)
%
{
'firstname'
:
self
.
first_name
,
'lastname'
:
self
.
last_name
}
def
get_photo_url
(
self
):
...
...
picampaign/feedback/models.py
View file @
c03e92f3
...
...
@@ -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
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment