[Python-modules-commits] r23059 - in packages/sphinx/trunk/debian (3 files)
mitya57-guest at users.alioth.debian.org
mitya57-guest at users.alioth.debian.org
Sun Nov 25 14:11:08 UTC 2012
Date: Sunday, November 25, 2012 @ 14:11:06
Author: mitya57-guest
Revision: 23059
debian/patches/fix_l10n_footnotes.diff: Fix building HTML with footnotes
when using l10n (closes: #691719).
Added:
packages/sphinx/trunk/debian/patches/fix_l10n_footnotes.diff
Modified:
packages/sphinx/trunk/debian/changelog
packages/sphinx/trunk/debian/patches/series
Modified: packages/sphinx/trunk/debian/changelog
===================================================================
--- packages/sphinx/trunk/debian/changelog 2012-11-25 13:58:38 UTC (rev 23058)
+++ packages/sphinx/trunk/debian/changelog 2012-11-25 14:11:06 UTC (rev 23059)
@@ -1,8 +1,13 @@
sphinx (1.1.3+dfsg-6) UNRELEASED; urgency=low
+ [ Jakub Wilk ]
* DEP-8 tests: remove âFeatures: no-build-neededâ; it's the default now.
* Bump standards version to 3.9.4; no changes needed.
+ [ Dmitry Shachnev ]
+ * debian/patches/fix_l10n_footnotes.diff: Fix building HTML with footnotes
+ when using l10n (closes: #691719).
+
-- Jakub Wilk <jwilk at debian.org> Tue, 13 Nov 2012 22:36:10 +0100
sphinx (1.1.3+dfsg-5) experimental; urgency=low
Added: packages/sphinx/trunk/debian/patches/fix_l10n_footnotes.diff
===================================================================
--- packages/sphinx/trunk/debian/patches/fix_l10n_footnotes.diff (rev 0)
+++ packages/sphinx/trunk/debian/patches/fix_l10n_footnotes.diff 2012-11-25 14:11:06 UTC (rev 23059)
@@ -0,0 +1,44 @@
+Description: Fix l10n build of text containing footnotes
+ Based on initial patch by Cristophe Simonis and modifications by Takayuki Shimizukawa
+ (upstream pull request #86).
+Bug: https://bitbucket.org/birkenfeld/sphinx/issue/955/cant-build-html-with-footnotes-when-using
+Bug-Debian: http://bugs.debian.org/691719
+Author: Christophe Simonis <simonis.christophe at gmail.com>
+Last-Update: 2012-11-25
+
+=== modified file 'sphinx/environment.py'
+--- a/sphinx/environment.py 2012-03-12 12:18:37 +0000
++++ b/sphinx/environment.py 2012-11-23 14:18:39 +0000
+@@ -213,16 +213,30 @@
+ parser = RSTParser()
+
+ for node, msg in extract_messages(self.document):
+- patch = new_document(source, settings)
+ msgstr = catalog.gettext(msg)
+ # XXX add marker to untranslated parts
+ if not msgstr or msgstr == msg: # as-of-yet untranslated
+ continue
++
++ patch = new_document(source, settings)
+ parser.parse(msgstr, patch)
+ patch = patch[0]
+ # XXX doctest and other block markup
+ if not isinstance(patch, nodes.paragraph):
+ continue # skip for now
++
++ footnote_refs = [r for r in node.children
++ if isinstance(r, nodes.footnote_reference)
++ and r.get('auto') == 1]
++ for i, child in enumerate(patch.children): # update leaves
++ if isinstance(child, nodes.footnote_reference) \
++ and child.get('auto') == 1:
++ # use original 'footnote_reference' object.
++ # this object already registered in self.document.autofootnote_refs
++ patch.children[i] = footnote_refs.pop(0)
++ # Some duplicated footnote_reference in msgstr causes
++ # IndexError by .pop(0). That is invalid msgstr.
++
+ for child in patch.children: # update leaves
+ child.parent = node
+ node.children = patch.children
+
Modified: packages/sphinx/trunk/debian/patches/series
===================================================================
--- packages/sphinx/trunk/debian/patches/series 2012-11-25 13:58:38 UTC (rev 23058)
+++ packages/sphinx/trunk/debian/patches/series 2012-11-25 14:11:06 UTC (rev 23059)
@@ -11,3 +11,4 @@
test_build_html_rb.diff
sort_stopwords.diff
support_python_3.3.diff
+fix_l10n_footnotes.diff
More information about the Python-modules-commits
mailing list