From: Radek Czajka Date: Thu, 19 Dec 2013 11:47:39 +0000 (+0100) Subject: Merge branch 'obrazy' into rwd X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/ab8ffbde2df33d9c699e029ba613d2b014ba44b8?hp=85800bcf632ba3e027667835b08f8e0dc5ab6177 Merge branch 'obrazy' into rwd Conflicts: apps/catalogue/locale/pl/LC_MESSAGES/django.mo apps/catalogue/locale/pl/LC_MESSAGES/django.po apps/wolnelektury_core/static/css/base.css apps/wolnelektury_core/static/css/book_box.css apps/wolnelektury_core/static/css/cite.css apps/wolnelektury_core/static/css/header.css apps/wolnelektury_core/static/css/master.book.css apps/wolnelektury_core/static/css/picture_box.css apps/wolnelektury_core/static/css/screen.css wolnelektury/settings/static.py --- diff --git a/.gitignore b/.gitignore index 6714e2301..cceada847 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,9 @@ dev.sqlite # Compress output /static +# SCSS output +apps/wolnelektury_core/static/scss/*.css + # Python garbage *.pyc .coverage diff --git a/apps/catalogue/locale/pl/LC_MESSAGES/django.mo b/apps/catalogue/locale/pl/LC_MESSAGES/django.mo index a8142bbce..d3585a52a 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 76b1aa73c..45c6f0cd4 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: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-12-16 09:19+0100\n" -"PO-Revision-Date: 2013-12-16 15:51+0100\n" -"Last-Translator: Marcin Koziej \n" +"POT-Creation-Date: 2013-12-19 12:45+0100\n" +"PO-Revision-Date: 2013-12-19 12:46+0100\n" +"Last-Translator: Radek Czajka \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -74,7 +74,7 @@ msgstr "Duży" msgid "Queue is full. Please try again later." msgstr "Kolejka jest pełna. Proszę spróbować ponownie później." -#: views.py:585 +#: views.py:597 #, python-format msgid "" "An error occurred: %(exception)s\n" @@ -85,21 +85,21 @@ msgstr "" "\n" "%(tb)s" -#: views.py:586 +#: views.py:598 msgid "Book imported successfully" msgstr "Książka zaimportowana" -#: views.py:588 +#: views.py:600 #, python-format msgid "Error importing file: %r" msgstr "Błąd podczas importowania pliku: %r" -#: views.py:620 +#: views.py:632 msgid "Download custom PDF" msgstr "Stwórz własny PDF" -#: views.py:621 templates/catalogue/book_short.html:92 -#: templates/catalogue/book_text.html:27 templates/catalogue/book_wide.html:63 +#: views.py:633 templates/catalogue/book_short.html:103 +#: templates/catalogue/book_wide.html:63 msgid "Download" msgstr "Pobierz" @@ -111,56 +111,61 @@ msgstr "tytuł" msgid "sort key" msgstr "klucz sortowania" -#: models/book.py:30 models/book.py:32 models/collection.py:12 +#: models/book.py:30 +#, fuzzy +msgid "sort key by author" +msgstr "Znalezieni autorzy" + +#: models/book.py:31 models/book.py:33 models/collection.py:12 #: models/collection.py:15 models/tag.py:33 msgid "slug" msgstr "slug" -#: models/book.py:33 +#: models/book.py:34 msgid "language code" msgstr "Kod języka" -#: models/book.py:35 models/book.py:146 models/collection.py:13 +#: models/book.py:36 models/book.py:161 models/collection.py:13 #: models/tag.py:37 models/tag.py:94 msgid "description" msgstr "opis" -#: models/book.py:36 models/book.py:37 models/bookmedia.py:29 models/tag.py:46 +#: models/book.py:37 models/book.py:38 models/bookmedia.py:29 models/tag.py:46 #: models/tag.py:47 msgid "creation date" msgstr "data utworzenia" -#: models/book.py:38 +#: models/book.py:39 msgid "parent number" msgstr "numer rodzica" -#: models/book.py:39 models/bookmedia.py:30 +#: models/book.py:40 models/bookmedia.py:30 msgid "extra information" msgstr "dodatkowe informacje" -#: models/book.py:44 +#: models/book.py:45 msgid "cover" msgstr "okładka" -#: models/book.py:66 models/collection.py:18 models/tag.py:22 +#: models/book.py:67 models/collection.py:18 models/tag.py:22 msgid "book" msgstr "książka" -#: models/book.py:67 +#: models/book.py:68 msgid "books" msgstr "książki" -#: models/book.py:244 +#: models/book.py:259 #, python-format msgid "Book \"%s\" does not exist." msgstr "Utwór \"%s\" nie istnieje." -#: models/book.py:258 +#: models/book.py:273 #, python-format msgid "Book %s already exists" msgstr "Książka %s już istnieje" -#: models/book.py:599 models/bookmedia.py:23 +#: models/book.py:620 models/bookmedia.py:23 #, python-format msgid "%s file" msgstr "plik %s" @@ -280,7 +285,7 @@ msgstr "" "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:20 +#: templates/catalogue/book_detail.html:21 #: templates/catalogue/tagged_object_list.html:74 #: templates/catalogue/tagged_object_list.html:109 msgid "See also" @@ -343,88 +348,117 @@ msgstr "Spis wszystkich utworów" msgid "Table of Content" msgstr "Spis treści" -#: templates/catalogue/book_list.html:30 +#: templates/catalogue/book_list.html:31 msgid "↑ top ↑" msgstr "↑ góra ↑" -#: templates/catalogue/book_short.html:59 +#: templates/catalogue/book_short.html:61 #: templates/catalogue/picture_detail.html:54 msgid "Epoch" msgstr "Epoka" -#: templates/catalogue/book_short.html:66 +#: templates/catalogue/book_short.html:69 #: templates/catalogue/picture_detail.html:60 msgid "Kind" msgstr "Rodzaj" -#: templates/catalogue/book_short.html:73 +#: templates/catalogue/book_short.html:77 msgid "Genre" msgstr "Gatunek" -#: templates/catalogue/book_short.html:88 +#: templates/catalogue/book_short.html:86 +msgid "Language" +msgstr "Język" + +#: templates/catalogue/book_short.html:99 msgid "Read online" msgstr "Czytaj online" -#: templates/catalogue/book_short.html:95 -#: templates/catalogue/book_text.html:40 +#: templates/catalogue/book_short.html:106 msgid "to print" msgstr "do druku" -#: templates/catalogue/book_short.html:98 +#: templates/catalogue/book_short.html:109 msgid "for an e-book reader" msgstr "na czytnik e-booków" -#: templates/catalogue/book_short.html:101 -#: templates/catalogue/book_text.html:46 +#: templates/catalogue/book_short.html:112 msgid "for Kindle" msgstr "na Kindle" -#: templates/catalogue/book_short.html:104 -#: templates/catalogue/book_text.html:49 +#: templates/catalogue/book_short.html:115 msgid "FictionBook" msgstr "FictionBook" -#: templates/catalogue/book_short.html:107 -#: templates/catalogue/book_text.html:52 +#: templates/catalogue/book_short.html:118 msgid "for advanced usage" msgstr "do zadań specjalnych" -#: templates/catalogue/book_short.html:113 -#: templates/catalogue/book_text.html:30 +#: templates/catalogue/book_short.html:124 msgid "Listen" msgstr "Słuchaj" -#: templates/catalogue/book_text.html:9 templates/catalogue/player.html:11 +#: templates/catalogue/book_text.html:10 templates/catalogue/player.html:11 msgid "Wolne Lektury" msgstr "Wolne Lektury" -#: templates/catalogue/book_text.html:22 +#: templates/catalogue/book_text.html:34 +msgid "Other versions" +msgstr "Inne wersje" + +#: templates/catalogue/book_text.html:40 msgid "Table of contents" msgstr "Spis treści" -#: templates/catalogue/book_text.html:23 templatetags/catalogue_tags.py:420 +#: templates/catalogue/book_text.html:44 templatetags/catalogue_tags.py:424 msgid "Themes" msgstr "Motywy" -#: templates/catalogue/book_text.html:24 +#: templates/catalogue/book_text.html:48 +#: templates/catalogue/book_text.html:100 +msgid "Settings" +msgstr "Ustawienia" + +#: templates/catalogue/book_text.html:52 msgid "Edit. note" msgstr "Nota red." -#: templates/catalogue/book_text.html:25 +#: templates/catalogue/book_text.html:56 msgid "Infobox" msgstr "Informacje" -#: templates/catalogue/book_text.html:26 templates/catalogue/player.html:34 -msgid "Book's page" -msgstr "Strona utworu" +#: templates/catalogue/book_text.html:68 +#: templates/catalogue/book_text.html:114 +msgid "Close" +msgstr "Zamknij" -#: templates/catalogue/book_text.html:43 -msgid "for a reader" -msgstr "na czytnik" +#: templates/catalogue/book_text.html:69 +msgid "Please wait..." +msgstr "Proszę czekać…" -#: templates/catalogue/book_text.html:56 templates/catalogue/book_wide.html:67 -msgid "Download all audiobooks for this book" -msgstr "Pobierz wszystkie audiobooki tego utworu" +#: templates/catalogue/book_text.html:82 +msgid "Other versions of the book" +msgstr "Inne wersje utworu" + +#: templates/catalogue/book_text.html:83 +msgid "Close the other version" +msgstr "Zamknij drugą wersję" + +#: templates/catalogue/book_text.html:101 +msgid "Display line numbers" +msgstr "Wyświetlaj numerację" + +#: templates/catalogue/book_text.html:102 +msgid "Display themes" +msgstr "Wyświetlaj motywy" + +#: templates/catalogue/book_text.html:103 +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 @@ -467,7 +501,12 @@ msgstr "Opis lektury w Wikipedii" msgid "Mix this book" msgstr "Miksuj treść utworu" +#: templates/catalogue/book_wide.html:67 +msgid "Download all audiobooks for this book" +msgstr "Pobierz wszystkie audiobooki tego utworu" + #: templates/catalogue/catalogue.html:6 templates/catalogue/catalogue.html:11 +#: templates/catalogue/menu.html:5 msgid "Catalogue" msgstr "Katalog" @@ -478,28 +517,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:416 +#: templatetags/catalogue_tags.py:420 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:418 +#: templatetags/catalogue_tags.py:422 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:417 +#: templatetags/catalogue_tags.py:421 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:419 +#: templatetags/catalogue_tags.py:423 msgid "Epochs" msgstr "Epoki" @@ -507,7 +546,7 @@ msgstr "Epoki" msgid "Themes and topics" msgstr "Motywy i tematy" -#: templates/catalogue/catalogue.html:34 templates/catalogue/menu.html:16 +#: templates/catalogue/catalogue.html:34 templates/catalogue/menu.html:20 msgid "Collections" msgstr "Kolekcje" @@ -551,22 +590,30 @@ msgstr "Zwiń fragment" msgid "See full category" msgstr "Zobacz całą kategorię" -#: templates/catalogue/menu.html:9 templates/catalogue/menu.html.py:18 +#: templates/catalogue/menu.html:4 +msgid "Catalogue of the library" +msgstr "Katalog biblioteki" + +#: templates/catalogue/menu.html:13 templates/catalogue/menu.html.py:22 msgid "Please wait…" msgstr "Proszę czekać…" -#: templates/catalogue/menu.html:24 +#: templates/catalogue/menu.html:28 msgid "All books" msgstr "Wszystkie utwory" -#: templates/catalogue/menu.html:28 +#: templates/catalogue/menu.html:32 msgid "Audiobooks" msgstr "Audiobooki" -#: templates/catalogue/menu.html:32 +#: templates/catalogue/menu.html:36 msgid "DAISY" msgstr "DAISY" +#: templates/catalogue/menu.html:40 templates/catalogue/tag_list_split.html:14 +msgid "Gallery" +msgstr "Galeria" + #: templates/catalogue/picture_detail.html:29 msgid "Work is licensed under " msgstr "Utwór jest udostępniony na licencji" @@ -608,6 +655,10 @@ msgstr "Motywy w utworze" msgid "Listing of all pictures" msgstr "Spis wszystkich obrazów" +#: templates/catalogue/player.html:34 +msgid "Book's page" +msgstr "Strona utworu" + #: templates/catalogue/player.html:35 msgid "Download as" msgstr "Pobierz jako" @@ -699,7 +750,7 @@ msgid "Other results" msgstr "Inne wyniki" #: templates/catalogue/search_no_hits.html:19 -#: templates/catalogue/tagged_object_list.html:151 +#: templates/catalogue/tagged_object_list.html:153 msgid "Sorry! Search cirteria did not match any resources." msgstr "Przepraszamy! Brak wyników spełniających kryteria podane w zapytaniu." @@ -721,11 +772,8 @@ msgstr "Przepraszamy! Zapytanie musi zawierać co najmniej dwa znaki." msgid "Literature" msgstr "Literatura" -#: templates/catalogue/tag_list_split.html:14 -msgid "Gallery" -msgstr "Galeria" - #: templates/catalogue/tagged_object_list.html:78 +#: templates/catalogue/tagged_object_list.html:123 msgid "in Culture.pl" msgstr "w Culture.pl" @@ -748,6 +796,9 @@ msgstr "Stwórz własny plik PDF" msgid "Free license" msgstr "Wolna licencja" +#~ msgid "for a reader" +#~ msgstr "na czytnik" + #~ msgid "Put a book on the shelf!" #~ msgstr "Wrzuć lekturę na półkę!" diff --git a/apps/catalogue/models/book.py b/apps/catalogue/models/book.py index 9f7803dcd..3c50a964c 100644 --- a/apps/catalogue/models/book.py +++ b/apps/catalogue/models/book.py @@ -97,6 +97,12 @@ class Book(models.Model): def name(self): return self.title + def language_code(self): + return constants.LANGUAGES_3TO2.get(self.language, self.language) + + def language_name(self): + return dict(settings.LANGUAGES).get(self.language_code(), "") + def book_tag_slug(self): return ('l-' + self.slug)[:120] @@ -401,6 +407,10 @@ class Book(models.Model): for child in self.children.all(): child.parent_cover_changed() + def other_versions(self): + """Find other versions (i.e. in other languages) of the book.""" + return type(self).objects.filter(common_slug=self.common_slug).exclude(pk=self.pk) + def related_info(self): """Keeps info about related objects (tags, media) in cache field.""" if self._related_info is not None: diff --git a/apps/catalogue/templates/catalogue/book_detail.html b/apps/catalogue/templates/catalogue/book_detail.html index f266742c1..480c85a28 100644 --- a/apps/catalogue/templates/catalogue/book_detail.html +++ b/apps/catalogue/templates/catalogue/book_detail.html @@ -17,7 +17,9 @@ {% work_list book_children %} -

