Commits

Marion Balensi committed e5cc9f6 Draft

Internationalization and french localization.

  • Participants
  • Parent commits aab3f25

Comments (0)

Files changed (6)

 Bernardo Cabezas Serra / apsl.net
 Bertrand Bordage
+Marion Balensi

File cmsplugin_nivoslider/cms_plugins.py

 from cms.plugin_base import CMSPluginBase
 from cms.plugin_pool import plugin_pool
 from .models import SliderPlugin
+from django.utils.translation import ugettext_lazy as _
 
 
 class CMSSliderPlugin(CMSPluginBase):
     model = SliderPlugin
-    name = 'Slider'
+    name = _('Slider')
     render_template = 'nivo/slider.html'
     text_enabled = False
     admin_preview = False

File cmsplugin_nivoslider/locale/fr/LC_MESSAGES/django.mo

Binary file added.

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

+# French translation of the cmsplugin_nivoslider.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the cmsplugin_nivoslider package.
+# Marion Balensi <kitsunesama@laposte.net>, 2012.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: cmsplugin_nivoslider 0.4\n"
+"POT-Creation-Date: 2012-07-26 14:31+0200\n"
+"PO-Revision-Date: 2012-07-26 15:08+0200\n"
+"Last-Translator: Marion Balensi <kitsunesama@laposte.net>\n"
+"Language: fr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n > 1)\n"
+
+#: cms_plugins.py:11
+msgid "Slider"
+msgstr "Diaporama"
+
+#: models.py:44
+msgid "title"
+msgstr "titre"
+
+#: models.py:45
+msgid "album"
+msgstr "album"
+
+#: models.py:46
+msgid "theme"
+msgstr "thème"
+
+#: models.py:48
+msgid "effect"
+msgstr "effet"
+
+#: models.py:50
+msgid "manual advance"
+msgstr "avancée manuelle"
+
+#: models.py:51
+msgid "anim speed"
+msgstr "durée d'animation"
+
+#: models.py:52
+msgid "Animation Speed (ms)"
+msgstr "Durée d'animation (en ms)"
+
+#: models.py:53
+msgid "pause time"
+msgstr "temps de pause"
+
+#: models.py:54
+msgid "Pause time (ms)"
+msgstr "Temps de pause (en ms)"
+
+#: models.py:55
+msgid "width"
+msgstr "largeur"
+
+#: models.py:56
+msgid "Width of the plugin (px)"
+msgstr "Largeur imposée au diaporama (en pixels)"
+
+#: models.py:57
+msgid "height"
+msgstr "hauteur"
+
+#: models.py:58
+msgid "Height of the plugin (px)"
+msgstr "Hauteur imposée au diaporama (en pixels)"
+
+#: models.py:59
+msgid "arrows"
+msgstr "flèches"
+
+#: models.py:60
+msgid "Arrow buttons for navigation"
+msgstr "Navigation avec les flèches"
+
+#: models.py:61
+msgid "thumbnails"
+msgstr "miniatures"
+
+#: models.py:62
+msgid "Thumbnails for navigation [only works with the default theme!]"
+msgstr "Navigation par miniatures [ne fonctionne qu'avec le thème « default »]"
+
+#: models.py:64
+msgid "random start"
+msgstr "diapositive de départ aléatoire"
+
+#: models.py:65
+msgid "pause on mouse hover"
+msgstr "pause lors du survol de la souris"
+
+#: templates/nivo/slider.html:27
+msgid "prev"
+msgstr "précédent"
+
+#: templates/nivo/slider.html:28
+msgid "next"
+msgstr "suivant"

File cmsplugin_nivoslider/models.py

 # coding: utf-8
 
 from django.db.models import BooleanField, PositiveIntegerField, \
-                             CharField
+                              CharField
 
 from cms.models import CMSPlugin
 from filer.fields.folder import FilerFolderField
 from django.contrib.staticfiles.finders import find as staticfiles_find
+from django.utils.translation import ugettext, ugettext_lazy as _
 import os
 
 
 
 
 class SliderPlugin(CMSPlugin):
-    title = CharField('title', max_length=255, null=True, blank=True)
-    album = FilerFolderField()
-    theme = CharField(choices=THEME_CHOICES, max_length=50, default="default")
-    effect = CharField(choices=EFFECT_CHOICES, max_length=50, default="random")
-    manual_advance = BooleanField()
-    anim_speed = PositiveIntegerField(default=500,
-                                      help_text="Animation Speed (ms)")
-    pause_time = PositiveIntegerField(default=3000,
-                                      help_text="Pause time (ms)")
-    width = PositiveIntegerField(null=True, blank=True,
-                                 help_text="Width of the plugin (px)")
-    height = PositiveIntegerField(null=True, blank=True,
-                                  help_text="Height of the plugin (px)")
-    arrows = BooleanField(default=True, help_text='Arrow buttons for '
-                                                  'navigation')
-    thumbnails = BooleanField(help_text='Thumbnails for navigation '
-                                        '[only works with the default theme!]')
-    random_start = BooleanField()
-    pause_on_hover = BooleanField('pause on mouse hover')
+    title = CharField(_('title'), max_length=255, null=True, blank=True)
+    album = FilerFolderField(verbose_name=_('album'))
+    theme = CharField(_('theme'), choices=THEME_CHOICES, max_length=50,
+                      default="default")
+    effect = CharField(_('effect'), choices=EFFECT_CHOICES, max_length=50,
+                       default="random")
+    manual_advance = BooleanField(_('manual advance'))
+    anim_speed = PositiveIntegerField(_('anim speed'), default=500,
+                                      help_text=_("Animation Speed (ms)"))
+    pause_time = PositiveIntegerField(_('pause time'), default=3000,
+                                      help_text=_("Pause time (ms)"))
+    width = PositiveIntegerField(_('width'), null=True, blank=True,
+                                 help_text=_("Width of the plugin (px)"))
+    height = PositiveIntegerField(_('height'), null=True, blank=True,
+                                  help_text=_("Height of the plugin (px)"))
+    arrows = BooleanField(_('arrows'), default=True,
+                          help_text=_('Arrow buttons for navigation'))
+    thumbnails = BooleanField(_('thumbnails'),
+                              help_text=_('Thumbnails for navigation [only '
+                                          'works with the default theme!]'))
+    random_start = BooleanField(_('random start'))
+    pause_on_hover = BooleanField(_('pause on mouse hover'))
 
     def __unicode__(self):
         if self.title:
 
 setup(
     name='cmsplugin-nivoslider',
-    version='0.3',
-    author='Bernardo Cabezas Serra, Bertrand Bordage',
+    version='0.4',
+    author='Bernardo Cabezas Serra, Bertrand Bordage, Marion Balensi',
     author_email='bcabezas@apsl.net',
     packages = find_packages(),
     license='MIT',