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
def get_html_attr(self, builder):
return {
'src': builder.image_location + self.attrib['src'],
- 'alt': self.attr['alt'],
- 'title': self.attr['alt'],
+ 'alt': self.attrib['alt'],
+ 'title': self.attrib['alt'],
}
HTML_TAG = 'table'
def get_html_attr(self, builder):
- if self.attrib['ramka'] == '1':
+ if self.attrib.get('ramka', '') == '1':
return {
'class': 'border'
}
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()
+ # Add actual footnote.
builder.enter_fragment('footnotes')
builder.start_element('div', {'class': 'fn-{}'.format(self.tag)})
builder.push_text('\n') # Compat
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
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,
"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."
-#: src/librarian/builders/html.py:94
+#: src/librarian/builders/html.py:104
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"
-#: src/librarian/elements/footnotes/__init__.py:51
+#: src/librarian/elements/footnotes/__init__.py:63
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"
-#: src/librarian/elements/footnotes/__init__.py:67
+#: src/librarian/elements/footnotes/__init__.py:79
msgid "source editor's footnote"
msgstr "przypis edytorski"