Merge branch 'master' into debian

This commit is contained in:
Jérôme Schneider 2013-06-25 11:49:33 +02:00
commit c348c1031d
5 changed files with 31 additions and 23 deletions

View File

@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: portail-citoyen-announces 0.1.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-04-23 22:31+0200\n"
"PO-Revision-Date: 2013-06-04 16:48+0200\n"
"POT-Creation-Date: 2013-06-24 11:20+0200\n"
"PO-Revision-Date: 2013-06-24 11:20+0200\n"
"Last-Translator: Benjamin Dauvergne <bdauvergne@entrouvert.com>\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
@ -16,15 +16,15 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: admin.py:21
#: admin.py:22
msgid "Send by {0}"
msgstr "Envoyé via {0}"
#: admin.py:56
#: admin.py:59
msgid "extract"
msgstr "extrait"
#: admin.py:60 models.py:75
#: admin.py:63 models.py:75
msgid "sent"
msgstr "envoyé via"
@ -122,15 +122,19 @@ msgstr "ex.: courriel, numéro de téléphone mobile, identifiant jabber"
msgid "subscription"
msgstr "abonnement"
#: transports.py:70
msgid "homepage"
msgstr "page d'accueil"
#: transports.py:81
msgid "Homepage"
msgstr "Page d'accueil"
#: transports.py:91
msgid "email"
msgstr "courriel"
#: transports.py:93
msgid "SMS"
msgstr ""
#: templates/portail_citoyen_announces/announce_list.html:12
#: transports.py:176
msgid "Email"
msgstr "Courriel"
#: templates/portail_citoyen_announces/announce_list.html:13
msgid "Subscriptions"
msgstr "Abonnements"
@ -143,3 +147,6 @@ msgstr "Catégorie"
#: templates/portail_citoyen_announces/subscription_edit.html:31
msgid "Modify"
msgstr "Modifier"
#~ msgid "sms"
#~ msgstr "SMS"

View File

@ -48,7 +48,7 @@ class Announce(models.Model):
creation_time = models.DateTimeField(_('creation time'), auto_now_add=True)
modification_time = models.DateTimeField(_('modification time'), auto_now=True)
category = models.ForeignKey('Category', verbose_name=_('category'), blank=True)
category = models.ForeignKey('Category', verbose_name=_('category'))
def __unicode__(self):
return u'{title} ({id}) at {modification_time}'.format(title=self.title,

View File

@ -3,19 +3,19 @@
<form method="post">
{% csrf_token %}
{{ form.non_field_errors }}
<table>
<table class="announces">
<thead>
<tr>
<td>{% trans "Category" %}</td>
{% for choice_key, choice_name in form.choices %}
<td>{{ choice_name }}</td>
<th>{{ choice_name }}</th>
{% endfor %}
</tr>
</thead>
<tbody>
{% for field in form %}
<tr>
<td>{{ field.label }}</td>
<th>{{ field.label }}</th>
{% for subwidget in field %}
<td>{{ subwidget.tag }}</td>
{% endfor %}

View File

@ -5,19 +5,19 @@
<form method="post">
{% csrf_token %}
{{ form.non_field_errors }}
<table>
<table class="announces">
<thead>
<tr>
<td>{% trans "Category" %}</td>
{% for choice_key, choice_name in form.choices %}
<td>{{ choice_name }}</td>
<th>{{ choice_name }}</th>
{% endfor %}
</tr>
</thead>
<tbody>
{% for field in form %}
<tr>
<td>{{ field.label }}</td>
<th>{{ field.label }}</th>
{% for subwidget in field %}
<td>{{ subwidget.tag }}</td>
{% endfor %}

View File

@ -78,7 +78,7 @@ class HomepageTransport(object):
identifier = 'homepage'
def get_choices(self):
return (('homepage', _('homepage')),)
return (('homepage', _('Homepage')),)
class SMSTransport(object):
@ -90,15 +90,16 @@ class SMSTransport(object):
]
mobile_re = re.compile('^0[67][0-9]{8}$')
def __init__(self, url, from_mobile, login=None, password=None, identifier='sms'):
def __init__(self, url, from_mobile, login=None, password=None, identifier='sms', name=_('SMS')):
self.url = url
self.from_mobile = from_mobile
self.login = login
self.password = password
self.identifier = identifier
self.name = name
def get_choices(self):
return ((self.identifier, self.identifier),)
return ((self.identifier, self.name),)
def get_subscriptions(self, category):
return models.Subscription.objects.filter(category=category,
@ -172,7 +173,7 @@ class EmailTransport(object):
]
def get_choices(self):
return (('email', _('email')),)
return (('email', _('Email')),)
def get_subscriptions(self, category):
return models.Subscription.objects.filter(category=category,