msgstr ""
"Project-Id-Version: Platforma Redakcyjna\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2014-03-27 13:16+0100\n"
+"POT-Creation-Date: 2016-03-15 18:38+0100\n"
"PO-Revision-Date: 2014-03-27 13:17+0100\n"
"Last-Translator: Radek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>\n"
"Language-Team: Fundacja Nowoczesna Polska <fundacja@nowoczesnapolska.org."
msgid "Append to"
msgstr "Dołącz do"
-#: views.py:166
+#: views.py:168
#, python-format
msgid "Slug already used for %s"
msgstr "Slug taki sam jak dla pliku %s"
-#: views.py:168
+#: views.py:170
msgid "Slug already used in repository."
msgstr "Dokument o tym slugu już istnieje w repozytorium."
-#: views.py:174
+#: views.py:176
msgid "File should be UTF-8 encoded."
msgstr "Plik powinien mieć kodowanie UTF-8."
-#: views.py:576 models/book.py:56
+#: views.py:595 models/book.py:56
msgid "books"
msgstr "książki"
-#: views.py:578
+#: views.py:597
msgid "scan gallery"
msgstr "galeria skanów"
msgid "book"
msgstr "książka"
-#: models/book.py:255
+#: models/book.py:261
msgid "No chunks in the book."
msgstr "Książka nie ma części."
-#: models/book.py:259
+#: models/book.py:265
msgid "Not all chunks have publishable revisions."
msgstr "Niektóre części nie są gotowe do publikacji."
-#: models/book.py:266 models/image.py:82
+#: models/book.py:272 models/image.py:82
msgid "Invalid XML"
msgstr "Nieprawidłowy XML"
-#: models/book.py:268 models/image.py:84
+#: models/book.py:274 models/image.py:84
msgid "No Dublin Core found."
msgstr "Brak sekcji Dublin Core."
-#: models/book.py:270 models/image.py:86
+#: models/book.py:276 models/image.py:86
msgid "Invalid Dublin Core"
msgstr "Nieprawidłowy Dublin Core"
-#: models/book.py:273 models/image.py:90
+#: models/book.py:279 models/image.py:90
msgid "rdf:about is not"
msgstr "rdf:about jest różny od"
msgid "EPUB version"
msgstr "Wersja EPUB"
-#: templates/catalogue/book_detail.html:85
+#: templates/catalogue/book_detail.html:73
+msgid "MOBI version"
+msgstr "Wersja MOBI"
+
+#: templates/catalogue/book_detail.html:86
#: templates/catalogue/image_detail.html:57
msgid "Publish"
msgstr "Opublikuj"
-#: templates/catalogue/book_detail.html:89
+#: templates/catalogue/book_detail.html:90
#: templates/catalogue/image_detail.html:61
msgid "Log in to publish."
msgstr "Zaloguj się, aby opublikować."
-#: templates/catalogue/book_detail.html:92
+#: templates/catalogue/book_detail.html:93
#: templates/catalogue/image_detail.html:64
msgid "This book can't be published yet, because:"
msgstr "Ta książka nie może jeszcze zostać opublikowana. Powód:"
-#: templates/catalogue/book_detail.html:102
+#: templates/catalogue/book_detail.html:103
#: templates/catalogue/image_detail.html:72
msgid "Comments"
msgstr "Komentarze"
msgid "Edit book"
msgstr "Edytuj książkę"
-#: templates/catalogue/book_html.html:13 templates/catalogue/book_text.html:15
+#: templates/catalogue/book_html.html:12 templates/catalogue/book_text.html:15
msgid "Table of contents"
msgstr "Spis treści"
-#: templates/catalogue/book_html.html:14 templates/catalogue/book_text.html:17
+#: templates/catalogue/book_html.html:13 templates/catalogue/book_text.html:17
msgid "Edit. note"
msgstr "Nota red."
-#: templates/catalogue/book_html.html:15
+#: templates/catalogue/book_html.html:14
msgid "Infobox"
msgstr "Informacje"
msgid "Your last edited documents"
msgstr "Twoje ostatnie edycje"
-#: templates/catalogue/my_page.html:33 templates/catalogue/user_page.html:16
+#: templates/catalogue/my_page.html:39 templates/catalogue/user_page.html:16
msgid "Recent activity for"
msgstr "Ostatnia aktywność dla:"
#~ msgid "Revision marked"
#~ msgstr "Wersja oznaczona"
-#~ msgid "Old version"
-#~ msgstr "Stara wersja"
-
#~ msgid "New version"
#~ msgstr "Nowa wersja"
url(r'^book/(?P<slug>[^/]+)/txt$', 'book_txt', name="catalogue_book_txt"),
url(r'^book/(?P<slug>[^/]+)/html$', 'book_html', name="catalogue_book_html"),
url(r'^book/(?P<slug>[^/]+)/epub$', 'book_epub', name="catalogue_book_epub"),
+ url(r'^book/(?P<slug>[^/]+)/mobi$', 'book_mobi', name="catalogue_book_mobi"),
url(r'^book/(?P<slug>[^/]+)/pdf$', 'book_pdf', name="catalogue_book_pdf"),
url(r'^chunk_add/(?P<slug>[^/]+)/(?P<chunk>[^/]+)/$',
# TODO: move to celery
doc = book.wldocument()
# TODO: error handling
- epub = doc.as_epub().get_string()
+ epub = doc.as_epub(ilustr_path=book.gallery_path()).get_string()
response = HttpResponse(content_type='application/epub+zip')
response['Content-Disposition'] = 'attachment; filename=%s' % book.slug + '.epub'
response.write(epub)
return response
+@never_cache
+def book_mobi(request, slug):
+ book = get_object_or_404(Book, slug=slug)
+ if not book.accessible(request):
+ return HttpResponseForbidden("Not authorized.")
+
+ # TODO: move to celery
+ doc = book.wldocument()
+ # TODO: error handling
+ mobi = doc.as_mobi(ilustr_path=book.gallery_path()).get_string()
+ response = HttpResponse(content_type='application/x-mobipocket-ebook')
+ response['Content-Disposition'] = 'attachment; filename=%s' % book.slug + '.mobi'
+ response.write(mobi)
+ return response
+
+
@never_cache
def revision(request, slug, chunk=None):
try: