From: Radek Czajka Date: Mon, 18 Jun 2012 10:40:25 +0000 (+0200) Subject: Cover images niceties. X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/3e276f49505e607b72892b40d18ac2cef194497e?ds=sidebyside;hp=05f67adb27390c7a9cf214e83550d3bbca88c8f2 Cover images niceties. --- diff --git a/apps/catalogue/locale/pl/LC_MESSAGES/django.mo b/apps/catalogue/locale/pl/LC_MESSAGES/django.mo index 21585b12..71a8b91e 100644 Binary files a/apps/catalogue/locale/pl/LC_MESSAGES/django.mo and b/apps/catalogue/locale/pl/LC_MESSAGES/django.mo differ diff --git a/apps/catalogue/locale/pl/LC_MESSAGES/django.po b/apps/catalogue/locale/pl/LC_MESSAGES/django.po index 7195b771..4a898d66 100644 --- a/apps/catalogue/locale/pl/LC_MESSAGES/django.po +++ b/apps/catalogue/locale/pl/LC_MESSAGES/django.po @@ -7,9 +7,9 @@ msgid "" msgstr "" "Project-Id-Version: Platforma Redakcyjna\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-05-10 16:00+0200\n" -"PO-Revision-Date: 2012-05-10 16:05+0100\n" -"Last-Translator: Marcin Koziej \n" +"POT-Creation-Date: 2012-06-18 12:52+0200\n" +"PO-Revision-Date: 2012-06-18 12:53+0100\n" +"Last-Translator: Radek Czajka \n" "Language-Team: Fundacja Nowoczesna Polska \n" "Language: pl\n" "MIME-Version: 1.0\n" @@ -59,63 +59,63 @@ msgstr "Dokument o tym slugu już istnieje w repozytorium." msgid "File should be UTF-8 encoded." msgstr "Plik powinien mieć kodowanie UTF-8." -#: models/book.py:23 +#: models/book.py:27 #: models/chunk.py:23 msgid "title" msgstr "tytuł" -#: models/book.py:24 +#: models/book.py:28 #: models/chunk.py:24 msgid "slug" msgstr "slug" -#: models/book.py:25 +#: models/book.py:29 msgid "public" msgstr "publiczna" -#: models/book.py:26 +#: models/book.py:30 msgid "scan gallery name" msgstr "nazwa galerii skanów" -#: models/book.py:29 +#: models/book.py:33 msgid "parent" msgstr "rodzic" -#: models/book.py:30 +#: models/book.py:34 msgid "parent number" msgstr "numeracja rodzica" -#: models/book.py:47 +#: models/book.py:51 #: models/chunk.py:21 #: models/publish_log.py:17 msgid "book" msgstr "książka" -#: models/book.py:48 +#: models/book.py:52 msgid "books" msgstr "książki" -#: models/book.py:235 +#: models/book.py:250 msgid "No chunks in the book." msgstr "Książka nie ma części." -#: models/book.py:239 +#: models/book.py:254 msgid "Not all chunks have publishable revisions." msgstr "Niektóre części nie są gotowe do publikacji." -#: models/book.py:248 +#: models/book.py:263 msgid "Invalid XML" msgstr "Nieprawidłowy XML" -#: models/book.py:250 +#: models/book.py:265 msgid "No Dublin Core found." msgstr "Brak sekcji Dublin Core." -#: models/book.py:252 +#: models/book.py:267 msgid "Invalid Dublin Core" msgstr "Nieprawidłowy Dublin Core" -#: models/book.py:255 +#: models/book.py:270 msgid "rdf:about is not" msgstr "rdf:about jest różny od" @@ -437,6 +437,10 @@ msgstr "Wszystkie" msgid "Add" msgstr "Dodaj" +#: templatetags/catalogue.py:37 +msgid "Covers" +msgstr "Okładki" + #: templatetags/wall.py:49 msgid "Related edit" msgstr "Powiązana zmiana" diff --git a/apps/cover/forms.py b/apps/cover/forms.py index 754d697c..fab0bb62 100755 --- a/apps/cover/forms.py +++ b/apps/cover/forms.py @@ -6,6 +6,7 @@ import re from urllib2 import urlopen from django import forms +from django.utils.translation import ugettext_lazy as _ from cover.models import Image class ImageAddForm(forms.ModelForm): @@ -33,7 +34,7 @@ class ReadonlyImageEditForm(ImageEditForm): class FlickrForm(forms.Form): - source_url = forms.URLField() + source_url = forms.URLField(label=_('Flickr URL')) def clean_source_url(self): url = self.cleaned_data['source_url'] diff --git a/apps/cover/locale/pl/LC_MESSAGES/django.mo b/apps/cover/locale/pl/LC_MESSAGES/django.mo new file mode 100644 index 00000000..3a84d1d3 Binary files /dev/null and b/apps/cover/locale/pl/LC_MESSAGES/django.mo differ diff --git a/apps/cover/locale/pl/LC_MESSAGES/django.po b/apps/cover/locale/pl/LC_MESSAGES/django.po new file mode 100644 index 00000000..7b8ba0fc --- /dev/null +++ b/apps/cover/locale/pl/LC_MESSAGES/django.po @@ -0,0 +1,88 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2012-06-18 12:36+0200\n" +"PO-Revision-Date: 2012-06-18 12:38+0100\n" +"Last-Translator: Radek Czajka \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n" + +#: forms.py:37 +msgid "Flickr URL" +msgstr "URL z Flickra" + +#: models.py:18 +msgid "title" +msgstr "tytuł" + +#: models.py:19 +msgid "author" +msgstr "autor" + +#: models.py:20 +msgid "license name" +msgstr "nazwa licencji" + +#: models.py:21 +msgid "license URL" +msgstr "URL licencji" + +#: models.py:22 +msgid "source URL" +msgstr "URL źródła" + +#: models.py:23 +msgid "image download URL" +msgstr "URL pliku do pobrania" + +#: models.py:24 +msgid "file" +msgstr "plik" + +#: models.py:27 +msgid "cover image" +msgstr "obrazek na okładkę" + +#: models.py:28 +msgid "cover images" +msgstr "obrazki na okładki" + +#: templates/cover/add_image.html:6 +#: templates/cover/add_image.html.py:21 +msgid "Add image" +msgstr "Dodaj obrazek" + +#: templates/cover/add_image.html:13 +msgid "Load from Flickr" +msgstr "Pobierz z Flickra" + +#: templates/cover/image_detail.html:7 +msgid "Cover image" +msgstr "Obrazek na okładkę" + +#: templates/cover/image_detail.html:23 +msgid "source" +msgstr "źródło" + +#: templates/cover/image_detail.html:31 +msgid "Change" +msgstr "Zmień" + +#: templates/cover/image_list.html:8 +msgid "Cover images" +msgstr "Obrazki na okładki" + +#: templates/cover/image_list.html:11 +msgid "Add new" +msgstr "Dodaj nowy" + diff --git a/apps/cover/models.py b/apps/cover/models.py index 0aeddb4a..87a70a80 100644 --- a/apps/cover/models.py +++ b/apps/cover/models.py @@ -15,13 +15,13 @@ from django.utils.translation import ugettext_lazy as _ class Image(models.Model): - title = models.CharField(max_length=255) - author = models.CharField(max_length=255) - license_name = models.CharField(max_length=255) - license_url = models.URLField(max_length=255, blank=True) - source_url = models.URLField() - download_url = models.URLField(unique=True) - file = models.ImageField(upload_to='cover/image', editable=False) + title = models.CharField(max_length=255, verbose_name=_('title')) + author = models.CharField(max_length=255, verbose_name=_('author')) + license_name = models.CharField(max_length=255, verbose_name=_('license name')) + license_url = models.URLField(max_length=255, blank=True, verbose_name=_('license URL')) + source_url = models.URLField(verbose_name=_('source URL')) + download_url = models.URLField(unique=True, verbose_name=_('image download URL')) + file = models.ImageField(upload_to='cover/image', editable=False, verbose_name=_('file')) class Meta: verbose_name = _('cover image') diff --git a/apps/cover/templates/cover/add_image.html b/apps/cover/templates/cover/add_image.html index 8506e614..ed7adfbb 100755 --- a/apps/cover/templates/cover/add_image.html +++ b/apps/cover/templates/cover/add_image.html @@ -5,17 +5,22 @@ {% block content %}

