Added language names to the shorthandoff helper

Docutils 0.8.1 reports full language names not codes
This commit is contained in:
Melissa Draper 2012-05-10 23:30:30 +12:00
parent a9032aec5e
commit 5da7c75842

View File

@ -100,7 +100,8 @@ class LaTeXWriter(writers.Writer):
class ExtBabel(Babel):
def get_shorthandoff(self):
shortlang = self.language.split('_')[0]
if shortlang in ('de', 'sl', 'pt', 'es', 'nl', 'pl', 'it'):
if shortlang in ('de', 'ngerman', 'sl', 'slovene', 'pt', 'portuges', 'es', 'spanish',
'nl', 'dutch', 'pl', 'polish', 'it', 'italian'):
return '\\shorthandoff{"}'
return ''