fnp
/
librarian.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
e870e40
)
Fixes in the experimental converters.
author
Radek Czajka
<rczajka@rczajka.pl>
Fri, 11 Dec 2020 12:39:19 +0000
(13:39 +0100)
committer
Radek Czajka
<rczajka@rczajka.pl>
Fri, 11 Dec 2020 12:39:19 +0000
(13:39 +0100)
Makefile
patch
|
blob
|
history
src/librarian/elements/figures/ilustr.py
patch
|
blob
|
history
src/librarian/elements/figures/tabela.py
patch
|
blob
|
history
src/librarian/elements/footnotes/__init__.py
patch
|
blob
|
history
src/librarian/elements/themes/end.py
patch
|
blob
|
history
src/librarian/elements/themes/motyw.py
patch
|
blob
|
history
src/librarian/locale/pl/LC_MESSAGES/messages.po
patch
|
blob
|
history
diff --git
a/Makefile
b/Makefile
index
e206641
..
38a3c9f
100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-1,5
+1,5
@@
locale:
find src/librarian -name '*.py' |xargs xgettext --from-code utf-8 -o - | sed '/^"POT-Creation-Date:/d' > messages.pot
locale:
find src/librarian -name '*.py' |xargs xgettext --from-code utf-8 -o - | sed '/^"POT-Creation-Date:/d' > messages.pot
- for lang in pl
; do msgmerge -U src/librarian/locale/$${lang}/LC_MESSAGES/messages.po messages.pot
; done
+ for lang in pl
lt; do mkdir -p src/librarian/locale/$${lang}/LC_MESSAGES/; [ -e src/librarian/locale/$${lang}/LC_MESSAGES/messages.po ] && msgmerge -U src/librarian/locale/$${lang}/LC_MESSAGES/messages.po messages.pot || cp messages.pot src/librarian/locale/$${lang}/LC_MESSAGES/messages.po
; done
rm messages.pot
rm messages.pot
diff --git
a/src/librarian/elements/figures/ilustr.py
b/src/librarian/elements/figures/ilustr.py
index
143132e
..
ee82b08
100644
(file)
--- a/
src/librarian/elements/figures/ilustr.py
+++ b/
src/librarian/elements/figures/ilustr.py
@@
-7,6
+7,6
@@
class Ilustr(WLElement):
def get_html_attr(self, builder):
return {
'src': builder.image_location + self.attrib['src'],
def get_html_attr(self, builder):
return {
'src': builder.image_location + self.attrib['src'],
- 'alt': self.attr['alt'],
- 'title': self.attr['alt'],
+ 'alt': self.attr
ib
['alt'],
+ 'title': self.attr
ib
['alt'],
}
}
diff --git
a/src/librarian/elements/figures/tabela.py
b/src/librarian/elements/figures/tabela.py
index
387041d
..
af4a436
100644
(file)
--- a/
src/librarian/elements/figures/tabela.py
+++ b/
src/librarian/elements/figures/tabela.py
@@
-5,7
+5,7
@@
class Tabela(WLElement):
HTML_TAG = 'table'
def get_html_attr(self, builder):
HTML_TAG = 'table'
def get_html_attr(self, builder):
- if self.attrib
['ramka']
== '1':
+ if self.attrib
.get('ramka', '')
== '1':
return {
'class': 'border'
}
return {
'class': 'border'
}
diff --git
a/src/librarian/elements/footnotes/__init__.py
b/src/librarian/elements/footnotes/__init__.py
index
6e00385
..
d0a0bf1
100644
(file)
--- a/
src/librarian/elements/footnotes/__init__.py
+++ b/
src/librarian/elements/footnotes/__init__.py
@@
-14,10
+14,19
@@
class Footnote(WLElement):
footnote_id = 'footnote-idm{}'.format(self.attrib['_compat_ordered_id'])
anchor_id = 'anchor-idm{}'.format(self.attrib['_compat_ordered_id'])
footnote_id = 'footnote-idm{}'.format(self.attrib['_compat_ordered_id'])
anchor_id = 'anchor-idm{}'.format(self.attrib['_compat_ordered_id'])
- builder.start_element('a', {"href": '#{}'.format(footnote_id), "class": "annotation"})
+ # Add anchor.
+ builder.start_element(
+ 'a',
+ {
+ "href": '#{}'.format(footnote_id),
+ "class": "annotation-anchor",
+ "id": anchor_id,
+ }
+ )
builder.push_text('[{}]'.format(fn_no))
builder.end_element()
builder.push_text('[{}]'.format(fn_no))
builder.end_element()
+ # Add actual footnote.
builder.enter_fragment('footnotes')
builder.start_element('div', {'class': 'fn-{}'.format(self.tag)})
builder.push_text('\n') # Compat
builder.enter_fragment('footnotes')
builder.start_element('div', {'class': 'fn-{}'.format(self.tag)})
builder.push_text('\n') # Compat
diff --git
a/src/librarian/elements/themes/end.py
b/src/librarian/elements/themes/end.py
index
32c6f36
..
0604e3d
100644
(file)
--- a/
src/librarian/elements/themes/end.py
+++ b/
src/librarian/elements/themes/end.py
@@
-5,7
+5,7
@@
class End(WLElement):
HTML_TAG = 'span'
def get_html_attr(self, builder):
HTML_TAG = 'span'
def get_html_attr(self, builder):
- fid = self.attrib
['id']
[1:]
+ fid = self.attrib
.get('id', '')
[1:]
return {
"class": "theme-end",
"fid": fid
return {
"class": "theme-end",
"fid": fid
diff --git
a/src/librarian/elements/themes/motyw.py
b/src/librarian/elements/themes/motyw.py
index
3b68c8b
..
f9ab197
100644
(file)
--- a/
src/librarian/elements/themes/motyw.py
+++ b/
src/librarian/elements/themes/motyw.py
@@
-12,7
+12,7
@@
class Motyw(WLElement):
super(Motyw, self).html_build(builder)
def get_html_attr(self, builder):
super(Motyw, self).html_build(builder)
def get_html_attr(self, builder):
- fid = self.attrib
['id']
[1:]
+ fid = self.attrib
.get('id', '')
[1:]
return {
"class": "theme-begin",
"fid": fid,
return {
"class": "theme-begin",
"fid": fid,
diff --git
a/src/librarian/locale/pl/LC_MESSAGES/messages.po
b/src/librarian/locale/pl/LC_MESSAGES/messages.po
index
e06828f
..
c81c458
100644
(file)
--- a/
src/librarian/locale/pl/LC_MESSAGES/messages.po
+++ b/
src/librarian/locale/pl/LC_MESSAGES/messages.po
@@
-17,26
+17,26
@@
msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.3\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.3\n"
-#: src/librarian/builders/html.py:
77
+#: src/librarian/builders/html.py:
84
msgid "translated by"
msgstr "tłum."
msgid "translated by"
msgstr "tłum."
-#: src/librarian/builders/html.py:
9
4
+#: src/librarian/builders/html.py:
10
4
msgid "Footnotes"
msgstr "Przypisy"
msgid "Footnotes"
msgstr "Przypisy"
-#: src/librarian/elements/footnotes/__init__.py:
43
+#: src/librarian/elements/footnotes/__init__.py:
55
msgid "author's footnote"
msgstr "przypis autorski"
msgid "author's footnote"
msgstr "przypis autorski"
-#: src/librarian/elements/footnotes/__init__.py:
51
+#: src/librarian/elements/footnotes/__init__.py:
63
msgid "translator's footnote"
msgstr "przypis tłumacza"
msgid "translator's footnote"
msgstr "przypis tłumacza"
-#: src/librarian/elements/footnotes/__init__.py:
59
+#: src/librarian/elements/footnotes/__init__.py:
71
msgid "editor's footnote"
msgstr "przypis redakcyjny"
msgid "editor's footnote"
msgstr "przypis redakcyjny"
-#: src/librarian/elements/footnotes/__init__.py:
67
+#: src/librarian/elements/footnotes/__init__.py:
79
msgid "source editor's footnote"
msgstr "przypis edytorski"
msgid "source editor's footnote"
msgstr "przypis edytorski"