From b6142d86df93b54470538eca1eae0bf7c0ee5f2e Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Wed, 12 Mar 2014 16:21:34 +0100 Subject: [PATCH 1/6] Rename views --- djangocms_blog/feeds.py | 2 +- djangocms_blog/urls.py | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/djangocms_blog/feeds.py b/djangocms_blog/feeds.py index c458540..4ce5252 100644 --- a/djangocms_blog/feeds.py +++ b/djangocms_blog/feeds.py @@ -10,7 +10,7 @@ from .models import Post class LatestEntriesFeed(Feed): def link(self): - return reverse('djangocms_blog:latest-posts') + return reverse('djangocms_blog:posts-latest') def title(self): return _('Blog articles on %(site_name)s') % {'site_name': Site.objects.get_current().name} diff --git a/djangocms_blog/urls.py b/djangocms_blog/urls.py index ff4bc45..41cf7a4 100644 --- a/djangocms_blog/urls.py +++ b/djangocms_blog/urls.py @@ -8,13 +8,13 @@ from .feeds import LatestEntriesFeed, TagFeed urlpatterns = patterns( '', - url(r'^$', PostListView.as_view(), name='latest-posts'), - url(r'^feed/$', LatestEntriesFeed(), name='latest-posts-feed'), - url(r'^(?P\d{4})/$', PostArchiveView.as_view(), name='archive-year'), - url(r'^(?P\d{4})/(?P\d{1,2})/$', PostArchiveView.as_view(), name='archive-month'), + url(r'^$', PostListView.as_view(), name='posts-latest'), + url(r'^feed/$', LatestEntriesFeed(), name='posts-latest-feed'), + url(r'^(?P\d{4})/$', PostArchiveView.as_view(), name='posts-archive'), + url(r'^(?P\d{4})/(?P\d{1,2})/$', PostArchiveView.as_view(), name='posts-archive'), url(r'^(?P\d{4})/(?P\d{1,2})/(?P\d{1,2})/(?P\w[-\w]*)/$', PostDetailView.as_view(), name='post-detail'), - url(r'^author/(?P[\w\.@+-]+)/$', AuthorEntriesView.as_view(), name='author-posts'), - url(r'^category/(?P[\w\.@+-]+)/$', CategoryEntriesView.as_view(), name='category-posts'), - url(r'^tag/(?P[-\w]+)/$', TaggedListView.as_view(), name='tagged-posts'), - url(r'^tag/(?P[-\w]+)/feed/$', TagFeed(), name='tagged-posts-feed'), + url(r'^author/(?P[\w\.@+-]+)/$', AuthorEntriesView.as_view(), name='posts-author'), + url(r'^category/(?P[\w\.@+-]+)/$', CategoryEntriesView.as_view(), name='posts-category'), + url(r'^tag/(?P[-\w]+)/$', TaggedListView.as_view(), name='posts-tagged'), + url(r'^tag/(?P[-\w]+)/feed/$', TagFeed(), name='posts-tagged-feed'), ) From 2515b2a64637c08e87078399faec983e248a018e Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Thu, 13 Mar 2014 22:16:40 +0100 Subject: [PATCH 2/6] Add support for view_url_name. Smarter toolbar menu. Sync with latest parler updates. --- djangocms_blog/cms_toolbar.py | 12 +++++++++++- djangocms_blog/models.py | 2 ++ djangocms_blog/views.py | 33 +++++++++++++++++++++------------ 3 files changed, 34 insertions(+), 13 deletions(-) diff --git a/djangocms_blog/cms_toolbar.py b/djangocms_blog/cms_toolbar.py index 115d750..83f091b 100644 --- a/djangocms_blog/cms_toolbar.py +++ b/djangocms_blog/cms_toolbar.py @@ -5,13 +5,23 @@ from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ +from .models import BLOG_CURRENT_POST_IDENTIFIER + @toolbar_pool.register class BlogToolbar(CMSToolbar): def populate(self): + if not (self.is_current_app and self.request.user.has_perm('djangocms_blog.add_post')): + return admin_menu = self.toolbar.get_or_create_menu("djangocms_blog", _('Blog')) url = reverse('admin:djangocms_blog_post_changelist') admin_menu.add_modal_item(_('Post list'), url=url) url = reverse('admin:djangocms_blog_post_add') - admin_menu.add_modal_item(_('Add post'), url=url) \ No newline at end of file + admin_menu.add_modal_item(_('Add post'), url=url) + + current_post = getattr(self.request, BLOG_CURRENT_POST_IDENTIFIER, None) + if current_post and self.request.user.has_perm('djangocms_blog.change_post'): + admin_menu.add_modal_item(_('Edit Post'),reverse( + 'admin:djangocms_blog_post_change', args=(current_post.pk,)), + active=True) \ No newline at end of file diff --git a/djangocms_blog/models.py b/djangocms_blog/models.py index 24921b0..1aca99e 100644 --- a/djangocms_blog/models.py +++ b/djangocms_blog/models.py @@ -17,6 +17,7 @@ from taggit_autosuggest.managers import TaggableManager from . import settings from .managers import GenericDateTaggedManager +BLOG_CURRENT_POST_IDENTIFIER = 'djangocms_post_current' class BlogCategory(TranslatableModel): """ @@ -101,6 +102,7 @@ class Post(TranslatableModel): verbose_name = _('blog article') verbose_name_plural = _('blog articles') ordering = ("-date_published", "-date_created") + get_latest_by = 'date_published' def __unicode__(self): return self.safe_translation_getter('title') diff --git a/djangocms_blog/views.py b/djangocms_blog/views.py index efb7e2b..8a30619 100644 --- a/djangocms_blog/views.py +++ b/djangocms_blog/views.py @@ -1,23 +1,23 @@ # -*- coding: utf-8 -*- import datetime -from cms.utils import get_language_from_request +from django.utils.translation import get_language from django.contrib.auth.models import User from django.core.urlresolvers import resolve -from django.db.models import Count from django.http import Http404 -from django.utils.translation import ugettext_lazy as _ from django.views.generic import ListView, DetailView from parler.utils import get_active_language_choices -from .models import Post, BlogCategory +from parler.views import ViewUrlMixin + +from .models import Post, BlogCategory, BLOG_CURRENT_POST_IDENTIFIER from .settings import BLOG_PAGINATION, BLOG_POSTS_LIST_TRUNCWORDS_COUNT -class BaseBlogView(object): +class BaseBlogView(ViewUrlMixin): def get_queryset(self): - language = get_language_from_request(self.request) - manager = self.model._default_manager.translated(language) + language = get_language() + manager = self.model._default_manager.language(language) if not self.request.user.is_staff: manager = manager.filter(publish=True) return manager @@ -32,6 +32,7 @@ class PostListView(BaseBlogView, ListView): context_object_name = 'post_list' template_name = "djangocms_blog/post_list.html" paginate_by = BLOG_PAGINATION + view_url_name = 'djangocms_blog:posts-latest' def get_context_data(self, **kwargs): context = super(PostListView, self).get_context_data(**kwargs) @@ -43,18 +44,22 @@ class PostDetailView(BaseBlogView, DetailView): model = Post context_object_name = 'post' template_name = "djangocms_blog/post_detail.html" - slug_field = 'translations__slug' + slug_field = 'slug' + view_url_name = 'djangocms_blog:post-detail' def get_object(self, queryset=None): try: - qs = self.model._default_manager.get(**{ - 'translations__language_code': get_language_from_request(self.request), + qs = self.model._default_manager.active_translations(**{ self.slug_field: self.kwargs.get(self.slug_url_kwarg, None) - }) + }).latest() except Post.DoesNotExist: raise Http404() return qs + def get_context_data(self, **kwargs): + context = super(PostDetailView, self).get_context_data(**kwargs) + setattr(self.request, BLOG_CURRENT_POST_IDENTIFIER, self.get_object()) + return context class PostArchiveView(BaseBlogView, ListView): model = Post @@ -64,6 +69,7 @@ class PostArchiveView(BaseBlogView, ListView): allow_empty = True allow_future = True paginate_by = BLOG_PAGINATION + view_url_name = 'djangocms_blog:posts-archive' def get_queryset(self): qs = super(PostArchiveView, self).get_queryset() @@ -86,6 +92,7 @@ class TaggedListView(BaseBlogView, ListView): context_object_name = 'post_list' template_name = "djangocms_blog/post_list.html" paginate_by = BLOG_PAGINATION + view_url_name = 'djangocms_blog:posts-tagged' def get_queryset(self): qs = super(TaggedListView, self).get_queryset() @@ -102,6 +109,7 @@ class AuthorEntriesView(BaseBlogView, ListView): context_object_name = 'post_list' template_name = "djangocms_blog/post_list.html" paginate_by = BLOG_PAGINATION + view_url_name = 'djangocms_blog:posts-authors' def get_queryset(self): qs = super(AuthorEntriesView, self).get_queryset() @@ -120,11 +128,12 @@ class CategoryEntriesView(BaseBlogView, ListView): template_name = "djangocms_blog/post_list.html" _category = None paginate_by = BLOG_PAGINATION + view_url_name = 'djangocms_blog:posts-category' @property def category(self): if not self._category: - language = get_language_from_request(self.request) + language = get_language() self._category = BlogCategory._default_manager.language(language).get( translations__language_code=language, translations__slug=self.kwargs['category']) From 118398c3f0d0abf4538ce9725b25085f1960de5a Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Sun, 23 Mar 2014 16:23:16 +0100 Subject: [PATCH 3/6] Update templates. Add support for canonical URLs. --- .../templates/djangocms_blog/includes/blog_item.html | 6 +++--- .../templates/djangocms_blog/plugins/archive.html | 4 ++-- .../templates/djangocms_blog/plugins/authors.html | 2 +- .../templates/djangocms_blog/plugins/categories.html | 2 +- djangocms_blog/templates/djangocms_blog/plugins/tags.html | 2 +- djangocms_blog/templates/djangocms_blog/post_detail.html | 7 ++++--- djangocms_blog/templates/djangocms_blog/post_list.html | 4 +++- 7 files changed, 15 insertions(+), 12 deletions(-) diff --git a/djangocms_blog/templates/djangocms_blog/includes/blog_item.html b/djangocms_blog/templates/djangocms_blog/includes/blog_item.html index d44e10d..f7884d0 100644 --- a/djangocms_blog/templates/djangocms_blog/includes/blog_item.html +++ b/djangocms_blog/templates/djangocms_blog/includes/blog_item.html @@ -7,7 +7,7 @@ {% block blog_meta %}
  • - {% trans "by" %} {{ post.author.get_full_name }} + {% trans "by" %} {{ post.author.get_full_name }}
  • {{ post.date_published|date:"M d, Y" }} @@ -16,12 +16,12 @@
      {% if post.categories.exists %} {% for category in post.categories.all %} -
    • {{ category.name }}{% if not forloop.last %}, {% endif %}
    • +
    • {{ category.name }}{% if not forloop.last %}, {% endif %}
    • {% endfor %} {% endif %} {% if post.tags.exists %} {% for tag in post.tags.all %} -
    • {{ tag.name }}{% if not forloop.last %}, {% endif %}
    • +
    • {{ tag.name }}{% if not forloop.last %}, {% endif %}
    • {% endfor %} {% endif %}
    diff --git a/djangocms_blog/templates/djangocms_blog/plugins/archive.html b/djangocms_blog/templates/djangocms_blog/plugins/archive.html index 1f83e06..c0dc686 100644 --- a/djangocms_blog/templates/djangocms_blog/plugins/archive.html +++ b/djangocms_blog/templates/djangocms_blog/plugins/archive.html @@ -7,11 +7,11 @@
      {% for year in years %} - {{ year.grouper }} + {{ year.grouper }}
        {% for month in year.list %} - + {{ month.date|date:"F" }} ( {% if month.count > 0 %} diff --git a/djangocms_blog/templates/djangocms_blog/plugins/authors.html b/djangocms_blog/templates/djangocms_blog/plugins/authors.html index 26d1fe6..9669eb6 100644 --- a/djangocms_blog/templates/djangocms_blog/plugins/authors.html +++ b/djangocms_blog/templates/djangocms_blog/plugins/authors.html @@ -3,7 +3,7 @@

        {% trans "Authors" %}

          {% for author in instance.get_authors %} -
        • +
        • {{ author.get_full_name }} ( {% if author.count > 0 %} diff --git a/djangocms_blog/templates/djangocms_blog/plugins/categories.html b/djangocms_blog/templates/djangocms_blog/plugins/categories.html index d8a1406..4c3f384 100644 --- a/djangocms_blog/templates/djangocms_blog/plugins/categories.html +++ b/djangocms_blog/templates/djangocms_blog/plugins/categories.html @@ -4,7 +4,7 @@

          {% trans "Categories" %}

            {% for category in categories %} -
          • +
          • {{ category.name }} ( {% if category.count > 0 %} diff --git a/djangocms_blog/templates/djangocms_blog/plugins/tags.html b/djangocms_blog/templates/djangocms_blog/plugins/tags.html index 9d954ca..d45adb4 100644 --- a/djangocms_blog/templates/djangocms_blog/plugins/tags.html +++ b/djangocms_blog/templates/djangocms_blog/plugins/tags.html @@ -4,7 +4,7 @@

            {% trans "Tags" %}

              {% for tag in tags %} -
            • +
            • {{ tag.name }} ( {% if tag.count > 0 %} diff --git a/djangocms_blog/templates/djangocms_blog/post_detail.html b/djangocms_blog/templates/djangocms_blog/post_detail.html index f670e0b..5cfb7f0 100644 --- a/djangocms_blog/templates/djangocms_blog/post_detail.html +++ b/djangocms_blog/templates/djangocms_blog/post_detail.html @@ -4,6 +4,7 @@ {% block meta_description %}{{ post.meta_description }}{% endblock meta_description %} {% block meta_keywords %}{{ post.meta_keywords }}{% endblock meta_keywords %} +{% block canonical_url %}{% endblock canonical_url %} {% block content_blog %}{% spaceless %}
              @@ -12,7 +13,7 @@ {% block blog_meta %}
              • - {% trans "by" %} {{ post.author.get_full_name }} + {% trans "by" %} {{ post.author.get_full_name }}
              • {{ post.date_published|date:"M d, Y" }} @@ -21,12 +22,12 @@
                  {% if post.categories.exists %} {% for category in post.categories.all %} -
                • {{ category.name }}{% if not forloop.last %}, {% endif %}
                • +
                • {{ category.name }}{% if not forloop.last %}, {% endif %}
                • {% endfor %} {% endif %} {% if post.tags.exists %} {% for tag in post.tags.all %} -
                • {{ tag.name }}{% if not forloop.last %}, {% endif %}
                • +
                • {{ tag.name }}{% if not forloop.last %}, {% endif %}
                • {% endfor %} {% endif %}
                diff --git a/djangocms_blog/templates/djangocms_blog/post_list.html b/djangocms_blog/templates/djangocms_blog/post_list.html index c735cd5..7c3cf4a 100644 --- a/djangocms_blog/templates/djangocms_blog/post_list.html +++ b/djangocms_blog/templates/djangocms_blog/post_list.html @@ -1,6 +1,8 @@ {% extends "djangocms_blog/base.html" %} {% load i18n thumbnail %}{% spaceless %} +{% block canonical_url %}{% endblock canonical_url %} + {% block content_blog %}
                {% block blog_title %} @@ -19,7 +21,7 @@

                {% trans "No article found." %}

                {% endfor %} {% if author or archive_date or tagged_entries %} -

                {% trans "Back" %}

                +

                {% trans "Back" %}

                {% endif %} {% if is_paginated %} From 0f7661724d573af58a6d435fc924fdf67952df31 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Mon, 24 Mar 2014 07:35:16 +0100 Subject: [PATCH 4/6] Update translations --- .../locale/en/LC_MESSAGES/django.mo | Bin 2871 -> 2871 bytes .../locale/en/LC_MESSAGES/django.po | 91 +++++++------- .../locale/it/LC_MESSAGES/django.mo | Bin 2920 -> 3111 bytes .../locale/it/LC_MESSAGES/django.po | 116 ++++++++++-------- .../locale/ru/LC_MESSAGES/django.mo | Bin 3543 -> 3543 bytes .../locale/ru/LC_MESSAGES/django.po | 90 +++++++------- 6 files changed, 162 insertions(+), 135 deletions(-) diff --git a/djangocms_blog/locale/en/LC_MESSAGES/django.mo b/djangocms_blog/locale/en/LC_MESSAGES/django.mo index d40f08ed65c9e53b4f4af668d1387d3d37a7edfe..00e8d8eb41c2eee6328cc5811fa416c1e9d55851 100644 GIT binary patch delta 21 ccmdlkwq0z4BRhwYrGlZEm9gPwPxg1r07c>k9{>OV delta 21 ccmdlkwq0z4BRhwIse++}m4U@(Pxg1r07btB9{>OV diff --git a/djangocms_blog/locale/en/LC_MESSAGES/django.po b/djangocms_blog/locale/en/LC_MESSAGES/django.po index d0a0c10..0d202c8 100644 --- a/djangocms_blog/locale/en/LC_MESSAGES/django.po +++ b/djangocms_blog/locale/en/LC_MESSAGES/django.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-03-05 18:08+0100\n" +"POT-Creation-Date: 2014-03-29 16:31+0100\n" "PO-Revision-Date: 2014-03-05 18:09+0100\n" "Last-Translator: Iacopo Spalletti\n" "Language-Team: Italian \n" @@ -18,7 +18,7 @@ msgstr "" "X-Generator: Lokalize 1.5\n" #: cms_app.py:8 cms_plugins.py:32 cms_plugins.py:45 cms_plugins.py:56 -#: cms_plugins.py:67 cms_toolbar.py:13 +#: cms_plugins.py:67 cms_toolbar.py:17 msgid "Blog" msgstr "Blog" @@ -38,146 +38,155 @@ msgstr "Tags" msgid "Categories" msgstr "Categories" -#: cms_plugins.py:68 templates/djangocms_blog/post_list.html:10 +#: cms_plugins.py:68 templates/djangocms_blog/post_list.html:12 #: templates/djangocms_blog/plugins/archive.html:4 msgid "Archive" msgstr "Archive" -#: cms_toolbar.py:15 +#: cms_toolbar.py:19 msgid "Post list" msgstr "Post list" -#: cms_toolbar.py:17 +#: cms_toolbar.py:21 msgid "Add post" msgstr "Add post" +#: cms_toolbar.py:25 +msgid "Edit Post" +msgstr "" + #: feeds.py:16 #, python-format msgid "Blog articles on %(site_name)s" msgstr "Blog articles on %(site_name)s" -#: models.py:27 +#: models.py:28 msgid "parent" msgstr "parent" -#: models.py:29 +#: models.py:30 msgid "created at" msgstr "created at" -#: models.py:30 +#: models.py:31 msgid "modified at" msgstr "modified at" -#: models.py:33 +#: models.py:34 msgid "name" msgstr "name" -#: models.py:34 models.py:87 +#: models.py:35 models.py:88 msgid "slug" msgstr "slug" -#: models.py:41 +#: models.py:42 msgid "blog category" msgstr "blog category" -#: models.py:42 +#: models.py:43 msgid "blog categories" msgstr "blog categories" -#: models.py:64 +#: models.py:65 msgid "Author" msgstr "Author" -#: models.py:68 +#: models.py:69 msgid "Published Since" msgstr "Published Since" -#: models.py:70 +#: models.py:71 msgid "Published Until" msgstr "Published Until" -#: models.py:72 +#: models.py:73 msgid "Publish" msgstr "Publish" -#: models.py:73 +#: models.py:74 msgid "category" msgstr "category" -#: models.py:75 +#: models.py:76 msgid "Main image" msgstr "Main image" -#: models.py:77 +#: models.py:78 msgid "Main image thumbnail" msgstr "Main image thumbnail" -#: models.py:81 +#: models.py:82 msgid "Main image full" msgstr "Main image full" -#: models.py:86 +#: models.py:87 msgid "Title" msgstr "Title" -#: models.py:88 +#: models.py:89 msgid "Text" msgstr "Text" -#: models.py:89 +#: models.py:90 msgid "Post meta description" msgstr "Post meta description" -#: models.py:99 +#: models.py:92 +#, fuzzy +msgid "Post meta keywords" +msgstr "Post meta description" + +#: models.py:102 msgid "blog article" msgstr "blog article" -#: models.py:100 +#: models.py:103 msgid "blog articles" msgstr "blog articles" -#: models.py:143 models.py:168 +#: models.py:147 models.py:172 msgid "Articles" msgstr "Articles" -#: models.py:144 +#: models.py:148 msgid "The number of latests articles to be displayed." msgstr "The number of latests articles to be displayed." -#: models.py:146 +#: models.py:150 msgid "Show only the blog articles tagged with chosen tags." msgstr "Show only the blog articles tagged with chosen tags." -#: models.py:148 +#: models.py:152 msgid "Show only the blog articles tagged with chosen categories." msgstr "Show only the blog articles tagged with chosen categories." -#: models.py:165 templates/djangocms_blog/plugins/authors.html:3 +#: models.py:169 templates/djangocms_blog/plugins/authors.html:3 msgid "Authors" msgstr "Authors" -#: models.py:169 +#: models.py:173 msgid "The number of author articles to be displayed." msgstr "The number of author articles to be displayed." -#: templates/djangocms_blog/post_detail.html:14 +#: templates/djangocms_blog/post_detail.html:16 #: templates/djangocms_blog/includes/blog_item.html:10 msgid "by" msgstr "by" -#: templates/djangocms_blog/post_list.html:9 +#: templates/djangocms_blog/post_list.html:11 msgid "Articles by" msgstr "Articles by" -#: templates/djangocms_blog/post_list.html:11 +#: templates/djangocms_blog/post_list.html:13 msgid "Tag" msgstr "Tag" -#: templates/djangocms_blog/post_list.html:12 +#: templates/djangocms_blog/post_list.html:14 msgid "Category" msgstr "Category" -#: templates/djangocms_blog/post_list.html:19 +#: templates/djangocms_blog/post_list.html:21 #: templates/djangocms_blog/plugins/archive.html:27 #: templates/djangocms_blog/plugins/authors.html:15 #: templates/djangocms_blog/plugins/categories.html:16 @@ -186,23 +195,23 @@ msgstr "Category" msgid "No article found." msgstr "No article found." -#: templates/djangocms_blog/post_list.html:22 +#: templates/djangocms_blog/post_list.html:24 msgid "Back" msgstr "Back" -#: templates/djangocms_blog/post_list.html:28 +#: templates/djangocms_blog/post_list.html:30 msgid "previous" msgstr "previous" -#: templates/djangocms_blog/post_list.html:31 +#: templates/djangocms_blog/post_list.html:33 msgid "Page" msgstr "Page" -#: templates/djangocms_blog/post_list.html:31 +#: templates/djangocms_blog/post_list.html:33 msgid "of" msgstr "of" -#: templates/djangocms_blog/post_list.html:34 +#: templates/djangocms_blog/post_list.html:36 msgid "next" msgstr "next" diff --git a/djangocms_blog/locale/it/LC_MESSAGES/django.mo b/djangocms_blog/locale/it/LC_MESSAGES/django.mo index d224e4f6bd6136f8aacb312da2e70085328075cd..629e1c350bb5b9962b552d646f36719f52c4403f 100644 GIT binary patch delta 1415 zcmY+@Pe>GD7{~F~TH94i)5bb3ou=Kv10S-h1TFd}@n9p%)~35q1NMaWVI%F6XyX;6i+P5t@dd8I*Qg0TgzZIKLHj4FV!u%viLe?~ zsstm#n(zc_+!U_E zA)M5WNiNjkGHQaWScB8ZpLrTOkDA~WYNsDj{l4K^{DC^MD66W#D%AMxsQU+zGdIU^ zGmaKgf3D3G|5U>3$fnF~JcJK%A1#(ril8pX!DjEasjoFFQ`g~YhTXuihTQQnKa;=QgjoUl3r zC+#^SR{fbE7){vr*w|QOpblQYd#*9*58I;|f6z?^S$ov}e{ws`QqDR9uI&Z(uH3um zDdzioCt=ORW2^H@yZw~c?+e5}lJHJ_y`1^Z+8|N_WyilhMDI-FV8-XeQzp$Y4G1O zlmxMbnDQBO7`tkDQ2PAFM6e%QaR5Vj7K3=+wl89o_Dx)cw{bmAqQ*@lKQn7B;Z|dc z<^>fcSU|n_D{A7B?Kc5q*3yom`kQeby2uc72*Wst8}K+P;V5ce&RWDI?Yp=S-(W5I z&0i{dQ7y}sA>4y?*nizGmAFzh} zW|0a%^NC0K1W-F#LQVLM*SMBHs25&hkb}2SC-De1@2T|_D&agb#k|Kx{Akv0%$6={s&WmKX`+kYRqTk{09;J2s~TR>gSH#~^T zVa|U)l{lmHy``?Vr{a)K%1T4CFG6))v%4I#3($ zjdK2sHAy-&;fNi06xBbBTF4pHgfwy!<+78fcB9foRR2L5uOw}R7TrPYCNy8Cr3I;I zBd+dWN8Cx+e;l>SZq}4*l}8h3f!ejc@{NRwL$nk6VD)jf64kPuitb%krR&&CR15nk zmwtWWyNK>eyZqE0>%KSr*Qe9iLBxp`qS;INUwZ9<8>MG~X`hz~?hU!UPNFaA_IXo5 zr>D|LB;szubtA`86NT=R`PA4%HdV;wlg>~oog2?NC&p9R>`0-I@qD3}_aoTmPdb@` hcPezcG#3i{ywBk)(SebPbUt%6lN%c;U60K8{sHG2aIpXY diff --git a/djangocms_blog/locale/it/LC_MESSAGES/django.po b/djangocms_blog/locale/it/LC_MESSAGES/django.po index 0b1eeeb..7df681a 100644 --- a/djangocms_blog/locale/it/LC_MESSAGES/django.po +++ b/djangocms_blog/locale/it/LC_MESSAGES/django.po @@ -1,24 +1,26 @@ # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. -# -# Iacopo Spalletti, 2014. +# +# Translators: +# Iacopo Spalletti, 2014 +# yakky , 2014 msgid "" msgstr "" -"Project-Id-Version: \n" +"Project-Id-Version: djangocms-blog\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-03-05 18:08+0100\n" -"PO-Revision-Date: 2014-03-05 18:11+0100\n" -"Last-Translator: Iacopo Spalletti\n" -"Language-Team: Italian \n" -"Language: it\n" +"POT-Creation-Date: 2014-03-29 16:31+0100\n" +"PO-Revision-Date: 2014-03-29 15:34+0000\n" +"Last-Translator: yakky \n" +"Language-Team: Italian (http://www.transifex.com/projects/p/djangocms-blog/language/it/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Language: it\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Generator: Lokalize 1.5\n" #: cms_app.py:8 cms_plugins.py:32 cms_plugins.py:45 cms_plugins.py:56 -#: cms_plugins.py:67 cms_toolbar.py:13 +#: cms_plugins.py:67 cms_toolbar.py:17 msgid "Blog" msgstr "Blog" @@ -38,146 +40,154 @@ msgstr "Tag" msgid "Categories" msgstr "Categorie" -#: cms_plugins.py:68 templates/djangocms_blog/post_list.html:10 +#: cms_plugins.py:68 templates/djangocms_blog/post_list.html:12 #: templates/djangocms_blog/plugins/archive.html:4 msgid "Archive" msgstr "Archivio" -#: cms_toolbar.py:15 +#: cms_toolbar.py:19 msgid "Post list" msgstr "Lista degli articoli" -#: cms_toolbar.py:17 +#: cms_toolbar.py:21 msgid "Add post" msgstr "Aggiungi articolo" +#: cms_toolbar.py:25 +msgid "Edit Post" +msgstr "Modifica articolo" + #: feeds.py:16 #, python-format msgid "Blog articles on %(site_name)s" msgstr "Articoli del blog su %(site_name)s" -#: models.py:27 +#: models.py:28 msgid "parent" msgstr "superiore" -#: models.py:29 +#: models.py:30 msgid "created at" msgstr "creato il" -#: models.py:30 +#: models.py:31 msgid "modified at" msgstr "modificato il" -#: models.py:33 +#: models.py:34 msgid "name" msgstr "nome" -#: models.py:34 models.py:87 +#: models.py:35 models.py:88 msgid "slug" msgstr "slug" -#: models.py:41 +#: models.py:42 msgid "blog category" msgstr "categoria del blog" -#: models.py:42 +#: models.py:43 msgid "blog categories" msgstr "categorie del blog" -#: models.py:64 +#: models.py:65 msgid "Author" msgstr "Autore" -#: models.py:68 +#: models.py:69 msgid "Published Since" msgstr "Pubblicato il" -#: models.py:70 +#: models.py:71 msgid "Published Until" msgstr "fino al" -#: models.py:72 +#: models.py:73 msgid "Publish" msgstr "Pubblicato" -#: models.py:73 +#: models.py:74 msgid "category" msgstr "categoria" -#: models.py:75 +#: models.py:76 msgid "Main image" msgstr "Immagine" -#: models.py:77 +#: models.py:78 msgid "Main image thumbnail" msgstr "Dimensione miniatura" -#: models.py:81 +#: models.py:82 msgid "Main image full" msgstr "Dimensione piena" -#: models.py:86 +#: models.py:87 msgid "Title" msgstr "Titolo" -#: models.py:88 +#: models.py:89 msgid "Text" msgstr "Testo" -#: models.py:89 +#: models.py:90 msgid "Post meta description" -msgstr "Meta Descrizione dell'articolo" +msgstr "Meta descrizione dell'articolo" -#: models.py:99 +#: models.py:92 +msgid "Post meta keywords" +msgstr "Meta keyword dell'articolo" + +#: models.py:102 msgid "blog article" msgstr "articolo del blog" -#: models.py:100 +#: models.py:103 msgid "blog articles" msgstr "articoli del blog" -#: models.py:143 models.py:168 +#: models.py:147 models.py:172 msgid "Articles" msgstr "Articoli" -#: models.py:144 +#: models.py:148 msgid "The number of latests articles to be displayed." msgstr "Il numero di articoli da mostrare." -#: models.py:146 +#: models.py:150 msgid "Show only the blog articles tagged with chosen tags." msgstr "Mostra solo gli articoli marcati con i tag selezionati." -#: models.py:148 +#: models.py:152 msgid "Show only the blog articles tagged with chosen categories." msgstr "Mostra solo gli articoli marcati con i categorie selezionati." -#: models.py:165 templates/djangocms_blog/plugins/authors.html:3 +#: models.py:169 templates/djangocms_blog/plugins/authors.html:3 msgid "Authors" msgstr "Autori" -#: models.py:169 +#: models.py:173 msgid "The number of author articles to be displayed." msgstr "Numero di elementi per autore da mostrare." -#: templates/djangocms_blog/post_detail.html:14 +#: templates/djangocms_blog/post_detail.html:16 #: templates/djangocms_blog/includes/blog_item.html:10 msgid "by" msgstr "di" -#: templates/djangocms_blog/post_list.html:9 +#: templates/djangocms_blog/post_list.html:11 msgid "Articles by" msgstr "Articoli di" -#: templates/djangocms_blog/post_list.html:11 +#: templates/djangocms_blog/post_list.html:13 msgid "Tag" msgstr "Tag" -#: templates/djangocms_blog/post_list.html:12 +#: templates/djangocms_blog/post_list.html:14 msgid "Category" msgstr "Categoria" -#: templates/djangocms_blog/post_list.html:19 +#: templates/djangocms_blog/post_list.html:21 #: templates/djangocms_blog/plugins/archive.html:27 #: templates/djangocms_blog/plugins/authors.html:15 #: templates/djangocms_blog/plugins/categories.html:16 @@ -186,23 +196,23 @@ msgstr "Categoria" msgid "No article found." msgstr "Nessun articolo trovato." -#: templates/djangocms_blog/post_list.html:22 +#: templates/djangocms_blog/post_list.html:24 msgid "Back" msgstr "Indietro" -#: templates/djangocms_blog/post_list.html:28 +#: templates/djangocms_blog/post_list.html:30 msgid "previous" msgstr "precedente" -#: templates/djangocms_blog/post_list.html:31 +#: templates/djangocms_blog/post_list.html:33 msgid "Page" msgstr "Pagina" -#: templates/djangocms_blog/post_list.html:31 +#: templates/djangocms_blog/post_list.html:33 msgid "of" msgstr "di" -#: templates/djangocms_blog/post_list.html:34 +#: templates/djangocms_blog/post_list.html:36 msgid "next" msgstr "successivo" @@ -228,13 +238,13 @@ msgid "0 articles" msgstr "0 articoli" #~ msgid "blog post" -#~ msgstr "articolo" +#~ msgstr "blog post" #~ msgid "Posts" -#~ msgstr "Articolo" +#~ msgstr "Posts" #~ msgid "Entries by" -#~ msgstr "Articoli di" +#~ msgstr "Entries by" #~ msgid "No entry found." -#~ msgstr "Nessun articolo trovato." +#~ msgstr "No entry found." diff --git a/djangocms_blog/locale/ru/LC_MESSAGES/django.mo b/djangocms_blog/locale/ru/LC_MESSAGES/django.mo index 9cf59862edf6254861305f5b3a4f3aa5ab7d5395..3271c5fed1d60e05e72524bbd98a8f0311b8bca5 100644 GIT binary patch delta 21 ccmcaEeO-EkG&_fprGlZEm9gPwW%ey>07y3l<^TWy delta 21 ccmcaEeO-EkG&_fZse++}m4U@(W%ey>07w)C<^TWy diff --git a/djangocms_blog/locale/ru/LC_MESSAGES/django.po b/djangocms_blog/locale/ru/LC_MESSAGES/django.po index 6178244..cb8a567 100644 --- a/djangocms_blog/locale/ru/LC_MESSAGES/django.po +++ b/djangocms_blog/locale/ru/LC_MESSAGES/django.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-03-05 18:08+0100\n" +"POT-Creation-Date: 2014-03-29 16:31+0100\n" "PO-Revision-Date: 2014-02-27 16:45+0300\n" "Last-Translator: Max Vyaznikov \n" "Language-Team: \n" @@ -19,7 +19,7 @@ msgstr "" "X-Generator: Poedit 1.5.4\n" #: cms_app.py:8 cms_plugins.py:32 cms_plugins.py:45 cms_plugins.py:56 -#: cms_plugins.py:67 cms_toolbar.py:13 +#: cms_plugins.py:67 cms_toolbar.py:17 msgid "Blog" msgstr "Блог" @@ -39,146 +39,154 @@ msgstr "Тэги" msgid "Categories" msgstr "Categories" -#: cms_plugins.py:68 templates/djangocms_blog/post_list.html:10 +#: cms_plugins.py:68 templates/djangocms_blog/post_list.html:12 #: templates/djangocms_blog/plugins/archive.html:4 msgid "Archive" msgstr "Архив" -#: cms_toolbar.py:15 +#: cms_toolbar.py:19 msgid "Post list" msgstr "Список статей" -#: cms_toolbar.py:17 +#: cms_toolbar.py:21 msgid "Add post" msgstr "Добавить статью" +#: cms_toolbar.py:25 +msgid "Edit Post" +msgstr "" + #: feeds.py:16 #, python-format msgid "Blog articles on %(site_name)s" msgstr "Статьи из блог на %(site_name)s" -#: models.py:27 +#: models.py:28 msgid "parent" msgstr "предок" -#: models.py:29 +#: models.py:30 msgid "created at" msgstr "время создания" -#: models.py:30 +#: models.py:31 msgid "modified at" msgstr "время изменения" -#: models.py:33 +#: models.py:34 msgid "name" msgstr "название" -#: models.py:34 models.py:87 +#: models.py:35 models.py:88 msgid "slug" msgstr "URL" -#: models.py:41 +#: models.py:42 msgid "blog category" msgstr "категория блога" -#: models.py:42 +#: models.py:43 msgid "blog categories" msgstr "категории блога" -#: models.py:64 +#: models.py:65 msgid "Author" msgstr "Автор" -#: models.py:68 +#: models.py:69 msgid "Published Since" msgstr "Опубликована с" -#: models.py:70 +#: models.py:71 msgid "Published Until" msgstr "Опубликована до" -#: models.py:72 +#: models.py:73 msgid "Publish" msgstr "Показывать на сайте" -#: models.py:73 +#: models.py:74 msgid "category" msgstr "категория" -#: models.py:75 +#: models.py:76 msgid "Main image" msgstr "Картинка для статьи" -#: models.py:77 +#: models.py:78 msgid "Main image thumbnail" msgstr "Уменьшенная копия" -#: models.py:81 +#: models.py:82 msgid "Main image full" msgstr "Полный размер" -#: models.py:86 +#: models.py:87 msgid "Title" msgstr "Заголовок" -#: models.py:88 +#: models.py:89 msgid "Text" msgstr "Текст" -#: models.py:89 +#: models.py:90 msgid "Post meta description" msgstr "" -#: models.py:99 +#: models.py:92 +msgid "Post meta keywords" +msgstr "" + +#: models.py:102 msgid "blog article" msgstr "статья блога" -#: models.py:100 +#: models.py:103 msgid "blog articles" msgstr "статьи блога" -#: models.py:143 models.py:168 +#: models.py:147 models.py:172 msgid "Articles" msgstr "Статьи" -#: models.py:144 +#: models.py:148 msgid "The number of latests articles to be displayed." msgstr "Количество показываемых последних статей." -#: models.py:146 +#: models.py:150 msgid "Show only the blog articles tagged with chosen tags." msgstr "Показывать только статьи с выбранными тэгами." -#: models.py:148 +#: models.py:152 msgid "Show only the blog articles tagged with chosen categories." msgstr "Показывать только статьи из выбранныех категорий." -#: models.py:165 templates/djangocms_blog/plugins/authors.html:3 +#: models.py:169 templates/djangocms_blog/plugins/authors.html:3 msgid "Authors" msgstr "Авторы" -#: models.py:169 +#: models.py:173 msgid "The number of author articles to be displayed." msgstr "Количество статей автора, которые будут показаны." -#: templates/djangocms_blog/post_detail.html:14 +#: templates/djangocms_blog/post_detail.html:16 #: templates/djangocms_blog/includes/blog_item.html:10 msgid "by" msgstr "создана" -#: templates/djangocms_blog/post_list.html:9 +#: templates/djangocms_blog/post_list.html:11 msgid "Articles by" msgstr "Статьи созданы" -#: templates/djangocms_blog/post_list.html:11 +#: templates/djangocms_blog/post_list.html:13 msgid "Tag" msgstr "Тэг" -#: templates/djangocms_blog/post_list.html:12 +#: templates/djangocms_blog/post_list.html:14 msgid "Category" msgstr "Категория" -#: templates/djangocms_blog/post_list.html:19 +#: templates/djangocms_blog/post_list.html:21 #: templates/djangocms_blog/plugins/archive.html:27 #: templates/djangocms_blog/plugins/authors.html:15 #: templates/djangocms_blog/plugins/categories.html:16 @@ -187,23 +195,23 @@ msgstr "Категория" msgid "No article found." msgstr "Не найдено ни одной статьи." -#: templates/djangocms_blog/post_list.html:22 +#: templates/djangocms_blog/post_list.html:24 msgid "Back" msgstr "Назад" -#: templates/djangocms_blog/post_list.html:28 +#: templates/djangocms_blog/post_list.html:30 msgid "previous" msgstr "предыдущая" -#: templates/djangocms_blog/post_list.html:31 +#: templates/djangocms_blog/post_list.html:33 msgid "Page" msgstr "Страница" -#: templates/djangocms_blog/post_list.html:31 +#: templates/djangocms_blog/post_list.html:33 msgid "of" msgstr "из" -#: templates/djangocms_blog/post_list.html:34 +#: templates/djangocms_blog/post_list.html:36 msgid "next" msgstr "следующая" From c2bfa7264b1c1765646330e52e0bc099a4273260 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Wed, 26 Mar 2014 15:57:46 +0100 Subject: [PATCH 5/6] Add transifex support. Fix #6. --- .tx/config | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .tx/config diff --git a/.tx/config b/.tx/config new file mode 100644 index 0000000..d43f3e9 --- /dev/null +++ b/.tx/config @@ -0,0 +1,8 @@ +[main] +host = https://www.transifex.com + +[djangocms-blog.master] +file_filter = djangocms_blog/locale//LC_MESSAGES/django.po +source_file = djangocms_blog/locale/en/LC_MESSAGES/django.po +source_lang = en +type = PO From f05b571207af4101fbc0905d2b359b4c38b968d8 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Sat, 29 Mar 2014 23:10:06 +0100 Subject: [PATCH 6/6] Follow parler updates in requirements. Update version and history --- HISTORY.rst | 11 +++++++++++ djangocms_blog/__init__.py | 2 +- setup.py | 9 ++++----- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index b41dd68..ea4283d 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -3,6 +3,17 @@ History ------- +0.2.0 (in development) +++++++++++++++++++ + +* **INCOMPATIBLE CHANGE**: view names changed! +* Synced with latest django-parler development branch +* Toolbar items contextual to the current page +* Add support for canonical URLs +* Add transifex support + + + 0.1.0 (2014-03-06) ++++++++++++++++++ diff --git a/djangocms_blog/__init__.py b/djangocms_blog/__init__.py index 541f859..7d8a0d8 100644 --- a/djangocms_blog/__init__.py +++ b/djangocms_blog/__init__.py @@ -1 +1 @@ -__version__ = '0.1.0' \ No newline at end of file +__version__ = '0.2b1.dev1' diff --git a/setup.py b/setup.py index a7ce027..35b5c5f 100755 --- a/setup.py +++ b/setup.py @@ -30,14 +30,14 @@ setup( long_description=readme + '\n\n' + history, author='Iacopo Spalletti', author_email='i.spalletti@nephila.it', - url='https://github.com/yakky/djangocms-blog', + url='https://github.com/nephila/djangocms-blog', packages=[ 'djangocms_blog', ], include_package_data=True, install_requires=[ - 'django-parler>0.9.4', - 'django-cms>=3.0b4.dev6', + 'django-parler>=1.0', + 'django-cms>=3.0c1', 'django-taggit', 'django-filer', 'django-select2', @@ -47,8 +47,7 @@ setup( 'django-admin-enhancer', ], dependency_links=[ - 'https://github.com/edoburu/django-parler/archive/master.zip#egg=django-parler-0.9.5', - 'https://github.com/divio/django-cms/archive/develop.zip#egg=django-cms-3.0b4.dev6' + 'https://github.com/edoburu/django-parler/archive/cdd500bb28a234d870274e73cba9d7020f1ef0b1.zip#egg=django-parler-1.0', ], license="BSD", zip_safe=False,