From 8ab99005ed40c0646e65d2857acc5ce48b54c82d Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Tue, 14 Jan 2014 13:25:58 +0100 Subject: [PATCH 01/16] Minor menu fix. --- apps/catalogue/templates/catalogue/tag_list_split.html | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/apps/catalogue/templates/catalogue/tag_list_split.html b/apps/catalogue/templates/catalogue/tag_list_split.html index a26459c98..cb7ab26ec 100644 --- a/apps/catalogue/templates/catalogue/tag_list_split.html +++ b/apps/catalogue/templates/catalogue/tag_list_split.html @@ -1,14 +1,10 @@ {% load i18n %} {% if books %} -

- {% trans "Literature" %}: -

+

{% trans "Literature" %}:

{{books|safe}}
{% endif %} {% if pictures %} -

- {% trans "Gallery" %}: -

+

{% trans "Gallery" %}:

{{pictures|safe}}
{% endif %} -- 2.20.1 From a1edf3f1a7cff6e6f4d85a4288ca9b1d5cd3b254 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Tue, 14 Jan 2014 14:23:14 +0100 Subject: [PATCH 02/16] Fix reader. --- apps/wolnelektury_core/static/js/picture.js | 2 +- apps/wolnelektury_core/static/js/progressSpin.min.js | 2 +- lib/librarian | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/wolnelektury_core/static/js/picture.js b/apps/wolnelektury_core/static/js/picture.js index 7c5ff9c39..0c2e35b84 100644 --- a/apps/wolnelektury_core/static/js/picture.js +++ b/apps/wolnelektury_core/static/js/picture.js @@ -230,7 +230,6 @@ return $mark.get(0); }, }); -}(jQuery)); $(document).ready(function() { @@ -249,3 +248,4 @@ $(document).ready(function() { }); +}(jQuery)); diff --git a/apps/wolnelektury_core/static/js/progressSpin.min.js b/apps/wolnelektury_core/static/js/progressSpin.min.js index d87ce8ca6..f7620a200 100644 --- a/apps/wolnelektury_core/static/js/progressSpin.min.js +++ b/apps/wolnelektury_core/static/js/progressSpin.min.js @@ -1 +1 @@ -(function(e){e.fn.progressSpin=function(t){function f(e,t){var i=1-t;var s=Raphael.getRGB(n.activeColor);var o=Raphael.getRGB(n.fillColor);var u=Math.floor(s.r*t+o.r*i);var a=Math.floor(s.g*t+o.g*i);var f=Math.floor(s.b*t+o.b*i);var l=Raphael.rgb(u,a,f);r[e].attr("fill",l)}function l(e){e=e%12;if(e<0){e+=12}return e}if(this.getOptions){return this}var n=e.extend({},e.fn.progressSpin.defaults,t);var r=[];var i=false;var s=null;var o=0;var u=null;var a=this;this.getOptions=function(){return n};this.getVisible=function(){return i};this.getAnimating=function(){return s!=null};this.getCurrentStep=function(){return o};this.setCurrentStep=function(e){if(this.getAnimating()){this.stop(false);o=l(e);this.start()}else{o=l(e)}};this.start=function(){if(this.getAnimating()){}else{this.show();f(o,1);var e=1/(n.tailCount+1);var t=0;var r=n.tailCount;s=setInterval(function(){if(t Date: Fri, 17 Jan 2014 13:01:46 +0100 Subject: [PATCH 03/16] Fix picture detail styling. --- .../templates/picture/picture_short.html | 2 - .../templates/picture/picture_wide.html | 2 +- .../static/scss/main/book_box.scss | 15 +++--- .../static/scss/main/picture_box.scss | 48 ++++++++++++++++--- 4 files changed, 50 insertions(+), 17 deletions(-) diff --git a/apps/picture/templates/picture/picture_short.html b/apps/picture/templates/picture/picture_short.html index 6095f441f..881dcfe21 100644 --- a/apps/picture/templates/picture/picture_short.html +++ b/apps/picture/templates/picture/picture_short.html @@ -4,7 +4,6 @@ {% load picture_tags %}
-
@@ -80,4 +79,3 @@
-
diff --git a/apps/picture/templates/picture/picture_wide.html b/apps/picture/templates/picture/picture_wide.html index 3125b0f8f..8525d32a9 100644 --- a/apps/picture/templates/picture/picture_wide.html +++ b/apps/picture/templates/picture/picture_wide.html @@ -16,7 +16,7 @@ {% block book-box-extra-info %} {% if themes or things%}
-

{% trans "Motifs, themes and objects" %}

{% if themes %} diff --git a/apps/wolnelektury_core/static/scss/main/book_box.scss b/apps/wolnelektury_core/static/scss/main/book_box.scss index cca6e4a53..e72bca8d0 100755 --- a/apps/wolnelektury_core/static/scss/main/book_box.scss +++ b/apps/wolnelektury_core/static/scss/main/book_box.scss @@ -216,13 +216,14 @@ } } -/* FIXME: RWD */ -.picture.book-wide-box .right-column { - float: none; - @include size(width, 415px); - top: 0; - @include size(margin-left, 550px); - margin-top: 0em; +@media screen and (min-width: 50em) { + .picture.book-wide-box .right-column { + float: none; + @include size(width, 415px); + top: 0; + @include size(margin-left, 550px); + margin-top: 0em; + } } diff --git a/apps/wolnelektury_core/static/scss/main/picture_box.scss b/apps/wolnelektury_core/static/scss/main/picture_box.scss index 26adc58f2..a3e491197 100644 --- a/apps/wolnelektury_core/static/scss/main/picture_box.scss +++ b/apps/wolnelektury_core/static/scss/main/picture_box.scss @@ -1,19 +1,53 @@ .picture { &.book-wide-box { - img.cover { - width: 53.5em; - height: auto; + .cover-area { + position: static; + @include size(margin-right, 15px); + + img.cover { + @include size(width, 535px); + height: auto; + } } - .book-box-tools { - margin-left: 50em; // 535px image + 15px margin @ 11pt + .book-box-head, .tags, .book-box-tools { + margin: 0; + } + + + @media screen and (min-width: 62.5em) { + .book-box-head, .tags, .book-box-tools { + float: right; + @include size(width, 403px); + } } .other-tools { margin: 5em 0 0 0; } - #theme-list-wrapper { - margin-left: 55em; + + .book-box-tools, .tags, #theme-list-wrapper { + clear: left; + margin-left: 0; + } + .book-box-body { + height: auto; + margin-bottom: 1em; + } + + @media screen and (min-width: 50em) { + .book-box-body { + @include size(height, 170px); + margin-bottom: 0; + } + .book-box-tools, .tags { + clear: none; + } + + #theme-list-wrapper { + clear: none; + @include size(margin-left, 550px); + } } } -- 2.20.1 From fdb67a9ef3b41c31d4ae4122d49537860e483ec6 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Fri, 17 Jan 2014 13:36:17 +0100 Subject: [PATCH 04/16] Minor css fix. --- apps/wolnelektury_core/static/scss/main/picture_box.scss | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/wolnelektury_core/static/scss/main/picture_box.scss b/apps/wolnelektury_core/static/scss/main/picture_box.scss index a3e491197..c9a8c1bd3 100644 --- a/apps/wolnelektury_core/static/scss/main/picture_box.scss +++ b/apps/wolnelektury_core/static/scss/main/picture_box.scss @@ -11,7 +11,7 @@ } .book-box-head, .tags, .book-box-tools { - margin: 0; + margin-left: 0; } @@ -27,7 +27,7 @@ } .book-box-tools, .tags, #theme-list-wrapper { - clear: left; + clear: both; margin-left: 0; } .book-box-body { @@ -41,11 +41,11 @@ margin-bottom: 0; } .book-box-tools, .tags { - clear: none; + clear: right; } #theme-list-wrapper { - clear: none; + clear: right; @include size(margin-left, 550px); } } -- 2.20.1 From 4bb39ab3814f4b13deeea984f143695205f3a663 Mon Sep 17 00:00:00 2001 From: Marcin Koziej Date: Tue, 21 Jan 2014 16:06:09 +0100 Subject: [PATCH 05/16] Wording --- apps/catalogue/templates/catalogue/picture_list.html | 4 ++-- apps/picture/templates/picture/picture_list_thumb.html | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/catalogue/templates/catalogue/picture_list.html b/apps/catalogue/templates/catalogue/picture_list.html index a17d98719..ce61ec48b 100644 --- a/apps/catalogue/templates/catalogue/picture_list.html +++ b/apps/catalogue/templates/catalogue/picture_list.html @@ -5,9 +5,9 @@ {% block bodyid %}picture-list{% endblock %} -{% block titleextra %}{% trans "Listing of all pictures" %}{% endblock %} +{% block titleextra %}{% trans "Listing of all works" %}{% endblock %} -{% block picture_list_header %}{% trans "Listing of all pictures" %}{% endblock %} +{% block picture_list_header %}{% trans "Listing of all works" %}{% endblock %} {% block book_list %} diff --git a/apps/picture/templates/picture/picture_list_thumb.html b/apps/picture/templates/picture/picture_list_thumb.html index 6a42d6906..031055681 100644 --- a/apps/picture/templates/picture/picture_list_thumb.html +++ b/apps/picture/templates/picture/picture_list_thumb.html @@ -7,15 +7,15 @@ {% block bodyid %}picture-list{% endblock %} -{% block titleextra %}{% trans "Listing of all pictures" %}{% endblock %} +{% block titleextra %}{% trans "Listing of all works" %}{% endblock %} {% block body %} -

{% block book_list_header %}{% trans "Listing of all pictures" %}{% endblock %}

+

{% block book_list_header %}{% trans "Listing of all works" %}{% endblock %}

{% block book_list_info %} -

Galeria zawiera obrazy, rysunki, rzeźby, fotografie pochodzące z kolekcji Muzeum Narodowego w Warszawie. Każde z dzieł oznaczyliśmy motywami występującymi w sztuce i w literaturze. Galerię można więc przeglądać w poszukiwaniu ilustracji do tekstów literackich, a także pod kątem określonych przedmiotów i postaci występujących w sztukach wizualnych.

+

Galeria zawiera obrazy, rysunki, rzeźby, fotografie pochodzące ze zbiorów Muzeum Narodowego w Warszawie. Każde z dzieł oznaczyliśmy motywami i tematami występującymi w sztuce i w literaturze. Galerię można więc przeglądać w poszukiwaniu ilustracji do tekstów literackich, a także pod kątem określonych przedmiotów i postaci występujących w sztukach wizualnych.

{% endblock %}
-- 2.20.1 From 4e17ee1bbde80e43ae80fb6f28946e9364423ec8 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Fri, 24 Jan 2014 10:10:55 +0100 Subject: [PATCH 06/16] Fix cover display issues. --- .../templates/catalogue/book_text.html | 2 +- .../catalogue/templates/catalogue/player.html | 4 +-- apps/social/locale/pl/LC_MESSAGES/django.mo | Bin 2083 -> 2234 bytes apps/social/locale/pl/LC_MESSAGES/django.po | 28 ++++++++++-------- apps/social/models.py | 3 +- apps/wolnelektury_core/views.py | 2 +- 6 files changed, 22 insertions(+), 17 deletions(-) diff --git a/apps/catalogue/templates/catalogue/book_text.html b/apps/catalogue/templates/catalogue/book_text.html index 37a8a1ed2..8dd154646 100644 --- a/apps/catalogue/templates/catalogue/book_text.html +++ b/apps/catalogue/templates/catalogue/book_text.html @@ -9,7 +9,7 @@ {% block menu %}
  • - {{ book.pretty_title }} diff --git a/apps/catalogue/templates/catalogue/player.html b/apps/catalogue/templates/catalogue/player.html index b5d6d1259..507e5d51a 100755 --- a/apps/catalogue/templates/catalogue/player.html +++ b/apps/catalogue/templates/catalogue/player.html @@ -17,12 +17,12 @@ - {% if book.cover %} + {% if book.cover_thumb %} Cover {% endif %} diff --git a/apps/social/locale/pl/LC_MESSAGES/django.mo b/apps/social/locale/pl/LC_MESSAGES/django.mo index e540b21fb2e53ea3d0948bfb2e55ff6dcba5856d..8b72b7b4cefad9e4de67ea5467c4dd7db5b7fb51 100644 GIT binary patch delta 791 zcmZ9}KWGzC9Ki9Hc&Qp&ZCdNUN_;4Sg9(XTl%!o+Pzx1l2ceVnG>>|1lM8oO(nKMH zpe_y?Tr3FU(m|(gB@T+ALnj>^U0uY*#Yy`8rI*FWz5Bf1FYoUC^1FA#+o{%%5$ly= zoME12{$gHac4FKZb8)5Ca2}JmgGKy?=Wy_VQit#|j$r|h<1C)XMLdCzkxRYiHiK_) zK&h7c$-*M>JMs@Ei2p|Z!$D$;O=1dVf0~;VbOB|5Hqu63tV+nGrlR}}{K}uYh40Cy z*_7mbwaa3X#CNoD^x*zMGdN0o2j!o+cnMpW#!aL)wSyk+q7*VgI}YO%N<52F(0mjx z;8EhcBIm0L3whuX%El)+gwIi4uz^SLZ4`e%*|&xAmE_aOIJHmj*=X5oy&Ohuy>6Yv z)BPXux*RNr^hb(?w3&CS;V5|wrIqqsr4TuMgel#T4ve+)@fXEu6NK8WI7>#mfi~;T z{cyFRi`NRZbzOJMMmyEAt{ZphK^W+@YT5WYpUbUGXSY7ZU&e;)OfH|fVv{T7uC^Dg z@&7Wo%hE@W<+s_~uB^GkZpGi5i_`D`I;w?8MgCvQ8;tELt-8``_)J5612 kbkH=ux8ij-zC4ZUadqA4b{e|oRo!mKEcYvUIItPp1K3n*wg3PC delta 639 zcmXxhJxfAS7{Kv!^{QoBzGX#H5(F(5?lm)XN?IBk8u|hb;Z_v51%8IOG&UtfB0(qw z4uTQ5O9U+qVGuRcR7*quM~?@e`#aC^yq|XTGE#ksndgeKK%|HPu}U-yK9ntwQWY#> z5btmq?{NZOaTY%@freM96-;6h^Tx>DR8iOHZ4Vis z9#J;(jM9Ig{Xm)c8>Qc`ZvVqBhw;$Zp#6bCGX9v(S=LvlRAixBjAIAoM15StcU;0~ zV0022kI1tq8>rzV)^*-OhN!mAyEskW(>|f}e?vd(t1l{H{6U$}|B!CQPBc ziaeE+xe>$7>*^4hOZv+q@&xn5xG=@=cE\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" +"|| n%100>=20) ? 1 : 2);\n" +"X-Generator: Poedit 1.5.4\n" #: admin.py:16 msgid "Background" @@ -54,7 +54,7 @@ msgstr "Sprawia, że cytat wyświetla się mniejszym fontem." msgid "VIP" msgstr "VIP" -#: models.py:18 models.py:30 +#: models.py:18 models.py:31 msgid "link" msgstr "odnośnik" @@ -67,37 +67,41 @@ msgid "Sticky cites will take precedense." msgstr "Przyklejone cytaty mają pierwszeństwo." #: models.py:24 +msgid "Best image is exactly 975px wide and weights under 100kB." +msgstr "Najlepszy obraz ma szerokość 975px i waży poniżej 100kB." + +#: models.py:25 msgid "shift" msgstr "przesunięcie" -#: models.py:25 +#: models.py:26 msgid "" "Vertical shift, in percents. 0 means top, 100 is bottom. Default is 50%." msgstr "" "Przesunięcie w pionie, w procentach. 0 to wyrównanie do górnej krawędzi, 100 " "do dolnej. Domyślne jest 50%." -#: models.py:26 +#: models.py:27 msgid "title" msgstr "tytuł" -#: models.py:28 +#: models.py:29 msgid "author" msgstr "autor" -#: models.py:31 +#: models.py:32 msgid "license name" msgstr "nazwa licencji" -#: models.py:33 +#: models.py:34 msgid "license link" msgstr "adres licencji" -#: models.py:37 +#: models.py:38 msgid "cite" msgstr "cytat" -#: models.py:38 +#: models.py:39 msgid "cites" msgstr "cytaty" diff --git a/apps/social/models.py b/apps/social/models.py index 835773de1..df1b17599 100644 --- a/apps/social/models.py +++ b/apps/social/models.py @@ -20,7 +20,8 @@ class Cite(models.Model): help_text=_('Sticky cites will take precedense.')) image = models.ImageField(_('image'), upload_to='social/cite', - null=True, blank=True) + null=True, blank=True, + help_text=_('Best image is exactly 975px wide and weights under 100kB.')) image_shift = models.IntegerField(_('shift'), null=True, blank=True, help_text=_(u'Vertical shift, in percents. 0 means top, 100 is bottom. Default is 50%.')) image_title = models.CharField(_('title'), max_length=255, diff --git a/apps/wolnelektury_core/views.py b/apps/wolnelektury_core/views.py index 77cd01681..f2a774b60 100644 --- a/apps/wolnelektury_core/views.py +++ b/apps/wolnelektury_core/views.py @@ -20,7 +20,7 @@ from social.templatetags.social_tags import choose_cite def main_page(request): - last_published = Book.objects.filter(parent=None).order_by('-created_at')[:4] + last_published = Book.objects.exclude(cover_thumb='').filter(parent=None).order_by('-created_at')[:4] cite = choose_cite(RequestContext(request)) return render_to_response("main_page.html", locals(), -- 2.20.1 From 9bbc3e87eb5de5206ed040f47a31ac47d96b3300 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Fri, 24 Jan 2014 10:48:28 +0100 Subject: [PATCH 07/16] Another cover fix. --- apps/catalogue/templates/catalogue/book_mini_box.html | 2 +- apps/catalogue/templates/catalogue/book_short.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/catalogue/templates/catalogue/book_mini_box.html b/apps/catalogue/templates/catalogue/book_mini_box.html index 82038e712..49257b1c3 100755 --- a/apps/catalogue/templates/catalogue/book_mini_box.html +++ b/apps/catalogue/templates/catalogue/book_mini_box.html @@ -3,7 +3,7 @@ {% if with_link %} {% endif %} - {% if book.cover %} + {% if book.cover_thumb %} {{ author_str }} – {{ book.title }} {% endif %} diff --git a/apps/catalogue/templates/catalogue/book_short.html b/apps/catalogue/templates/catalogue/book_short.html index 5757c6a03..3a0d37a86 100644 --- a/apps/catalogue/templates/catalogue/book_short.html +++ b/apps/catalogue/templates/catalogue/book_short.html @@ -40,7 +40,7 @@
  • - {% if book.cover %} + {% if book.cover_thumb %} {% if main_link %}{% endif %} Cover -- 2.20.1 From ab86dfc26dcdfc69688d4498b1b683de85a923de Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Mon, 27 Jan 2014 11:07:50 +0100 Subject: [PATCH 08/16] Other versions on book detail page. --- .../templates/catalogue/book_detail.html | 14 ++++++++++-- apps/catalogue/templatetags/catalogue_tags.py | 13 +++++------ apps/catalogue/tests/tags.py | 8 +++---- .../static/scss/main/book_box.scss | 22 ++++++++++++++----- 4 files changed, 37 insertions(+), 20 deletions(-) diff --git a/apps/catalogue/templates/catalogue/book_detail.html b/apps/catalogue/templates/catalogue/book_detail.html index bb5abeb48..454bce150 100644 --- a/apps/catalogue/templates/catalogue/book_detail.html +++ b/apps/catalogue/templates/catalogue/book_detail.html @@ -15,10 +15,20 @@ {% work_list book_children %} +{% spaceless %} +{% if book.other_versions %} +
    +

    {% trans "Other versions" %}:

    +{% for rel in book.other_versions %} + {% book_mini rel %} +{% endfor %} +
    +{% endif %} -
    +

    {% trans "See also" %}:

    -{% related_books book %} +{% related_books book taken=book.other_versions|length %}
    +{% endspaceless %} {% endblock %} diff --git a/apps/catalogue/templatetags/catalogue_tags.py b/apps/catalogue/templatetags/catalogue_tags.py index e80a5ffe6..0800865ee 100644 --- a/apps/catalogue/templatetags/catalogue_tags.py +++ b/apps/catalogue/templatetags/catalogue_tags.py @@ -388,17 +388,14 @@ def fragment_promo(arg=None): @register.inclusion_tag('catalogue/related_books.html') -def related_books(book, limit=6, random=1): +def related_books(book, limit=6, random=1, taken=0): + limit = limit - taken cache_key = "catalogue.related_books.%d.%d" % (book.id, limit - random) related = cache.get(cache_key) if related is None: - related = list(Book.objects.filter( - common_slug=book.common_slug).exclude(pk=book.pk)[:limit]) - limit -= len(related) - if limit > random: - related += Book.tagged.related_to(book, - Book.objects.exclude(common_slug=book.common_slug), - ignore_by_tag=book.book_tag())[:limit-random] + related = Book.tagged.related_to(book, + Book.objects.exclude(common_slug=book.common_slug), + ignore_by_tag=book.book_tag())[:limit-random] cache.set(cache_key, related, 1800) if random: random_books = Book.objects.exclude( diff --git a/apps/catalogue/tests/tags.py b/apps/catalogue/tests/tags.py index 99edebbe7..c3d50e284 100644 --- a/apps/catalogue/tests/tags.py +++ b/apps/catalogue/tests/tags.py @@ -270,10 +270,10 @@ class BookTagsTests(WLTestCase): related_info = book.related_info() related_themes = book.related_themes() - self.assertEqual(related_info['tags']['author'], - [{'name_pl': 'Common Man', 'slug': 'common-man'}]) - self.assertEqual(related_info['tags']['kind'], - [{'name_pl': 'Kind', 'slug': 'kind'}]) + self.assertEqual([t['slug'] for t in related_info['tags']['author']], + ['common-man']) + self.assertEqual([t['slug'] for t in related_info['tags']['kind']], + ['kind']) self.assertEqual([(tag.name, tag.count) for tag in related_themes], [('ChildTheme', 1), ('ParentTheme', 1), ('Theme', 2)]) diff --git a/apps/wolnelektury_core/static/scss/main/book_box.scss b/apps/wolnelektury_core/static/scss/main/book_box.scss index e72bca8d0..c9b3656f1 100755 --- a/apps/wolnelektury_core/static/scss/main/book_box.scss +++ b/apps/wolnelektury_core/static/scss/main/book_box.scss @@ -6,11 +6,6 @@ @include white-box; } -.book-mini-box img.cover { - @include size(height, 193px); - @include size(width, 139px); -} - .cover-area { float: left; @@ -36,20 +31,35 @@ } .book-mini-box { - @include size(width, 161.5px); + /* Original design fits 6 boxes horizontally in 975px (162.5px each), + * but we really want to fit 2 boxes on a 320px mobile screen. */ + + @include size(width, 160px); display: inline-block; vertical-align: top; + @include min-screen(350px) { + @include size(width, 162.5px); + } + .book-mini-box-inner { @include inner-box; @include size(height, 271px); @include size(margin, 1px); + @include size(padding, 8px 9px); overflow: hidden; + + @include min-screen(350px) { + @include size(padding, 8px 10px); + } + a { display: block; } } img.cover { + @include size(height, 193px); + @include size(width, 139px); @include size(margin-bottom, 18px); } .language { -- 2.20.1 From 5667153616be3469413bc0fe8925bbbc4937be70 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Mon, 3 Feb 2014 10:07:38 +0100 Subject: [PATCH 09/16] Custom cover support in Librarian. --- lib/librarian | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librarian b/lib/librarian index bca485bab..ca1a73838 160000 --- a/lib/librarian +++ b/lib/librarian @@ -1 +1 @@ -Subproject commit bca485bab3f6b59cdee68d3c3c3bb006c0006e97 +Subproject commit ca1a73838b1045835171dfa243f9c2c0dfa735fe -- 2.20.1 From bb280fe2e90038e0ae3fa78356c50d98a163eb89 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Mon, 3 Feb 2014 14:23:18 +0100 Subject: [PATCH 10/16] Fix themes display in HTML. --- apps/wolnelektury_core/static/scss/book_text/themes.scss | 9 +++++---- lib/librarian | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/apps/wolnelektury_core/static/scss/book_text/themes.scss b/apps/wolnelektury_core/static/scss/book_text/themes.scss index 432a671bd..9e8ebc0da 100644 --- a/apps/wolnelektury_core/static/scss/book_text/themes.scss +++ b/apps/wolnelektury_core/static/scss/book_text/themes.scss @@ -49,12 +49,13 @@ nav #menu-themes { @include size(width, 120px); height: auto; overflow: visible; - margin-left: 30px; - font-size: .9em; + include @size(margin-left, 30px); + include @size(font-size, 14.4px); + text-indent: 0; - border-left: 1px solid #DDDDDD; + include @size(border-left, 1px solid #DDDDDD); color: #777; - padding: 0 0 0 8px; + include @size(padding, 0 0 0 8px); &:before { display: none; diff --git a/lib/librarian b/lib/librarian index ca1a73838..118a8cf10 160000 --- a/lib/librarian +++ b/lib/librarian @@ -1 +1 @@ -Subproject commit ca1a73838b1045835171dfa243f9c2c0dfa735fe +Subproject commit 118a8cf1045eee8369f21236e1400189f3ec2647 -- 2.20.1 From e22bc1d420f3fa0caea45f7e065c5b376756ee01 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Mon, 3 Feb 2014 14:29:41 +0100 Subject: [PATCH 11/16] Fix SCSS error. --- apps/wolnelektury_core/static/scss/book_text/themes.scss | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/wolnelektury_core/static/scss/book_text/themes.scss b/apps/wolnelektury_core/static/scss/book_text/themes.scss index 9e8ebc0da..26ed14bdb 100644 --- a/apps/wolnelektury_core/static/scss/book_text/themes.scss +++ b/apps/wolnelektury_core/static/scss/book_text/themes.scss @@ -49,13 +49,13 @@ nav #menu-themes { @include size(width, 120px); height: auto; overflow: visible; - include @size(margin-left, 30px); - include @size(font-size, 14.4px); + @include size(margin-left, 30px); + @include size(font-size, 14.4px); text-indent: 0; - include @size(border-left, 1px solid #DDDDDD); + @include size(border-left, 1px solid #DDDDDD); color: #777; - include @size(padding, 0 0 0 8px); + @include size(padding, 0 0 0 8px); &:before { display: none; -- 2.20.1 From e6fc1b86fcdb4f99c00d4218fcaa5eab6f64c4cb Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Wed, 5 Feb 2014 11:59:50 +0100 Subject: [PATCH 12/16] Translatable chunks. --- .../catalogue/locale/pl/LC_MESSAGES/django.mo | Bin 12297 -> 11366 bytes .../catalogue/locale/pl/LC_MESSAGES/django.po | 178 +++++++++--------- .../templates/catalogue/audiobook_list.html | 5 +- .../templates/catalogue/book_list.html | 7 +- .../templates/catalogue/daisy_list.html | 5 +- apps/chunks/migrations/0001_initial.py | 49 +++++ ...e__add_field_chunk_content_en__add_fiel.py | 109 +++++++++++ apps/chunks/migrations/__init__.py | 0 apps/chunks/models.py | 9 +- apps/chunks/templatetags/chunks.py | 55 ++---- .../templates/picture/picture_list_thumb.html | 4 +- .../templates/superbase.html | 20 +- wolnelektury/translation.py | 6 +- 13 files changed, 287 insertions(+), 160 deletions(-) create mode 100644 apps/chunks/migrations/0001_initial.py create mode 100644 apps/chunks/migrations/0002_auto__add_field_chunk_content_de__add_field_chunk_content_en__add_fiel.py create mode 100644 apps/chunks/migrations/__init__.py diff --git a/apps/catalogue/locale/pl/LC_MESSAGES/django.mo b/apps/catalogue/locale/pl/LC_MESSAGES/django.mo index d3585a52ad4ab0bc4850ae656f6f4bf7ac82fe9d..66ae6880c7f5d73e18c3e40e2f5e2744dcd8f264 100644 GIT binary patch delta 3721 zcmY+`3ry8j0LSrz7f?hH6%bJ5qC8YUK|zH~Q}GSvGq5BSQBV;S(DHf1M@Hs5O7KBx zxaD-K-Pu;Owj4|?S4|taN^NRpS+X{pR_pQo-Fs+uwjZDKf1T(5f3?5by74Tk;q%rnup7r$kdd12u?OD6P}BjFGGW*Y<51^Ep(c`Rua}^n zUyEVrLQSj=1L@y1Q&9uw?1gVoOX<_oJCkn6DHD$x=t$I3K5nmPqh?fqn&C>+7Og`~ zU@K~3dr{9HL_L2LU2LmqqS6oDs2eY#FMf@B;5vF%0JW6&P&4so)Ou(7qMpk{H9QWr zRZ~zau^6>7n@|(mkGlUzFV^2P08VIzZq$;tqTYcoQ8T-Xy6;bWJ%HBKK?G_b!%@#o zwdSLqFTn)dj9Qr{WbEc$RDUg@tUqmZk$r79U4-a2nOH z8+G5usJFWfb^lFN!#|_$`_&%*gBqwW`>XRI)_&;F_n%Bf52m6T%J5t;W{f>Q9yNf; z)?Dix)cy0(Gb2<-C0NInRAGOP1NimQ+n$Wt;&dE{6VXrKe>oK`eKqEw3)Ao-Cgb0z z0VMH_s-ZO0%rjBvCn39Ha*)ZIrRc;O)Gy&N)H~3OTG7i`jaSk0{m+i^HoOqE6{Yrg z1M>cvt*Dtcpc*=k8fY_W09~Bk2?V1$h(xtB0JS0`P+K-0)m|RzdbyMJ*Gy_Sp|^84 zs)Hk_2hN~o{0V9%mrzT07xi3dtoQ4QMaE(>Py?8UTKYm%hg(nst+zH}JjYG3F7KXv z$_b71Thu`ASRbGU;7@BZ*cy(yuOF)86x0^xqCTs9)cu9_xCE0pF2_OGfT`HxqM`?X zLoKlx;QiMw0QG$*qGq0ry05@miu}fyD%59Ji(1lp)C!)m$1SLdePz9A&$pv~cU+y~ zybp$32cec`G>*n1)MwL(ywK(}>Lt5?YTy=X1sG?8LbL{v7Ax5zB= zBIzh&sFaYG$aXTDOd?0<-^`@KFQMn(Y4DWe{9SG9d#xjIGMPs-`&UR7Sx!_c$uLii z?;fX)hea~~PG+mc#6JDl?h}t(P!3Cwor*9YsogE-*7Cqd&O|?Vc)}Tn`=i0_jvlKj aic88`wii1qRxD`_zyEpML=k*GFOi delta 4642 zcmdVcYj9L&0mkt+Bq1Rf0!>J4qU2B#2q6SQ0thxOw?Z0H3=L8$DX_^du-Rl!y1OxE zp9iec>P&IGOa&B0M;SZ*pR+H{@Xc=> z-{INcIcLv#?`OmB);zc&@xcul`wit;@)^>aY0P8N)#~7YZ>QOYugWgoRj-<+utzi*YQ* z1E>xq@h*H3M`QlDR0m7Z>o_tdvj~f@0d?O7%rgmNIytE0!dBFcCr}liw7!g=;`}vK zN8d*NnPEN(@DegelW_x$V?OHo6x2X&Mt#2;^?U%wV;IY6-}G~!9(^BG!E^co&!DFC z&!~}HMKxT&P3q`m)KpfXzOO}Q*EFH(Yeg;9X4C*8sDUL=&+ov5D%j0IF7Cq#_%!Oq zS1<$LKt1pldNY8U%3;(&@2nsOQ5t83#}^bZk8H&#ao~ zxu6Drjts^OV+sBR^?fc+v%idks;Gt!b)*3`(lz)Hu19U+i>R5pjH>slJ+o{x?ze zzJt2&eS7{#R7Wm)*IEC6*&DL?b-Ss1DRv=UVGg_b*0oK&XaR z;(nIm9=wV3zw(M{vlo`KYd`CcT)GijjHe* zY6d<;)pH41escx&cH~WD17juX_hLC}{~13An%b=x!|kXkyNarK6y4U6j6^_)e`%x`XD{k3)ni1je413$8!w7zV=e+|{}JE$4>JL;`UqjEi$joxdU;9wdTif}3}#+lfKdhkiq z6n_udKjz2Cel@>9jr@XjKhle*><6xKZ=@(7f>BIhg#|j$WkUu1`DS(y%9%Z zH6F#;_WakV4xUGi_!4SnvYD<1%*T3c#ZmYes=gzrCHx6q#xv;cjmnf~a4qedcR9%9 zhFaD^9hirjvIWQ>O*39dGo}|+abS9?f;j3e*@2po{ip_C#C!29s@_|wQyp7^`hEqf z{`EM9_Kj-PFEj^g}7)E@Yg{eHxZRJ}#0 z?;T8JaZt&Dre+pubKQ!gu@!aWX4K3??DalW!vpsEF3jb859Z-vRK3Sh9eo}(@>7_O zZ`td=n!)_5qIbEVhK5lM{T?*~7f}!V1J%G)WF@@s^fstek?#;~#@on7@&ytn2Z_r4 zDZI|C<5-wAK6b-Hj%Fowux8j_?%1n zi8ktHGC<~&{}wf*sc$9hm+J~YR^F(!nVu$JB}<7)9?{ADm1qjH6M3!8=j{2DxYr)vgC*n< zvVe>uDz}pLM8BdHL}j5q>h(csBl^wm(+Q=Jl#$)!0J&DYhd61`h2)jo^0b6M=*9ve zpVJu##d;!6G#+w0!+q_WosB(VzpuR`=&W#i-S&7O8umHOZf7*)tIoN@9eOFy9t=2f zCmalPI3YI@?~BHKgFBqIK)icsn=i(7C#W;W-4yYKgVZq8U!AkChX&hRHxzWjzD<$7 z`d(kh;D8ekbBp5(#Z*z1(>ru1@@mpg<#c3;FWeLJIW4h3n0^MGMqk)z4n*UDP<65> zuO}m`JJ?Rw1IaDC!lLrxT0x_`~kdq4prt*BdA#u6^khx(-n87>={2*a*UWQjX3ejgz4w\n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" @@ -98,7 +98,7 @@ msgstr "Błąd podczas importowania pliku: %r" msgid "Download custom PDF" msgstr "Stwórz własny PDF" -#: views.py:633 templates/catalogue/book_short.html:103 +#: views.py:633 templates/catalogue/book_short.html:97 #: templates/catalogue/book_wide.html:63 msgid "Download" msgstr "Pobierz" @@ -125,7 +125,7 @@ msgstr "slug" msgid "language code" msgstr "Kod języka" -#: models/book.py:36 models/book.py:161 models/collection.py:13 +#: models/book.py:36 models/book.py:164 models/collection.py:13 #: models/tag.py:37 models/tag.py:94 msgid "description" msgstr "opis" @@ -147,25 +147,29 @@ msgstr "dodatkowe informacje" msgid "cover" msgstr "okładka" -#: models/book.py:67 models/collection.py:18 models/tag.py:22 +#: models/book.py:48 +msgid "cover thumbnail" +msgstr "podgląd okładki" + +#: models/book.py:70 models/collection.py:18 models/tag.py:22 msgid "book" msgstr "książka" -#: models/book.py:68 +#: models/book.py:71 msgid "books" msgstr "książki" -#: models/book.py:259 +#: models/book.py:262 #, python-format msgid "Book \"%s\" does not exist." msgstr "Utwór \"%s\" nie istnieje." -#: models/book.py:273 +#: models/book.py:276 #, python-format msgid "Book %s already exists" msgstr "Książka %s już istnieje" -#: models/book.py:620 models/bookmedia.py:23 +#: models/book.py:625 models/bookmedia.py:23 #, python-format msgid "%s file" msgstr "plik %s" @@ -262,30 +266,25 @@ msgstr "" "Tagi typu książka nie mogą mieć ustawionych linków. Ustaw je bezpośrednio " "dla książki, zamiast dla jej tagu." -#: templates/catalogue/audiobook_list.html:7 -#: templates/catalogue/audiobook_list.html:16 +#: templates/catalogue/audiobook_list.html:8 +#: templates/catalogue/audiobook_list.html:17 msgid "Listing of all audiobooks" msgstr "Spis wszystkich audiobooków" -#: templates/catalogue/audiobook_list.html:12 +#: templates/catalogue/audiobook_list.html:13 msgid "Latest MP3 audiobooks" msgstr "Ostatnio dodane audiobooki w formacie MP3" -#: templates/catalogue/audiobook_list.html:13 +#: templates/catalogue/audiobook_list.html:14 msgid "Latest Ogg Vorbis audiobooks" msgstr "Ostatnio dodane audiobooki w formacie Ogg Vorbis" -#: templates/catalogue/audiobook_list.html:19 -msgid "" -"Audioteka lektur szkolnych fundacji Nowoczesna Polska.\n" -"Możecie z niej korzystać bezpłatnie i bez ograniczeń.\n" -"Audiobooki nagrywają znani aktorzy, wśród nich Danuta Stenka i Jan Peszek." -msgstr "" -"Audioteka lektur szkolnych fundacji Nowoczesna Polska.\n" -"Możecie z niej korzystać bezpłatnie i bez ograniczeń.\n" -"Audiobooki nagrywają znani aktorzy, wśród nich Danuta Stenka i Jan Peszek." - #: templates/catalogue/book_detail.html:21 +#: templates/catalogue/book_text.html:20 +msgid "Other versions" +msgstr "Inne wersje" + +#: templates/catalogue/book_detail.html:29 #: templates/catalogue/tagged_object_list.html:74 #: templates/catalogue/tagged_object_list.html:109 msgid "See also" @@ -340,126 +339,115 @@ msgstr "Publikację ufundowali i ufundowały:" msgid "Cover image by:" msgstr "Ilustracja na okładce:" -#: templates/catalogue/book_list.html:7 templates/catalogue/book_list.html:10 +#: templates/catalogue/book_list.html:8 templates/catalogue/book_list.html:11 +#: templates/catalogue/picture_list.html:8 +#: templates/catalogue/picture_list.html:10 msgid "Listing of all works" msgstr "Spis wszystkich utworów" -#: templates/catalogue/book_list.html:21 +#: templates/catalogue/book_list.html:24 msgid "Table of Content" msgstr "Spis treści" -#: templates/catalogue/book_list.html:31 +#: templates/catalogue/book_list.html:34 msgid "↑ top ↑" msgstr "↑ góra ↑" -#: templates/catalogue/book_short.html:61 +#: templates/catalogue/book_short.html:55 #: templates/catalogue/picture_detail.html:54 msgid "Epoch" msgstr "Epoka" -#: templates/catalogue/book_short.html:69 +#: templates/catalogue/book_short.html:63 #: templates/catalogue/picture_detail.html:60 msgid "Kind" msgstr "Rodzaj" -#: templates/catalogue/book_short.html:77 +#: templates/catalogue/book_short.html:71 msgid "Genre" msgstr "Gatunek" -#: templates/catalogue/book_short.html:86 +#: templates/catalogue/book_short.html:80 msgid "Language" msgstr "Język" -#: templates/catalogue/book_short.html:99 +#: templates/catalogue/book_short.html:93 msgid "Read online" msgstr "Czytaj online" -#: templates/catalogue/book_short.html:106 +#: templates/catalogue/book_short.html:100 msgid "to print" msgstr "do druku" -#: templates/catalogue/book_short.html:109 +#: templates/catalogue/book_short.html:103 msgid "for an e-book reader" msgstr "na czytnik e-booków" -#: templates/catalogue/book_short.html:112 +#: templates/catalogue/book_short.html:106 msgid "for Kindle" msgstr "na Kindle" -#: templates/catalogue/book_short.html:115 +#: templates/catalogue/book_short.html:109 msgid "FictionBook" msgstr "FictionBook" -#: templates/catalogue/book_short.html:118 +#: templates/catalogue/book_short.html:112 msgid "for advanced usage" msgstr "do zadań specjalnych" -#: templates/catalogue/book_short.html:124 +#: templates/catalogue/book_short.html:118 msgid "Listen" msgstr "Słuchaj" -#: templates/catalogue/book_text.html:10 templates/catalogue/player.html:11 -msgid "Wolne Lektury" -msgstr "Wolne Lektury" - -#: templates/catalogue/book_text.html:34 -msgid "Other versions" -msgstr "Inne wersje" - -#: templates/catalogue/book_text.html:40 +#: templates/catalogue/book_text.html:26 msgid "Table of contents" msgstr "Spis treści" -#: templates/catalogue/book_text.html:44 templatetags/catalogue_tags.py:424 +#: templates/catalogue/book_text.html:30 templatetags/catalogue_tags.py:421 msgid "Themes" msgstr "Motywy" -#: templates/catalogue/book_text.html:48 -#: templates/catalogue/book_text.html:100 +#: templates/catalogue/book_text.html:34 templates/catalogue/book_text.html:91 msgid "Settings" msgstr "Ustawienia" -#: templates/catalogue/book_text.html:52 +#: templates/catalogue/book_text.html:38 msgid "Edit. note" msgstr "Nota red." -#: templates/catalogue/book_text.html:56 +#: templates/catalogue/book_text.html:42 msgid "Infobox" msgstr "Informacje" -#: templates/catalogue/book_text.html:68 -#: templates/catalogue/book_text.html:114 +#: templates/catalogue/book_text.html:56 +#: templates/catalogue/viewer_base.html:53 msgid "Close" msgstr "Zamknij" -#: templates/catalogue/book_text.html:69 +#: templates/catalogue/book_text.html:57 msgid "Please wait..." msgstr "Proszę czekać…" -#: templates/catalogue/book_text.html:82 +#: templates/catalogue/book_text.html:73 msgid "Other versions of the book" msgstr "Inne wersje utworu" -#: templates/catalogue/book_text.html:83 +#: templates/catalogue/book_text.html:74 msgid "Close the other version" msgstr "Zamknij drugą wersję" -#: templates/catalogue/book_text.html:101 +#: templates/catalogue/book_text.html:92 msgid "Display line numbers" msgstr "Wyświetlaj numerację" -#: templates/catalogue/book_text.html:102 +#: templates/catalogue/book_text.html:93 msgid "Display themes" msgstr "Wyświetlaj motywy" -#: templates/catalogue/book_text.html:103 +#: templates/catalogue/book_text.html:94 msgid "Display footnotes" msgstr "Wyświetlaj przypisy" -#: templates/catalogue/book_text.html:116 -msgid "Loading" -msgstr "Ładowanie" - #: templates/catalogue/book_wide.html:22 #: templates/catalogue/tagged_object_list.html:60 msgid "Motifs and themes" @@ -517,28 +505,28 @@ msgstr "Pobierz katalog w formacie PDF." #: templates/catalogue/catalogue.html:19 #: templates/catalogue/search_multiple_hits.html:17 #: templates/catalogue/tagged_object_list.html:26 -#: templatetags/catalogue_tags.py:420 +#: templatetags/catalogue_tags.py:417 msgid "Authors" msgstr "Autorzy" #: templates/catalogue/catalogue.html:22 #: templates/catalogue/search_multiple_hits.html:25 #: templates/catalogue/tagged_object_list.html:34 -#: templatetags/catalogue_tags.py:422 +#: templatetags/catalogue_tags.py:419 msgid "Kinds" msgstr "Rodzaje" #: templates/catalogue/catalogue.html:25 #: templates/catalogue/search_multiple_hits.html:33 #: templates/catalogue/tagged_object_list.html:42 -#: templatetags/catalogue_tags.py:421 +#: templatetags/catalogue_tags.py:418 msgid "Genres" msgstr "Gatunki" #: templates/catalogue/catalogue.html:28 #: templates/catalogue/search_multiple_hits.html:41 #: templates/catalogue/tagged_object_list.html:50 -#: templatetags/catalogue_tags.py:423 +#: templatetags/catalogue_tags.py:420 msgid "Epochs" msgstr "Epoki" @@ -550,27 +538,15 @@ msgstr "Motywy i tematy" msgid "Collections" msgstr "Kolekcje" -#: templates/catalogue/daisy_list.html:6 -#: templates/catalogue/daisy_list.html:12 +#: templates/catalogue/daisy_list.html:7 +#: templates/catalogue/daisy_list.html:13 msgid "Listing of all DAISY files" msgstr "Spis wszystkich plików DAISY" -#: templates/catalogue/daisy_list.html:9 +#: templates/catalogue/daisy_list.html:10 msgid "Latest DAISY audiobooks" msgstr "Ostatnio dodane audiobooki w formacie DAISY" -#: templates/catalogue/daisy_list.html:15 -msgid "" -"System DAISY to uznany na całym świecie format udostępniania książek\n" -"dostosowany do potrzeb osób słabowidzących, niewidomych oraz innych osób\n" -"mających trudności z czytaniem. Możecie z nich korzystać bezpłatnie i bez " -"ograniczeń." -msgstr "" -"System DAISY to uznany na całym świecie format udostępniania książek\n" -"dostosowany do potrzeb osób słabowidzących, niewidomych oraz innych osób\n" -"mających trudności z czytaniem. Możecie z nich korzystać bezpłatnie i bez " -"ograniczeń." - #: templates/catalogue/differentiate_tags.html:12 msgid "The criteria are ambiguous. Please select one of the following options:" msgstr "" @@ -610,7 +586,7 @@ msgstr "Audiobooki" msgid "DAISY" msgstr "DAISY" -#: templates/catalogue/menu.html:40 templates/catalogue/tag_list_split.html:14 +#: templates/catalogue/menu.html:40 templates/catalogue/tag_list_split.html:8 msgid "Gallery" msgstr "Galeria" @@ -650,10 +626,9 @@ msgstr "Źródłowy plik XML" msgid "Work's themes " msgstr "Motywy w utworze" -#: templates/catalogue/picture_list.html:8 -#: templates/catalogue/picture_list.html:10 -msgid "Listing of all pictures" -msgstr "Spis wszystkich obrazów" +#: templates/catalogue/player.html:11 templates/catalogue/viewer_base.html:9 +msgid "Wolne Lektury" +msgstr "Wolne Lektury" #: templates/catalogue/player.html:34 msgid "Book's page" @@ -768,7 +743,7 @@ msgstr "" msgid "Sorry! Search query must have at least two characters." msgstr "Przepraszamy! Zapytanie musi zawierać co najmniej dwa znaki." -#: templates/catalogue/tag_list_split.html:5 +#: templates/catalogue/tag_list_split.html:3 msgid "Literature" msgstr "Literatura" @@ -787,6 +762,10 @@ msgstr "w serwisie Lektury.Gazeta.pl" msgid "in Wikipedia" msgstr "w Wikipedii" +#: templates/catalogue/viewer_base.html:55 +msgid "Loading" +msgstr "Ładowanie" + #: templates/catalogue/snippets/custom_pdf_link_li.html:5 msgid "Download a custom PDF" msgstr "Stwórz własny plik PDF" @@ -796,6 +775,29 @@ msgstr "Stwórz własny plik PDF" msgid "Free license" msgstr "Wolna licencja" +#~ msgid "" +#~ "Audioteka lektur szkolnych fundacji Nowoczesna Polska.\n" +#~ "Możecie z niej korzystać bezpłatnie i bez ograniczeń.\n" +#~ "Audiobooki nagrywają znani aktorzy, wśród nich Danuta Stenka i Jan Peszek." +#~ msgstr "" +#~ "Audioteka lektur szkolnych fundacji Nowoczesna Polska.\n" +#~ "Możecie z niej korzystać bezpłatnie i bez ograniczeń.\n" +#~ "Audiobooki nagrywają znani aktorzy, wśród nich Danuta Stenka i Jan Peszek." + +#~ msgid "" +#~ "System DAISY to uznany na całym świecie format udostępniania książek\n" +#~ "dostosowany do potrzeb osób słabowidzących, niewidomych oraz innych osób\n" +#~ "mających trudności z czytaniem. Możecie z nich korzystać bezpłatnie i bez " +#~ "ograniczeń." +#~ msgstr "" +#~ "System DAISY to uznany na całym świecie format udostępniania książek\n" +#~ "dostosowany do potrzeb osób słabowidzących, niewidomych oraz innych osób\n" +#~ "mających trudności z czytaniem. Możecie z nich korzystać bezpłatnie i bez " +#~ "ograniczeń." + +#~ msgid "Listing of all pictures" +#~ msgstr "Spis wszystkich obrazów" + #~ msgid "for a reader" #~ msgstr "na czytnik" diff --git a/apps/catalogue/templates/catalogue/audiobook_list.html b/apps/catalogue/templates/catalogue/audiobook_list.html index 47c804611..1358025a1 100644 --- a/apps/catalogue/templates/catalogue/audiobook_list.html +++ b/apps/catalogue/templates/catalogue/audiobook_list.html @@ -1,6 +1,7 @@ {% extends "catalogue/book_list.html" %} {% load i18n %} {% load catalogue_tags %} +{% load chunks %} {% block bodyid %}book-a-list{% endblock %} @@ -16,7 +17,5 @@ {% block book_list_header %}{% trans "Listing of all audiobooks" %}{% endblock %} {% block book_list_info %} -

    {% blocktrans %}Audioteka lektur szkolnych fundacji Nowoczesna Polska. -Możecie z niej korzystać bezpłatnie i bez ograniczeń. -Audiobooki nagrywają znani aktorzy, wśród nich Danuta Stenka i Jan Peszek.{% endblocktrans %}

    +{% chunk 'audiobook-list' %} {% endblock %} diff --git a/apps/catalogue/templates/catalogue/book_list.html b/apps/catalogue/templates/catalogue/book_list.html index 00088a58e..260c71fdf 100644 --- a/apps/catalogue/templates/catalogue/book_list.html +++ b/apps/catalogue/templates/catalogue/book_list.html @@ -1,6 +1,7 @@ {% extends "base.html" %} {% load i18n %} {% load catalogue_tags %} +{% load chunks %} {% block bodyid %}book-a-list{% endblock %} @@ -9,8 +10,10 @@ {% block body %}

    {% block book_list_header %}{% trans "Listing of all works" %}{% endblock %}

    -
    - {% block book_list_info %}{% endblock %} +
    + {% block book_list_info %} + {% chunk 'book-list' %} + {% endblock %}
    diff --git a/apps/catalogue/templates/catalogue/daisy_list.html b/apps/catalogue/templates/catalogue/daisy_list.html index fcc25d519..4f570b2b6 100644 --- a/apps/catalogue/templates/catalogue/daisy_list.html +++ b/apps/catalogue/templates/catalogue/daisy_list.html @@ -1,5 +1,6 @@ {% extends "catalogue/book_list.html" %} {% load i18n %} +{% load chunks %} {% block bodyid %}book-a-list{% endblock %} @@ -12,7 +13,5 @@ {% block book_list_header %}{% trans "Listing of all DAISY files" %}{% endblock %} {% block book_list_info %} -

    {% blocktrans %}System DAISY to uznany na całym świecie format udostępniania książek -dostosowany do potrzeb osób słabowidzących, niewidomych oraz innych osób -mających trudności z czytaniem. Możecie z nich korzystać bezpłatnie i bez ograniczeń.{% endblocktrans %}

    +{% chunk 'daisy-list' %} {% endblock %} diff --git a/apps/chunks/migrations/0001_initial.py b/apps/chunks/migrations/0001_initial.py new file mode 100644 index 000000000..fa51499ae --- /dev/null +++ b/apps/chunks/migrations/0001_initial.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +import datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + + +class Migration(SchemaMigration): + + def forwards(self, orm): + # Adding model 'Chunk' + db.create_table(u'chunks_chunk', ( + ('key', self.gf('django.db.models.fields.CharField')(max_length=255, primary_key=True)), + ('description', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)), + ('content', self.gf('django.db.models.fields.TextField')(blank=True)), + )) + db.send_create_signal(u'chunks', ['Chunk']) + + # Adding model 'Attachment' + db.create_table(u'chunks_attachment', ( + ('key', self.gf('django.db.models.fields.CharField')(max_length=255, primary_key=True)), + ('attachment', self.gf('django.db.models.fields.files.FileField')(max_length=100)), + )) + db.send_create_signal(u'chunks', ['Attachment']) + + + def backwards(self, orm): + # Deleting model 'Chunk' + db.delete_table(u'chunks_chunk') + + # Deleting model 'Attachment' + db.delete_table(u'chunks_attachment') + + + models = { + u'chunks.attachment': { + 'Meta': {'ordering': "('key',)", 'object_name': 'Attachment'}, + 'attachment': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), + 'key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'primary_key': 'True'}) + }, + u'chunks.chunk': { + 'Meta': {'ordering': "('key',)", 'object_name': 'Chunk'}, + 'content': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), + 'key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'primary_key': 'True'}) + } + } + + complete_apps = ['chunks'] \ No newline at end of file diff --git a/apps/chunks/migrations/0002_auto__add_field_chunk_content_de__add_field_chunk_content_en__add_fiel.py b/apps/chunks/migrations/0002_auto__add_field_chunk_content_de__add_field_chunk_content_en__add_fiel.py new file mode 100644 index 000000000..57c893511 --- /dev/null +++ b/apps/chunks/migrations/0002_auto__add_field_chunk_content_de__add_field_chunk_content_en__add_fiel.py @@ -0,0 +1,109 @@ +# -*- coding: utf-8 -*- +import datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + + +class Migration(SchemaMigration): + + def forwards(self, orm): + # Adding field 'Chunk.content_de' + db.add_column(u'chunks_chunk', 'content_de', + self.gf('django.db.models.fields.TextField')(null=True, blank=True), + keep_default=False) + + # Adding field 'Chunk.content_en' + db.add_column(u'chunks_chunk', 'content_en', + self.gf('django.db.models.fields.TextField')(null=True, blank=True), + keep_default=False) + + # Adding field 'Chunk.content_es' + db.add_column(u'chunks_chunk', 'content_es', + self.gf('django.db.models.fields.TextField')(null=True, blank=True), + keep_default=False) + + # Adding field 'Chunk.content_fr' + db.add_column(u'chunks_chunk', 'content_fr', + self.gf('django.db.models.fields.TextField')(null=True, blank=True), + keep_default=False) + + # Adding field 'Chunk.content_it' + db.add_column(u'chunks_chunk', 'content_it', + self.gf('django.db.models.fields.TextField')(null=True, blank=True), + keep_default=False) + + # Adding field 'Chunk.content_lt' + db.add_column(u'chunks_chunk', 'content_lt', + self.gf('django.db.models.fields.TextField')(null=True, blank=True), + keep_default=False) + + # Adding field 'Chunk.content_pl' + db.add_column(u'chunks_chunk', 'content_pl', + self.gf('django.db.models.fields.TextField')(null=True, blank=True), + keep_default=False) + + # Adding field 'Chunk.content_ru' + db.add_column(u'chunks_chunk', 'content_ru', + self.gf('django.db.models.fields.TextField')(null=True, blank=True), + keep_default=False) + + # Adding field 'Chunk.content_uk' + db.add_column(u'chunks_chunk', 'content_uk', + self.gf('django.db.models.fields.TextField')(null=True, blank=True), + keep_default=False) + + + def backwards(self, orm): + # Deleting field 'Chunk.content_de' + db.delete_column(u'chunks_chunk', 'content_de') + + # Deleting field 'Chunk.content_en' + db.delete_column(u'chunks_chunk', 'content_en') + + # Deleting field 'Chunk.content_es' + db.delete_column(u'chunks_chunk', 'content_es') + + # Deleting field 'Chunk.content_fr' + db.delete_column(u'chunks_chunk', 'content_fr') + + # Deleting field 'Chunk.content_it' + db.delete_column(u'chunks_chunk', 'content_it') + + # Deleting field 'Chunk.content_lt' + db.delete_column(u'chunks_chunk', 'content_lt') + + # Deleting field 'Chunk.content_pl' + db.delete_column(u'chunks_chunk', 'content_pl') + + # Deleting field 'Chunk.content_ru' + db.delete_column(u'chunks_chunk', 'content_ru') + + # Deleting field 'Chunk.content_uk' + db.delete_column(u'chunks_chunk', 'content_uk') + + + models = { + u'chunks.attachment': { + 'Meta': {'ordering': "('key',)", 'object_name': 'Attachment'}, + 'attachment': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), + 'key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'primary_key': 'True'}) + }, + u'chunks.chunk': { + 'Meta': {'ordering': "('key',)", 'object_name': 'Chunk'}, + 'content': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'content_de': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}), + 'content_en': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}), + 'content_es': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}), + 'content_fr': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}), + 'content_it': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}), + 'content_lt': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}), + 'content_pl': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}), + 'content_ru': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}), + 'content_uk': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}), + 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), + 'key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'primary_key': 'True'}) + } + } + + complete_apps = ['chunks'] \ No newline at end of file diff --git a/apps/chunks/migrations/__init__.py b/apps/chunks/migrations/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/apps/chunks/models.py b/apps/chunks/models.py index ef244eb0b..4ab846b3a 100644 --- a/apps/chunks/models.py +++ b/apps/chunks/models.py @@ -1,6 +1,6 @@ from django.core.cache import cache from django.db import models -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import ugettext_lazy as _, get_language class Chunk(models.Model): @@ -20,12 +20,13 @@ class Chunk(models.Model): def __unicode__(self): return self.key - def cache_key(self): - return 'chunk_' + self.key + @staticmethod + def cache_key(key): + return 'chunk/%s/%s' % (key, get_language()) def save(self, *args, **kwargs): ret = super(Chunk, self).save(*args, **kwargs) - cache.delete(self.cache_key()) + cache.delete(self.cache_key(self.key)) return ret diff --git a/apps/chunks/templatetags/chunks.py b/apps/chunks/templatetags/chunks.py index 083c48aa5..cc25df728 100644 --- a/apps/chunks/templatetags/chunks.py +++ b/apps/chunks/templatetags/chunks.py @@ -9,45 +9,23 @@ Chunk = models.get_model('chunks', 'chunk') Attachment = models.get_model('chunks', 'attachment') -def do_get_chunk(parser, token): - # split_contents() knows not to split quoted strings. - tokens = token.split_contents() - if len(tokens) < 2 or len(tokens) > 3: - raise template.TemplateSyntaxError, "%r tag should have either 2 or 3 arguments" % (tokens[0],) - if len(tokens) == 2: - tag_name, key = tokens - cache_time = 0 - if len(tokens) == 3: - tag_name, key, cache_time = tokens - # Check to see if the key is properly double/single quoted - if not (key[0] == key[-1] and key[0] in ('"', "'")): - raise template.TemplateSyntaxError, "%r tag's argument should be in quotes" % tag_name - # Send key without quotes and caching time - return ChunkNode(key[1:-1], cache_time) - - -class ChunkNode(template.Node): - def __init__(self, key, cache_time=0): - self.key = key - self.cache_time = cache_time - - def render(self, context): - try: - cache_key = 'chunk_' + self.key - c = cache.get(cache_key) - if c is None: - c = Chunk.objects.get(key=self.key) - cache.set(cache_key, c, int(self.cache_time)) - content = c.content - except Chunk.DoesNotExist: - n = Chunk(key=self.key) - n.save() - return '' - return content - -register.tag('chunk', do_get_chunk) +@register.simple_tag +def chunk(key, cache_time=0): + try: + cache_key = Chunk.cache_key(key) + c = cache.get(cache_key) + if c is None: + c = Chunk.objects.get(key=key) + cache.set(cache_key, c, int(cache_time)) + content = c.content + except Chunk.DoesNotExist: + n = Chunk(key=key) + n.save() + return '' + return content +@register.simple_tag def attachment(key, cache_time=0): try: cache_key = 'attachment_' + key @@ -58,6 +36,3 @@ def attachment(key, cache_time=0): return c.attachment.url except Attachment.DoesNotExist: return '' - -register.simple_tag(attachment) - diff --git a/apps/picture/templates/picture/picture_list_thumb.html b/apps/picture/templates/picture/picture_list_thumb.html index 031055681..9684f846c 100644 --- a/apps/picture/templates/picture/picture_list_thumb.html +++ b/apps/picture/templates/picture/picture_list_thumb.html @@ -15,8 +15,8 @@
    {% block book_list_info %} -

    Galeria zawiera obrazy, rysunki, rzeźby, fotografie pochodzące ze zbiorów Muzeum Narodowego w Warszawie. Każde z dzieł oznaczyliśmy motywami i tematami występującymi w sztuce i w literaturze. Galerię można więc przeglądać w poszukiwaniu ilustracji do tekstów literackich, a także pod kątem określonych przedmiotów i postaci występujących w sztukach wizualnych.

    -{% endblock %} + {% chunk 'picture-list' %} + {% endblock %}
    {% block book_list_logos %} diff --git a/apps/wolnelektury_core/templates/superbase.html b/apps/wolnelektury_core/templates/superbase.html index 9ee206f57..57dbb1ada 100644 --- a/apps/wolnelektury_core/templates/superbase.html +++ b/apps/wolnelektury_core/templates/superbase.html @@ -3,6 +3,7 @@ {% load cache compressed i18n %} {% load static from staticfiles %} {% load catalogue_tags funding_tags reporting_stats sponsor_tags %} + {% load chunks %} @@ -124,24 +125,9 @@ diff --git a/wolnelektury/translation.py b/wolnelektury/translation.py index c72f654af..95b9dd74f 100644 --- a/wolnelektury/translation.py +++ b/wolnelektury/translation.py @@ -6,6 +6,7 @@ from modeltranslation.translator import translator, TranslationOptions from catalogue.models import Collection, Tag from infopages.models import InfoPage +from chunks.models import Chunk class InfoPageTranslationOptions(TranslationOptions): fields = ('title', 'left_column', 'right_column') @@ -16,7 +17,10 @@ class TagTranslationOptions(TranslationOptions): class CollectionTranslationOptions(TranslationOptions): fields = ('title', 'description') +class ChunkTranslationOptions(TranslationOptions): + fields = ('content',) + translator.register(InfoPage, InfoPageTranslationOptions) translator.register(Tag, TagTranslationOptions) translator.register(Collection, CollectionTranslationOptions) - +translator.register(Chunk, ChunkTranslationOptions) -- 2.20.1 From 69a96efdb07b874a503845692a4cdb9355458beb Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Wed, 5 Feb 2014 12:12:03 +0100 Subject: [PATCH 13/16] Fixes #3073: typo in meta:description. --- apps/wolnelektury_core/templates/superbase.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/wolnelektury_core/templates/superbase.html b/apps/wolnelektury_core/templates/superbase.html index 57dbb1ada..70eaca894 100644 --- a/apps/wolnelektury_core/templates/superbase.html +++ b/apps/wolnelektury_core/templates/superbase.html @@ -13,7 +13,7 @@ + content="{% block metadescription %}Darmowe, opracowane, pełne teksty lektur, e-booki, audiobooki i pliki DAISY na wolnej licencji.{% endblock %}" /> {% block ogextra %}{% endblock %} -- 2.20.1 From 6b07ba8b91eac4b6e4853fd3a01923c3f04f6016 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Thu, 6 Feb 2014 16:53:50 +0100 Subject: [PATCH 14/16] Fixes #3252: Gallery title. --- apps/picture/locale/pl/LC_MESSAGES/django.mo | Bin 2340 -> 2075 bytes apps/picture/locale/pl/LC_MESSAGES/django.po | 113 +++++++++---------- 2 files changed, 53 insertions(+), 60 deletions(-) diff --git a/apps/picture/locale/pl/LC_MESSAGES/django.mo b/apps/picture/locale/pl/LC_MESSAGES/django.mo index 7d785e7ecbbbfe532b6cc84f2a4faa918097b740..c95086f8fcd4c5a042fcfcd12703f7059ebf9078 100644 GIT binary patch delta 928 zcmZvaPiPZC6o)5flWe2aHr6&8|7@)YQero4tq?pYf+z$J(q7bptEo^U2GT&Vg$ATO zw5P&Q5cHr}@M16a>QNDt9_m39#FL;P^kVVg$?q4Y;K5MM|!34~~EbMjbqT^Y(8~+8Ef@9EwCD5_khj zU=?PFZyHQ|9E*@{tXn^X%J`|{bH`P8<5-|NEU+8DuaWtb0{Ef+=%leH8m&>&2-gBv@i3Q17S*lPHy3tq;?6?ZpC238l1a zACp~}N@M5ZlU}1*tJtmhWn1xv?5cO)4kVV_hx6fJJ{$=OBgIpLb|aBH_pfKDKP-e{ zx)e>-^P{!s-qhWwUab{_D^Yo(5}coo?o^`SOf4!``O-LftL0ehPiABGYO0bO$28V)#j-Wc{#o}zIlT=n}H~3 z7xAcwKHRj60uiF1HboI_#8reK^$%2=aud|=j8_Ue+;e~T+>i6lIrqMM)sK?J)nxfC zg><01(2HeC9fbEc(IMH0QU;uXm9PL4@EWXucVGj2pzUXxFX2|^U&9z&hUM@RtcR-* zKSlME!A>R&R%K%=lwdlc3Dd9%=Ai@-LUH^Ma#THmQMdrN!ROk3538`3AWf~%#o=ct z34ATF$cQv#LlTPPdMFvUK?!I-Ou|EYegMk;QEi`tG-YW{YEHu?s+oi0=LDVjAB1)A zJdDcsXBbEcFGHHTNyiy=7s`QoD49QnlJN_;1HOWi`A1j{S0PP(qm%VDJ)a;Osc;LF z#E#KPB~HVlI7lo2d_W$qJSy=e0qsFIWc$Vd zHlsD#mWm|!zG`Ez7nR2%WsyjCqZ`u7K*}$&ZylvF%auvi@;K!_MLJOVapb*hLFF1u zRI(+bu*qdQKe2zI6=4RdVw7p5hs>)#)G_Xhxy2GV#uCiJlB23D%gS5oy~-g zBZFH<)_1h$%&awOhd&|(!}Fa<$F(w{TYfu!psT01tEbOQ9qI2)g^7yB&|XDxr+am_)m;MkYUqthjGs$?xrS2UE>jd){@?HAOr7g(k} zF~_Ogloei$<_&Mmw+e3-XT#sowp!OR|Bt&l))yZQe2>M_=6slr6%Bt*qJDcNT#gO= E0W{Q^mjD0& diff --git a/apps/picture/locale/pl/LC_MESSAGES/django.po b/apps/picture/locale/pl/LC_MESSAGES/django.po index 9023d9601..ecaf08d25 100644 --- a/apps/picture/locale/pl/LC_MESSAGES/django.po +++ b/apps/picture/locale/pl/LC_MESSAGES/django.po @@ -7,9 +7,9 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-12-16 09:20+0100\n" -"PO-Revision-Date: 2013-12-16 09:28+0100\n" -"Last-Translator: Marcin Koziej \n" +"POT-Creation-Date: 2014-02-06 16:52+0100\n" +"PO-Revision-Date: 2014-02-06 16:53+0100\n" +"Last-Translator: Radek Czajka \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -26,59 +26,64 @@ msgstr "" msgid "Please supply an image." msgstr "" -#: models.py:37 +#: models.py:38 msgid "area" msgstr "obszar" -#: models.py:38 +#: models.py:39 msgid "kind" msgstr "typ" -#: models.py:40 +#: models.py:41 msgid "thing" msgstr "przedmiot" -#: models.py:41 +#: models.py:42 msgid "theme" msgstr "motyw" -#: models.py:66 +#: models.py:92 msgid "title" msgstr "tytuł" -#: models.py:67 +#: models.py:93 msgid "slug" msgstr "slug" -#: models.py:68 +#: models.py:94 msgid "sort key" msgstr "klucz sortowania" -#: models.py:69 models.py:70 +#: models.py:95 +#, fuzzy +msgid "sort key by author" +msgstr "klucz sortowania" + +#: models.py:96 models.py:97 msgid "creation date" msgstr "data stworzenia" -#: models.py:72 +#: models.py:99 msgid "image_file" msgstr "" -#: models.py:74 +#: models.py:101 msgid "picture areas JSON" msgstr "obszary w JSON" -#: models.py:75 +#: models.py:102 msgid "extra information" msgstr "dodatkowa informacja" -#: models.py:92 +#: models.py:121 msgid "picture" msgstr "obraz" -#: models.py:93 +#: models.py:122 msgid "pictures" msgstr "obrazy" -#: views.py:79 +#: views.py:82 #, python-format msgid "" "An error occurred: %(exception)s\n" @@ -86,84 +91,61 @@ msgid "" "%(tb)s" msgstr "" -#: views.py:80 +#: views.py:83 msgid "Picture imported successfully" msgstr "Obraz został zimportowany" -#: views.py:82 +#: views.py:85 #, python-format msgid "Error importing file: %r" msgstr "Błąd importu pliku: %r" -#: templates/admin/picture/picture/change_list.html:7 +#: templates/admin/picture/picture/change_list.html:8 msgid "Image" msgstr "Obraz" -#: templates/admin/picture/picture/change_list.html:8 +#: templates/admin/picture/picture/change_list.html:9 msgid "Import picture" msgstr "Importuj obraz" #: templates/picture/picture_list_thumb.html:10 #: templates/picture/picture_list_thumb.html:14 -msgid "Listing of all pictures" -msgstr "Lista wszystkich obrazów" +msgid "Listing of all works" +msgstr "Lista wszystkich dzieł" -#: templates/picture/picture_short.html:31 +#: templates/picture/picture_short.html:40 msgid "Epoch" msgstr "Rodzaj" -#: templates/picture/picture_short.html:38 +#: templates/picture/picture_short.html:48 msgid "Kind" msgstr "Typ" -#: templates/picture/picture_short.html:45 +#: templates/picture/picture_short.html:56 msgid "Genre" msgstr "Gatunek" -#: templates/picture/picture_short.html:57 +#: templates/picture/picture_short.html:68 msgid "View online" msgstr "Zobacz online" -#: templates/picture/picture_short.html:60 +#: templates/picture/picture_short.html:71 msgid "download original" msgstr "pobierz oryginał" -#: templates/picture/picture_short.html:63 -#: templates/picture/picture_viewer.html:30 -msgid "Download" -msgstr "Pobierz" - -#: templates/picture/picture_short.html:66 -msgid "original" -msgstr "oryginał" - -#: templates/picture/picture_viewer.html:11 -msgid "Wolne Lektury" -msgstr "" - -#: templates/picture/picture_viewer.html:23 -#: templates/picture/picture_viewer.html:50 -msgid "Themes" -msgstr "Motywy" - -#: templates/picture/picture_viewer.html:24 -#: templates/picture/picture_viewer.html:49 +#: templates/picture/picture_viewer.html:36 #: templates/picture/picture_wide.html:31 msgid "Objects" msgstr "Obiekty" -#: templates/picture/picture_viewer.html:26 -msgid "Edit. note" -msgstr "Nota edytorska" +#: templates/picture/picture_viewer.html:37 +msgid "Themes" +msgstr "Motywy" -#: templates/picture/picture_viewer.html:27 +#: templates/picture/picture_viewer.html:41 msgid "Infobox" msgstr "Informacja" -#: templates/picture/picture_viewer.html:28 -msgid "Picture's page" -msgstr "Strona obrazu" - #: templates/picture/picture_wide.html:20 msgid "Motifs, themes and objects" msgstr "Motywy i obiekty" @@ -197,9 +179,20 @@ msgid "Editor's Platform" msgstr "platformie edytorskiej" #: templates/picture/picture_wide.html:59 -msgid "Picture description on Lektury.Gazeta.pl" -msgstr "Opis na Lektury.Gazeta.pl" - -#: templates/picture/picture_wide.html:62 msgid "Picture description on Wikipedia" msgstr "Opis w Wikipedii" + +#~ msgid "Download" +#~ msgstr "Pobierz" + +#~ msgid "original" +#~ msgstr "oryginał" + +#~ msgid "Edit. note" +#~ msgstr "Nota edytorska" + +#~ msgid "Picture's page" +#~ msgstr "Strona obrazu" + +#~ msgid "Picture description on Lektury.Gazeta.pl" +#~ msgstr "Opis na Lektury.Gazeta.pl" -- 2.20.1 From 3f994c08bb03ed001bf74a7fd3e99aebb2303585 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Fri, 7 Feb 2014 16:38:50 +0100 Subject: [PATCH 15/16] Fixes #3252: Gallery title (and Librarian bump). --- apps/picture/locale/pl/LC_MESSAGES/django.mo | Bin 2075 -> 2082 bytes apps/picture/locale/pl/LC_MESSAGES/django.po | 8 +++++--- .../templates/picture/picture_list_thumb.html | 4 ++-- lib/librarian | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/apps/picture/locale/pl/LC_MESSAGES/django.mo b/apps/picture/locale/pl/LC_MESSAGES/django.mo index c95086f8fcd4c5a042fcfcd12703f7059ebf9078..627bedaa34635a3d7721323a5b122cbb5441ab45 100644 GIT binary patch delta 734 zcmXZay-OoO7{~F^B*xQIH(vC7XQO|CD2ifZp_QFzAzY!xmnC8(8wjyku@_&qu&_CT zja;E1;=#3d+8lxw!c`(@CvwekAQpaqah93+?DOpI>@%}_;FO%5bdWH{%tef8!#u`u z8(rMTPW+BFc#AZ1&rpSr*nm$qe#KhiNYogbX<(?sB%!eB(TcdJ@a1 z0t(oO0aoK4(#(O4zhaE|$a-u&!|MuTeqb}#x2RHu9x}AxH`M$;QP2Ob3f^CQLqaRO zM;2k8kY@feIQSp+U^Rnc2eo4adpjWN%n#$+(W zTiC=TuA{|Gyn{!W!ZW0pbD9KRU>`3{NWc(?Fd#F#b?^878)DZo{lJbp&4zk`~;n`m5Ze87NC z_7ioo6U^anq;zJb1+%q4o<@C(%2)vvXc6`PW9-IR)XC@kc-{A3`+l>*jZ)V_rRF2* zlYBu1vWHsm5Eb!vRHlCT@n6Vc%^y@i|4{G6h(-aVQ1i1$Vmeos_bwK+xiSS\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" @@ -110,8 +111,9 @@ msgstr "Importuj obraz" #: templates/picture/picture_list_thumb.html:10 #: templates/picture/picture_list_thumb.html:14 +msgctxt "gallery" msgid "Listing of all works" -msgstr "Lista wszystkich dzieł" +msgstr "Spis wszystkich dzieł" #: templates/picture/picture_short.html:40 msgid "Epoch" diff --git a/apps/picture/templates/picture/picture_list_thumb.html b/apps/picture/templates/picture/picture_list_thumb.html index 9684f846c..71cd7026a 100644 --- a/apps/picture/templates/picture/picture_list_thumb.html +++ b/apps/picture/templates/picture/picture_list_thumb.html @@ -7,11 +7,11 @@ {% block bodyid %}picture-list{% endblock %} -{% block titleextra %}{% trans "Listing of all works" %}{% endblock %} +{% block titleextra %}{% trans "Listing of all works" context "gallery" %}{% endblock %} {% block body %} -

    {% block book_list_header %}{% trans "Listing of all works" %}{% endblock %}

    +

    {% block book_list_header %}{% trans "Listing of all works" context "gallery" %}{% endblock %}

    {% block book_list_info %} diff --git a/lib/librarian b/lib/librarian index 118a8cf10..3df78775b 160000 --- a/lib/librarian +++ b/lib/librarian @@ -1 +1 @@ -Subproject commit 118a8cf1045eee8369f21236e1400189f3ec2647 +Subproject commit 3df78775bc9e2e4d861bc0eaa4deadd354dda518 -- 2.20.1 From 1072faa66d0066f2de790fb90c26c9dccf02c0b0 Mon Sep 17 00:00:00 2001 From: Marcin Koziej Date: Mon, 10 Feb 2014 15:52:12 +0100 Subject: [PATCH 16/16] fix bug with related tags and object display when tag spanned both books and pictures --- apps/catalogue/utils.py | 5 ++++- apps/catalogue/views.py | 28 ++++++++++------------------ 2 files changed, 14 insertions(+), 19 deletions(-) diff --git a/apps/catalogue/utils.py b/apps/catalogue/utils.py index fd74c9498..884c250d3 100644 --- a/apps/catalogue/utils.py +++ b/apps/catalogue/utils.py @@ -215,22 +215,25 @@ class SortedMultiQuerySet(MultiQuerySet): while len(items) < total_len: candidate = None + candidate_i = None for i in i_s: def get_next(): return self.querysets[i][sort_heads[i]] try: if candidate is None: candidate = get_next() + candidate_i = i else: competitor = get_next() if self.sortfn(candidate, competitor) > 0: candidate = competitor + candidate_i = i except IndexError: continue # continue next sort_head - sort_heads[i] += 1 # we have no more elements: if candidate is None: break + sort_heads[candidate_i] += 1 if skipped < offset: skipped += 1 continue # continue next item diff --git a/apps/catalogue/views.py b/apps/catalogue/views.py index 232b3a749..65b9c6c51 100644 --- a/apps/catalogue/views.py +++ b/apps/catalogue/views.py @@ -239,44 +239,36 @@ def tagged_object_list(request, tags=''): pictures = Picture.tagged.with_all(tags).order_by('sort_key_author') + related_counts = {} if books.count() > 0: # get related tags from `tag_counter` and `theme_counter` - related_counts = {} tags_pks = [tag.pk for tag in tags] for book in books: for tag_pk, value in itertools.chain(book.tag_counter.iteritems(), book.theme_counter.iteritems()): if tag_pk in tags_pks: continue related_counts[tag_pk] = related_counts.get(tag_pk, 0) + value - related_tags = models.Tag.objects.filter(pk__in=related_counts.keys()) - related_tags = [tag for tag in related_tags if tag not in tags] - for tag in related_tags: - tag.count = related_counts[tag.pk] - - categories = split_tags(related_tags) - del related_tags if pictures.count() > 0: - related_counts = {} tags_pks = [tag.pk for tag in tags] for picture in pictures: for tag_pk, value in itertools.chain(picture.tag_counter.iteritems(), picture.theme_counter.iteritems()): if tag_pk in tags_pks: continue - logging.info("counting tag not in tags_pks: %d", tag_pk) related_counts[tag_pk] = related_counts.get(tag_pk, 0) + value - related_tags = models.Tag.objects.filter(pk__in=related_counts.keys()) - related_tags = [tag for tag in related_tags if tag not in tags] - for tag in related_tags: - tag.count = related_counts[tag.pk] - categories = split_tags(related_tags) - del related_tags + related_tags = models.Tag.objects.filter(pk__in=related_counts.keys()) + related_tags = [tag for tag in related_tags if tag not in tags] - logging.info("Returning %d picutres and %d books" % (pictures.count(), books.count())) - objects = SortedMultiQuerySet(pictures, books, order_by='sort_key_author') + for tag in related_tags: + tag.count = related_counts[tag.pk] + + categories = split_tags(related_tags) + del related_tags + objects = SortedMultiQuerySet(pictures, books, order_by='sort_key_author') + if not objects: only_author = len(tags) == 1 and tags[0].category == 'author' -- 2.20.1