{% trans "Add image" %}

-
-{% csrf_token %} + +{% csrf_token %} -{{ ff.as_p }} - + + {{ ff.as_table }} + +
-
-{% csrf_token %} -{{ form.as_p }} - +{% csrf_token %} + + {{ form.as_table }} + +
+ + {% endblock %} diff --git a/apps/cover/templates/cover/image_detail.html b/apps/cover/templates/cover/image_detail.html index 8ebf988e..16b8344d 100755 --- a/apps/cover/templates/cover/image_detail.html +++ b/apps/cover/templates/cover/image_detail.html @@ -1,12 +1,20 @@ {% extends "catalogue/base.html" %} {% load i18n %} +{% load thumbnail %} {% load build_absolute_uri from common_tags %} {% block content %}

{% trans "Cover image" %}

-
- +
+ + +
{{ object.title }} by {{ object.author }}, {% if object.license_url %}{% endif %} {{ object.license_name }} @@ -15,15 +23,20 @@
{% trans "source" %}: {{ object.download_url }}
-
-{% csrf_token %} -{{ form.as_p }} - -
+ +{% if editable %}
{% csrf_token %}{% endif %} + + {{ form.as_table }} + {% if editable %} + + {% endif %} +
+{% if editable %}
{% endif %} + {% endblock %} diff --git a/apps/cover/templates/cover/image_list.html b/apps/cover/templates/cover/image_list.html index 5b2b0006..a170267d 100755 --- a/apps/cover/templates/cover/image_list.html +++ b/apps/cover/templates/cover/image_list.html @@ -12,16 +12,17 @@ {% endif %}
    -{% autopaginate object_list 100 %} +{% autopaginate object_list 1 %} {% for image in object_list %} - + - +
    {{ image }}
    {% endfor %} {% paginate %}