{% trans "See also" %}:

+
+

{% trans "See also" %}:

{% related_books book %} +
{% endblock %} diff --git a/apps/catalogue/templates/catalogue/book_list.html b/apps/catalogue/templates/catalogue/book_list.html index ddeb3ce3f..00088a58e 100644 --- a/apps/catalogue/templates/catalogue/book_list.html +++ b/apps/catalogue/templates/catalogue/book_list.html @@ -17,16 +17,16 @@ -
- {% trans "Table of Content" %} - {{ rendered_nav }} +
+

{% trans "Table of Content" %}

+
+ {{ rendered_nav }} +
-
+
{% block book_list %} {{ rendered_book_list }} {% endblock %}
- + {% trans "↑ top ↑" %} {% endblock %} diff --git a/apps/catalogue/templates/catalogue/book_mini_box.html b/apps/catalogue/templates/catalogue/book_mini_box.html index 9dd5cf061..b5c7d9735 100755 --- a/apps/catalogue/templates/catalogue/book_mini_box.html +++ b/apps/catalogue/templates/catalogue/book_mini_box.html @@ -1,6 +1,9 @@ {% load thumbnail %} diff --git a/apps/catalogue/templates/catalogue/book_short.html b/apps/catalogue/templates/catalogue/book_short.html index 96ceaa6c6..98f9bf880 100644 --- a/apps/catalogue/templates/catalogue/book_short.html +++ b/apps/catalogue/templates/catalogue/book_short.html @@ -2,23 +2,10 @@ {% load catalogue_tags social_tags %} {% load thumbnail %}
-
+
+
-
- {% if book.cover %} - {% if main_link %}{% endif %} - Cover - {% if main_link %}{% endif %} - {% endif %} - {% block cover-area-extra %}{% endblock %} -
@@ -40,7 +27,7 @@
-
+
{% for tag in related.tags.author %} {% related_tag_name tag %}{% if not forloop.last %}, {% endif %}{% endfor %}{% for title, slug in related.parents %}, @@ -53,29 +40,53 @@
+
+ {% if book.cover %} + {% if main_link %}{% endif %} + Cover + {% if main_link %}{% endif %} + {% endif %} + {% block cover-area-extra %}{% endblock %} +
{% spaceless %} + {% trans "Epoch" %}:  {% for tag in related.tags.epoch %} {% related_tag_name tag %} - {% if not forloop.last %}{% endif %} + {% if not forloop.last %}, {% endif %} {% endfor %} - + + {% trans "Kind" %}:  {% for tag in related.tags.kind %} {% related_tag_name tag %} - {% if not forloop.last %}{% endif %} + {% if not forloop.last %}, {% endif %} {% endfor %} - + + {% trans "Genre" %}:  {% for tag in related.tags.genre %} {% related_tag_name tag %} - {% if not forloop.last %}{% endif %} + {% if not forloop.last %}, {% endif %} {% endfor %} - + + + {% if show_lang %} + + {% trans "Language" %}:  + {{ book.language_name }} + + {% endif %} {% endspaceless %}
@@ -85,12 +96,12 @@ {% block book-box-extra-info %}{% endblock %} {% block box-append %} {% endblock %} +
{% block right-column %} {% endblock %}
diff --git a/apps/catalogue/templates/catalogue/book_text.html b/apps/catalogue/templates/catalogue/book_text.html index f6f2f993e..b18fba444 100644 --- a/apps/catalogue/templates/catalogue/book_text.html +++ b/apps/catalogue/templates/catalogue/book_text.html @@ -1,67 +1,131 @@ + {% load i18n %} {% load static from staticfiles %} {% load chunks compressed catalogue_tags %} - - +{% load thumbnail %} + - - {% trans "Wolne Lektury" %} :: {{ book.pretty_title }} + + + {{ book.pretty_title }} :: {% trans "Wolne Lektury" %} - {% compressed_css "book" %} - - {% compressed_js "book" %} - - + {% compressed_css "book_text" %} - -
- {% book_info book %} -
-
- -
- - {{ book.html_file.read|safe }} - {{ piwik_tag|safe }} + + + + {% compressed_js "book_text" %} + diff --git a/apps/catalogue/templates/catalogue/menu.html b/apps/catalogue/templates/catalogue/menu.html index 55a9e1851..b6bc172a0 100644 --- a/apps/catalogue/templates/catalogue/menu.html +++ b/apps/catalogue/templates/catalogue/menu.html @@ -1,10 +1,14 @@ {% load i18n static %} + + {% trans "Catalogue of the library" %} + {% trans "Catalogue" %} +