fnp
/
wolnelektury.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ab87154
)
footnotes dictionary fixes
author
Radek Czajka
<radoslaw.czajka@nowoczesnapolska.org.pl>
Fri, 16 Sep 2011 14:11:00 +0000
(16:11 +0200)
committer
Radek Czajka
<radoslaw.czajka@nowoczesnapolska.org.pl>
Fri, 16 Sep 2011 14:11:00 +0000
(16:11 +0200)
apps/dictionary/locale/pl/LC_MESSAGES/django.mo
patch
|
blob
|
history
apps/dictionary/locale/pl/LC_MESSAGES/django.po
patch
|
blob
|
history
apps/dictionary/models.py
patch
|
blob
|
history
apps/dictionary/templates/dictionary/note_list.html
patch
|
blob
|
history
apps/dictionary/urls.py
patch
|
blob
|
history
apps/dictionary/views.py
patch
|
blob
|
history
wolnelektury/static/css/master.css
patch
|
blob
|
history
diff --git
a/apps/dictionary/locale/pl/LC_MESSAGES/django.mo
b/apps/dictionary/locale/pl/LC_MESSAGES/django.mo
index
1104f8b
..
9e999eb
100644
(file)
Binary files a/apps/dictionary/locale/pl/LC_MESSAGES/django.mo and b/apps/dictionary/locale/pl/LC_MESSAGES/django.mo differ
diff --git
a/apps/dictionary/locale/pl/LC_MESSAGES/django.po
b/apps/dictionary/locale/pl/LC_MESSAGES/django.po
index
8184c9a
..
4600948
100644
(file)
--- a/
apps/dictionary/locale/pl/LC_MESSAGES/django.po
+++ b/
apps/dictionary/locale/pl/LC_MESSAGES/django.po
@@
-5,24
+5,40
@@
#
msgid ""
msgstr ""
#
msgid ""
msgstr ""
-"Project-Id-Version:
PACKAGE VERSION
\n"
+"Project-Id-Version:
WolneLektury-dictionary
\n"
"Report-Msgid-Bugs-To: \n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-09-16 1
2:21
+0200\n"
-"PO-Revision-Date: 2011-09-16 1
2:21
+0100\n"
+"POT-Creation-Date: 2011-09-16 1
6:08
+0200\n"
+"PO-Revision-Date: 2011-09-16 1
6:10
+0100\n"
"Last-Translator: Radek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Last-Translator: Radek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
-"Language: \n"
+"Language:
pl
\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"
"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"
-#: templates/dictionary/note_list.html:11
+#: templates/dictionary/note_list.html:8
+msgid "Footnotes on WolneLektury.pl"
+msgstr "Przypisy w WolneLektury.pl"
+
+#: templates/dictionary/note_list.html:12
+msgid "Footnotes"
+msgstr "Przypisy"
+
+#: templates/dictionary/note_list.html:17
msgid "By first letter"
msgstr "Pierwsza litera"
msgid "By first letter"
msgstr "Pierwsza litera"
-#: templates/dictionary/note_list.html:1
3
-#: templates/dictionary/note_list.html:
15
+#: templates/dictionary/note_list.html:1
9
+#: templates/dictionary/note_list.html:
21
msgid "all"
msgstr "wszystkie"
msgid "all"
msgstr "wszystkie"
+#: templates/dictionary/note_list.html:36
+#, python-format
+msgid "%(c)s footnote found"
+msgid_plural "%(c)s footnotes found"
+msgstr[0] "Znaleziono %(c)s przypis."
+msgstr[1] "Znaleziono %(c)s przypisy."
+msgstr[2] "Znaleziono %(c)s przypisów."
+
diff --git
a/apps/dictionary/models.py
b/apps/dictionary/models.py
index
f2a9ddf
..
b22e4be
100644
(file)
--- a/
apps/dictionary/models.py
+++ b/
apps/dictionary/models.py
@@
-25,7
+25,8
@@
def notes_from_book(sender, **kwargs):
if sender.html_file:
for anchor, text_str, html_str in html.extract_annotations(sender.html_file.path):
Note.objects.create(book=sender, anchor=anchor,
if sender.html_file:
for anchor, text_str, html_str in html.extract_annotations(sender.html_file.path):
Note.objects.create(book=sender, anchor=anchor,
- html=html_str, sort_key=sortify(text_str)[:128])
+ html=html_str,
+ sort_key=sortify(text_str).strip()[:128])
# always re-extract notes after making a HTML in a Book
Book.html_built.connect(notes_from_book)
# always re-extract notes after making a HTML in a Book
Book.html_built.connect(notes_from_book)
diff --git
a/apps/dictionary/templates/dictionary/note_list.html
b/apps/dictionary/templates/dictionary/note_list.html
index
6ae3664
..
e0b10f3
100755
(executable)
--- a/
apps/dictionary/templates/dictionary/note_list.html
+++ b/
apps/dictionary/templates/dictionary/note_list.html
@@
-2,8
+2,14
@@
{% load i18n pagination_tags %}
{% load catalogue_tags %}
{% load i18n pagination_tags %}
{% load catalogue_tags %}
+
+{% block bodyid %}footnotes{% endblock %}
+
+{% block title %}{% trans "Footnotes on WolneLektury.pl" %}{% endblock %}
+
+
{% block body %}
{% block body %}
- <h1>
Przypisy
</h1>
+ <h1>
{% trans "Footnotes" %}
</h1>
{% search_form %}
{% search_form %}
@@
-26,6
+32,10
@@
</p>
<hr/>
</p>
<hr/>
+<p>
+{% blocktrans count object_list.count as c %}{{c}} footnote found{% plural %}{{c}} footnotes found{% endblocktrans %}
+</p>
+
{% if object_list %}
{% autopaginate object_list 100 %}
{% if object_list %}
{% autopaginate object_list 100 %}
diff --git
a/apps/dictionary/urls.py
b/apps/dictionary/urls.py
index
84a30d7
..
435e0bd
100755
(executable)
--- a/
apps/dictionary/urls.py
+++ b/
apps/dictionary/urls.py
@@
-7,6
+7,6
@@
from django.conf.urls.defaults import *
urlpatterns = patterns('dictionary.views',
url(r'^$', 'letter_notes', name='dictionary_notes'),
urlpatterns = patterns('dictionary.views',
url(r'^$', 'letter_notes', name='dictionary_notes'),
- url(r'(?P<letter>[a-z])/$', 'letter_notes', name='dictionary_notes'),
+ url(r'(?P<letter>[a-z]
|0-9
)/$', 'letter_notes', name='dictionary_notes'),
)
)
diff --git
a/apps/dictionary/views.py
b/apps/dictionary/views.py
index
9f00224
..
e120063
100755
(executable)
--- a/
apps/dictionary/views.py
+++ b/
apps/dictionary/views.py
@@
-8,9
+8,11
@@
from dictionary.models import Note
def letter_notes(request, letter=None):
form = SearchForm()
def letter_notes(request, letter=None):
form = SearchForm()
- letters = [chr(a) for a in range(ord('a'), ord('z')+1)]
+ letters = [
"0-9"] + [
chr(a) for a in range(ord('a'), ord('z')+1)]
objects = Note.objects.all()
objects = Note.objects.all()
- if letter:
+ if letter == "0-9":
+ objects = objects.filter(sort_key__regex=r"^[0-9]")
+ elif letter:
objects = objects.filter(sort_key__startswith=letter)
return object_list(request, queryset=objects, extra_context=locals())
objects = objects.filter(sort_key__startswith=letter)
return object_list(request, queryset=objects, extra_context=locals())
diff --git
a/wolnelektury/static/css/master.css
b/wolnelektury/static/css/master.css
index
89040a5
..
4100e2b
100644
(file)
--- a/
wolnelektury/static/css/master.css
+++ b/
wolnelektury/static/css/master.css
@@
-1180,3
+1180,7
@@
div.shown-tags p, div.all-tags p {
.dictionary-note-source {
margin-top: -1em;
}
.dictionary-note-source {
margin-top: -1em;
}
+
+#footnotes .pagination {
+ margin-top: 1em;
+}