msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-10-26 12:56+0200\n"
-"PO-Revision-Date: 2011-10-26 12:57+0100\n"
+"POT-Creation-Date: 2012-07-11 15:51+0200\n"
+"PO-Revision-Date: 2012-07-11 15:52+0100\n"
"Last-Translator: Radek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
msgid "Cancel publishing"
msgstr "Anuluj publikację"
-#: templates/archive/file_managed.html:50
+#: templates/archive/file_managed.html:51
msgid "Publish"
msgstr "Opublikuj"
-#: templates/archive/file_managed.html:79
+#: templates/archive/file_managed.html:57
+msgid "Convert without publishing"
+msgstr "Konwertuj bez publikacji"
+
+#: templates/archive/file_managed.html:67
+msgid "MP3 file"
+msgstr "Plik MP3"
+
+#: templates/archive/file_managed.html:68
+msgid "Download MP3 file."
+msgstr "Pobierz plik MP3."
+
+#: templates/archive/file_managed.html:70
+#: templates/archive/file_managed.html:84
+msgid "Published:"
+msgstr "Opublikowano:"
+
+#: templates/archive/file_managed.html:73
+#: templates/archive/file_managed.html:87
+msgid "Not published yet."
+msgstr "Nie opublikowane."
+
+#: templates/archive/file_managed.html:76
+msgid "MP3 file hasn't been generated yet."
+msgstr "Plik MP3 nie został jeszcze wygenerowany."
+
+#: templates/archive/file_managed.html:81
+msgid "Ogg Vorbis file"
+msgstr "Plik Ogg Vorbis"
+
+#: templates/archive/file_managed.html:82
+msgid "Download Ogg Vorbis file."
+msgstr "Pobierz plik Ogg Vorbis."
+
+#: templates/archive/file_managed.html:90
+msgid "Ogg Vorbis file hasn't been generated yet."
+msgstr "Plik Ogg Vorbis nie został jeszcze wygenerowany."
+
+#: templates/archive/file_managed.html:101
msgid "Update tags"
msgstr "Uaktualnij tagi"
-#: templates/archive/file_managed.html:91
+#: templates/archive/file_managed.html:113
#: templates/archive/file_new.html:19
msgid "Commit"
msgstr "Zatwierdź"
-#: templates/archive/file_managed.html:102
+#: templates/archive/file_managed.html:124
msgid "Are you sure you want to move this audiobook to archive?"
msgstr "Czy na pewno chcesz przenieść ten plik to archiwum?"
-#: templates/archive/file_managed.html:104
+#: templates/archive/file_managed.html:126
msgid "Remove to archive"
msgstr "Usuń do archiwum"
except SystemExit, e:
raise cls.RemoteOperationError
- def run(self, aid):
+ def run(self, aid, publish=True):
aid = int(aid)
audiobook = Audiobook.objects.get(id=aid)
self.set_status(aid, status.ENCODING)
self.set_status(aid, status.TAGGING)
self.set_tags(audiobook, out_file.name)
self.set_status(aid, status.SENDING)
-
- self.put(audiobook, out_file.name)
-
self.save(audiobook, out_file.name)
- self.published(aid)
+
+ if publish:
+ self.put(audiobook, out_file.name)
+ self.published(aid)
+ else:
+ self.set_status(aid, None)
def on_failure(self, exc, task_id, args, kwargs, einfo):
aid = (args[0], kwargs.get('aid'))[0]
{% else %}
- <form method="post" action="{% url publish audiobook.id %}">
<table class='tags'>
{% tags_table audiobook.new_publish_tags 0 %}
+ <tr><th></th><td>
- {% csrf_token %}
- <tr><th></th><td><input type="submit" value="{% trans "Publish" %}" /></td></tr>
+ <form method="post" action="{% url publish audiobook.id %}">
+ {% csrf_token %}
+ <input type="submit" value="{% trans "Publish" %}" />
+ </form>
+
+ {% if not audiobook.mp3_published or not audiobook.ogg_published %}
+ <form method="post" action="{% url convert audiobook.id %}">
+ {% csrf_token %}
+ <input type="submit" value="{% trans "Convert without publishing" %}" />
+ </form>
+ {% endif %}
+
+ </td></tr>
</table>
- </form>
{% endif %}
<hr/>
-{% if audiobook.mp3_published %}
- <h2>Published MP3</h2>
- <a href="{{ audiobook.mp3_file.url }}">{{ audiobook.mp3_published }}</a>
- {% tags_table audiobook.mp3_published_tags.tags %}
-{% else %}<p>MP3 file hasn't been published yet.</p>
+{% if audiobook.mp3_file %}
+ <h2>{% trans "MP3 file" %}</h2>
+ <p><a href="{{ audiobook.mp3_file.url }}">{% trans "Download MP3 file." %}</a></p>
+ {% if audiobook.mp3_published %}
+ <p>{% trans "Published:" %} {{ audiobook.mp3_published }}</a></p>
+ {% tags_table audiobook.mp3_published_tags.tags %}
+ {% else %}
+ <p>{% trans "Not published yet." %}</p>
+ {% endif %}
+{% else %}
+ <p>{% trans "MP3 file hasn't been generated yet." %}</p>
{% endif %}
<hr/>
-{% if audiobook.ogg_published %}
- <h2>Published Ogg Vorbis</h2>
- <a href="{{ audiobook.ogg_file.url }}">{{ audiobook.ogg_published }}</a>
- {% tags_table audiobook.ogg_published_tags.tags %}
-{% else %}Ogg Vorbis file hasn't been published yet.
+{% if audiobook.ogg_file %}
+ <h2>{% trans "Ogg Vorbis file" %}</h2>
+ <p><a href="{{ audiobook.ogg_file.url }}">{% trans "Download Ogg Vorbis file." %}</a></p>
+ {% if audiobook.ogg_published %}
+ <p>{% trans "Published:" %} {{ audiobook.ogg_published }}</a></p>
+ {% tags_table audiobook.ogg_published_tags.tags %}
+ {% else %}
+ <p>{% trans "Not published yet." %}</p>
+ {% endif %}
+{% else %}
+ <p>{% trans "Ogg Vorbis file hasn't been generated yet." %}</p>
{% endif %}
url(r'^published/$', 'archive.views.list_published', name="list_published"),
url(r'^file/(\d+)/$', 'archive.views.file_managed', name="file"),
url(r'^publish/(\d+)/$', 'archive.views.publish', name="publish"),
+ url(r'^convert/(\d+)/$', 'archive.views.publish', {'publish': False}, name="convert"),
url(r'^cancel/(\d+)/$', 'archive.views.cancel_publishing', name="cancel_publishing"),
url(r'^remove_to_archive/(\d+)/$', 'archive.views.remove_to_archive', name="remove_to_archive"),
@require_POST
@permission_required('archive.change_audiobook')
-def publish(request, aid):
+def publish(request, aid, publish=True):
""" mark file for publishing """
audiobook = get_object_or_404(models.Audiobook, id=aid)
tags = {
audiobook.mp3_status = audiobook.ogg_status = status.WAITING
audiobook.save()
# isn't there a race here?
- audiobook.mp3_task = tasks.Mp3Task.delay(aid).task_id
- audiobook.ogg_task = tasks.OggTask.delay(aid).task_id
+ audiobook.mp3_task = tasks.Mp3Task.delay(aid, publish).task_id
+ audiobook.ogg_task = tasks.OggTask.delay(aid, publish).task_id
audiobook.save()
return redirect(file_managed, aid)
-django>=1.3
+django>=1.3,<1.4
django-jsonfield
South>=0.7
django-cas