From 3e276f49505e607b72892b40d18ac2cef194497e Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Mon, 18 Jun 2012 12:40:25 +0200 Subject: [PATCH] Cover images niceties. --- .../catalogue/locale/pl/LC_MESSAGES/django.mo | Bin 6519 -> 6570 bytes .../catalogue/locale/pl/LC_MESSAGES/django.po | 38 ++++---- apps/cover/forms.py | 3 +- apps/cover/locale/pl/LC_MESSAGES/django.mo | Bin 0 -> 1304 bytes apps/cover/locale/pl/LC_MESSAGES/django.po | 88 ++++++++++++++++++ apps/cover/models.py | 14 +-- apps/cover/templates/cover/add_image.html | 21 +++-- apps/cover/templates/cover/image_detail.html | 29 ++++-- apps/cover/templates/cover/image_list.html | 9 +- 9 files changed, 157 insertions(+), 45 deletions(-) create mode 100644 apps/cover/locale/pl/LC_MESSAGES/django.mo create mode 100644 apps/cover/locale/pl/LC_MESSAGES/django.po diff --git a/apps/catalogue/locale/pl/LC_MESSAGES/django.mo b/apps/catalogue/locale/pl/LC_MESSAGES/django.mo index 21585b12b05032175e5cc7faeefdb9538fbce0f6..71a8b91eae13c653eef73db6637b9845861051d1 100644 GIT binary patch delta 2322 zcmYM#drZ}39LMpmTn^&paLXIV^auyKa8Wo)XbLE5qM1r)qGFxoh!Y)7lZMrPij&P! z|2bYZSFK|C2hK^uw#wG>57V`=bfea7>2kDKb6!?+t;T$R&Uu*6`2Jqc^Zb6l=l(l9 zDDMe-zh$SKFj5OKm1sydJB&wsTu8m6%_ia}$e&&1!XtJa)A4&(zJX&Y-*WYL@G;8& zx_Unkr%=wt@i-kPn0Z!0#!p2p=3_mo?{-YXw~#jM5bDKa?*6-&MY$W*@u#TwFX1>G zM0I!{$KV5e9Fr(iVi3dhZ;fQs!BNzUCvh@%V-9|a>fjn`pub`^{)L+1FlJ&74{5+5 zWM)?ET!a~v*P~W)8$OMm>gnHl$k2v;f&AHJE^7EXZpS}d{TfE64w_H{i=qbH!9_Fe zLUsHOGFkf&HL4NE#mh^v5a;7g)E4#NIQq9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L{a6kkD?eA@q+bmFivQLuWhY*lK=-QZ<}h z)MRRLHX%o8Rm7Ww?!W?~gHT#VtV=XyPEG8{OjmeYlI0T*Esq}qn@wyW{6q=SK!uv5lx9bhT#@I|zNhwh_8Lb;MfY143VyRN6`Aec~;Bs#DiZm_+D1u!vA9 zC-n2h1+oC4^d2#n;3%w?;4WAr5g{rQ7qcD?p35%D@Ku$Shy3LW!=X@OIDcmC|F2cS zP\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 0000000000000000000000000000000000000000..3a84d1d3414ccc65b035dcefe18e2497580ce5a2 GIT binary patch literal 1304 zcmZvaO>Yx15QYuqGkmtd4TKMXfNINbiXaL}p@bF{QW}M{NL-M+>!$8*?8v(zH0p(l ze}Fjf9}og@gA*SS5x>X%Ih0ap!Cm#L*?o0XP@#8U

dN{A8SSvsH5vG{1Z-1ibkH7 zCvRP!r+y0M@|8%DY*T|iW@l!nHkgdc%(mGSxH-XaiJkKqvBvXl6Rz%LUv5h#-bu(SY#qmqLXBJQEV$tK5xyung z>A4fdEI)NBH4DY_WS%CsTku@IwwC%y, 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 %} -- 2.20.1