Commits

Alexander Nordlund committed 1231eb5

Fully translatable with full Swedish translation included.

Comments (0)

Files changed (3)

gnocchi/blog/locale/sv_SE/LC_MESSAGES/django.po

+# Swedish translation of 
+# Copyright (C) 2012.
+# This file is distributed under the same license as gnocchi-cms.
+# Alexander Nordlund <deep.alexander@gmail.com>, 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: gnocchi-blog\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2012-07-03 20:39+0200\n"
+"PO-Revision-Date: 2012-07-04 14:14+0100\n"
+"Last-Translator: Alexander Nordlund <deep.alexander@gmail.com>\n"
+"Language-Team: Alexander Nordlund <deep.alexander@gmail.com>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-Language: Swedish\n"
+"X-Poedit-Country: SWEDEN\n"
+
+#: .\models.py:22
+msgid "title"
+msgstr "titel"
+
+#: .\models.py:23
+msgid "slug"
+msgstr "skvätt"
+
+#: .\models.py:24
+#: .\models.py:64
+msgid "content"
+msgstr "innehåll"
+
+#: .\models.py:26
+#: .\models.py:66
+msgid "post date"
+msgstr "publicerings datum"
+
+#: .\models.py:27
+msgid "kill date"
+msgstr "slutdatum"
+
+#: .\models.py:29
+msgid "posted by"
+msgstr "skrivet av"
+
+#: .\models.py:30
+msgid "published"
+msgstr "publicerat"
+
+#: .\models.py:34
+msgid "allow comments"
+msgstr "tillåt kommentarer"
+
+#: .\models.py:36
+msgid "tags"
+msgstr "taggar"
+
+#: .\models.py:41
+#: .\models.py:63
+msgid "post"
+msgstr "artikel"
+
+#: .\models.py:42
+msgid "posts"
+msgstr "artiklar"
+
+#: .\models.py:67
+msgid "ip address"
+msgstr "ip adress"
+
+#: .\models.py:69
+msgid "user"
+msgstr "användare"
+
+#: .\models.py:70
+msgid "user name"
+msgstr "användarnamn"
+
+#: .\models.py:71
+msgid "user email"
+msgstr "användarens email"
+
+#: .\models.py:73
+msgid "is public"
+msgstr "offentligt"
+
+#: .\models.py:74
+msgid "is removed"
+msgstr "borttagen"
+
+#: .\models.py:77
+msgid "comment"
+msgstr "kommentar"
+
+#: .\models.py:78
+msgid "comments"
+msgstr "kommentarer"
+

gnocchi/blog/models.py

 
 from datetime import datetime
 
+# Translations
+from django.utils.translation import ugettext_lazy as _
+
 class BlogManager(models.Manager):
     def current(self):
         now = datetime.now()
         )
 
 class Post(models.Model):
-    title = models.CharField(max_length=200)
-    slug = models.SlugField()
-    content = models.TextField(blank=True)
+    title = models.CharField(max_length=200, verbose_name=_("title"))
+    slug = models.SlugField(verbose_name=_("slug"))
+    content = models.TextField(blank=True, verbose_name=_("content"))
 
-    post_date = models.DateTimeField(default=datetime.now)
-    kill_date = models.DateTimeField(null=True, blank=True, default=None)
+    post_date = models.DateTimeField(default=datetime.now, verbose_name=_("post date"))
+    kill_date = models.DateTimeField(null=True, blank=True, default=None, verbose_name=_("kill date"))
     posted_by = models.ForeignKey('auth.User', blank=True, null=True,
-        related_name='blog_posts')
-    published = models.BooleanField(default=False)
+        related_name='blog_posts', verbose_name=_("posted by"), )
+    published = models.BooleanField(default=False, verbose_name=_("published"))
 
     site = models.ForeignKey('sites.Site', null=True, blank=True)
 
-    allow_comments = models.BooleanField(default=True)
+    allow_comments = models.BooleanField(default=True, verbose_name=_("allow comments"))
 
-    tags = TaggableManager(blank=True)
+    tags = TaggableManager(blank=True, verbose_name=_("tags"))
 
     objects = BlogManager()
 
     class Meta:
+        verbose_name = _('post')
+        verbose_name_plural = _('posts')
         ordering = ('-post_date',)
 
     def __unicode__(self):
 
 class Comment(models.Model):
     '''Mostly a copy of django.contrib.comments Comment model'''
-    post = models.ForeignKey(Post)
-    content = models.TextField()
+    post = models.ForeignKey(Post, verbose_name=_("post"))
+    content = models.TextField(verbose_name=_("content"))
 
-    post_date = models.DateTimeField(default=datetime.now)
-    ip_address = models.IPAddressField(blank=True, null=True)
+    post_date = models.DateTimeField(default=datetime.now, verbose_name=_("post date"))
+    ip_address = models.IPAddressField(blank=True, null=True, verbose_name=_("ip address"))
 
-    user = models.ForeignKey('auth.User', null=True, blank=True)
-    user_name = models.CharField(max_length=50)
-    user_email  = models.EmailField(blank=True)
+    user = models.ForeignKey('auth.User', null=True, blank=True, verbose_name=_("user"))
+    user_name = models.CharField(max_length=50, verbose_name=_("user name"))
+    user_email  = models.EmailField(blank=True, verbose_name=_("user email"))
 
-    is_public = models.BooleanField(default=True)
-    is_removed = models.BooleanField(default=True)
+    is_public = models.BooleanField(default=True, verbose_name=_("is public"))
+    is_removed = models.BooleanField(default=True, verbose_name=_("is removed"))
 
     class Meta:
+        verbose_name = _('comment')
+        verbose_name_plural = _('comments')
         ordering = ('post_date',)
 
     def __unicode__(self):
     url = 'http://bitbucket.org/funkybob/gnocchi-blog/',
     keywords = [ 'django', 'blog', ],
     packages = find_packages(),
+	include_package_data = True,
+    namespace_packages = ['gnocchi',],
+    package_data = {
+        'gnocchi.blog': ['locale/*/LC_MESSAGES/*']
+    },
     zip_safe = False,
     classifiers = [
         'Environment :: Web Environment',