[Python-modules-commits] r21905 - in packages/sphinx/trunk/debian (3 files)

jwilk at users.alioth.debian.org jwilk at users.alioth.debian.org
Thu May 24 16:42:51 UTC 2012


    Date: Thursday, May 24, 2012 @ 16:42:46
  Author: jwilk
Revision: 21905

LaTeX writer: fix generation of \shorthandoff.

Added:
  packages/sphinx/trunk/debian/patches/fix_shorthandoff.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-05-24 15:12:57 UTC (rev 21904)
+++ packages/sphinx/trunk/debian/changelog	2012-05-24 16:42:46 UTC (rev 21905)
@@ -1,8 +1,11 @@
 sphinx (1.1.3+dfsg-4) UNRELEASED; urgency=low
 
   * Add DEP-8 tests.
+  * LaTeX writer: fix generation of \shorthandoff (closes: #672586,
+    LP: #997891). Thanks to Melissa Draper for the bug report and the initial
+    patch.
 
- -- Jakub Wilk <jwilk at debian.org>  Mon, 30 Apr 2012 13:38:15 +0200
+ -- Jakub Wilk <jwilk at debian.org>  Thu, 24 May 2012 18:23:16 +0200
 
 sphinx (1.1.3+dfsg-3) unstable; urgency=low
 

Added: packages/sphinx/trunk/debian/patches/fix_shorthandoff.diff
===================================================================
--- packages/sphinx/trunk/debian/patches/fix_shorthandoff.diff	                        (rev 0)
+++ packages/sphinx/trunk/debian/patches/fix_shorthandoff.diff	2012-05-24 16:42:46 UTC (rev 21905)
@@ -0,0 +1,24 @@
+Description: LaTeX writer: fix generation of \shorthandoff
+ With Docutils ≥ 0.8, Babel.language is a full language name (rather than
+ unparsed language code), which made ExtBabel.get_shorthandoff() always return
+ empty string. Use Babel.get_language() instead, which returns full language
+ name regardless of Docutils version.
+Author: Jakub Wilk <jwilk at debian.org>
+Bug-Debian: http://bugs.debian.org/672586
+Bug-Ubuntu: https://launchpad.net/bugs/997891
+Forwarded: yes
+Last-Update: 2012-05-24
+
+--- a/sphinx/writers/latex.py
++++ b/sphinx/writers/latex.py
+@@ -99,8 +99,8 @@
+ 
+ class ExtBabel(Babel):
+     def get_shorthandoff(self):
+-        shortlang = self.language.split('_')[0]
+-        if shortlang in ('de', 'sl', 'pt', 'es', 'nl', 'pl', 'it'):
++        if self.get_language() in ('ngerman', 'slovene', 'portuges', 'spanish',
++                         'dutch', 'polish', 'italian'):
+             return '\\shorthandoff{"}'
+         return ''
+ 

Modified: packages/sphinx/trunk/debian/patches/series
===================================================================
--- packages/sphinx/trunk/debian/patches/series	2012-05-24 15:12:57 UTC (rev 21904)
+++ packages/sphinx/trunk/debian/patches/series	2012-05-24 16:42:46 UTC (rev 21905)
@@ -7,3 +7,4 @@
 skiptest_latex.diff
 fix_nepali_po.diff
 pygments_byte_strings.diff
+fix_shorthandoff.diff




More information about the Python-modules-commits mailing list