Commits

Bertrand Bordage committed 49328be

[i18n-l10n] Introduces french translation.

  • Participants
  • Parent commits 4c767cd

Comments (0)

Files changed (4)

File cmsplugin_poll/admin.py

 
 class PollAdmin(admin.ModelAdmin):
     fieldsets = [
-        (None,                  {"fields": ["question"]}),
-        ("Date information",    {"fields": ["pub_date"]})
+        (None,                     {"fields": ["question"]}),
+        (_("Date information"),    {"fields": ["pub_date"]})
         ]
     inlines = [ChoiceInline]
     actions = [make_closed]

File cmsplugin_poll/cms_plugins.py

 
 class CMSPollPlugin(CMSPluginBase):
     model = PollPlugin
-    name = _("Simple poll plugin")
+    name = _("Simple poll")
     render_template = "cmsplugin_poll/detail.html"
 
     def render(self, context, instance, placeholder):

File cmsplugin_poll/locale/fr/LC_MESSAGES/django.po

+# French translation of cmsplugin_poll.
+# Copyright (C) 2012 Antoine Nguyen
+# This file is distributed under the same license as the cmsplugin_poll package.
+# Bertrand Bordage <bordage.bertrand@gmail.com>, 2012.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: cmsplugin_poll 0.2\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2012-07-15 22:58+0200\n"
+"PO-Revision-Date: 2012-07-15 22:58+0200\n"
+"Last-Translator: Bertrand Bordage <bordage.bertrand@gmail.com>\n"
+"Language: fr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: admin.py:8
+msgid "Close selected polls"
+msgstr "Clore les sondages sélectionnés"
+
+#: admin.py:17
+msgid "Date information"
+msgstr "Informations de date"
+
+#: cms_plugins.py:8
+msgid "Simple poll"
+msgstr "Sondage simple"
+
+#: models.py:6
+msgid "question"
+msgstr "question"
+
+#: models.py:7
+msgid "date published"
+msgstr "date de publication"
+
+#: models.py:8
+msgid "date closed"
+msgstr "date de clôture"
+
+#: models.py:11
+#: templates/cmsplugin_poll/detail.html:2
+msgid "Poll"
+msgstr "Sondage"
+
+#: models.py:12
+msgid "Polls"
+msgstr "Sondages"
+
+#: models.py:34
+msgid "poll"
+msgstr "sondage"
+
+#: models.py:35
+msgid "choice"
+msgstr "choix"
+
+#: models.py:36
+msgid "votes"
+msgstr "votes"
+
+#: models.py:39
+msgid "Choice"
+msgstr "Choix"
+
+#: models.py:40
+msgid "Choices"
+msgstr "Choix"
+
+#: models.py:46
+msgid "Poll to display"
+msgstr "Sondage à afficher"
+
+#: models.py:49
+msgid "Poll plugin"
+msgstr "Bloc de sondage"
+
+#: models.py:50
+msgid "Poll plugins"
+msgstr "Blocs de sondage"
+
+#: views.py:23
+msgid "This poll is closed"
+msgstr "Ce sondage est clos"
+
+#: views.py:25
+msgid "You already vote for this poll"
+msgstr "Vous avez déjà voté dans ce sondage"
+
+#: views.py:30
+msgid "You didn't select a choice"
+msgstr "Vous n'avez pas sélectionné de choix"
+
+#: views.py:34
+msgid "Thank you for your vote"
+msgstr "Merci d'avoir voté"
+
+#: templates/cmsplugin_poll/detail.html:11
+msgid "Vote"
+msgstr "Voter"
+
+#: templates/cmsplugin_poll/latest_polls.html:2
+msgid "Previous polls"
+msgstr "Sondages précédents"
+
+#: templates/cmsplugin_poll/latest_polls.html:10
+msgid "No polls are available."
+msgstr "Aucun sondage disponible."
+
+#: templates/cmsplugin_poll/results.html:2
+msgid "Poll results"
+msgstr "Résultat du sondage"

File cmsplugin_poll/models.py

 from cms.models import CMSPlugin
 
 class Poll(models.Model):
-    question = models.CharField(max_length=300)
-    pub_date = models.DateTimeField('date published')
-    close_date = models.DateTimeField('date closed', null=True)
+    question = models.CharField(_('question'), max_length=300)
+    pub_date = models.DateTimeField(_('date published'))
+    close_date = models.DateTimeField(_('date closed'), null=True)
+
+    class Meta:
+        verbose_name = _('Poll')
+        verbose_name_plural = _('Polls')
 
     def __unicode__(self):
         return unicode(self.question)
         return choice.votes / float(total) * 100.0
 
 class Choice(models.Model):
-    poll = models.ForeignKey(Poll)
-    choice = models.CharField(max_length=200)
-    votes = models.IntegerField(default=0)
+    poll = models.ForeignKey(Poll, verbose_name=_('poll'))
+    choice = models.CharField(_('choice'), max_length=200)
+    votes = models.IntegerField(_('votes'), default=0)
+
+    class Meta:
+        verbose_name = _('Choice')
+        verbose_name_plural = _('Choices')
+
+    def __unicode__(self):
+        return '%s (%s)' % (self.choice, self.poll)
 
 class PollPlugin(CMSPlugin):
     poll = models.ForeignKey(Poll, verbose_name=_("Poll to display"))
 
+    class Meta:
+        verbose_name = _('Poll plugin')
+        verbose_name_plural = _('Poll plugins')
+
     def __unicode__(self):
         return self.poll.question