Problem with double dash not translated
Created by: vtexier
GNU Gettext ignore lines starting with double dash. It consider it as options for command line.
So we must use the correct typographic character "horizontal bar" directly in the rst source file.
(unicode U+2015)
https://www.cs.tut.fi/~jkorpela/dashes.html
― « Les droits de l'homme » 1791
So now the line appears in the po file and can be translated:
― ”The Rights of Man” 1791 Thomas Paine (1737 – 1809)
But, to avoid an error in the pdf creation, we need to add the character in the latex preamble, in the file conf.py
:
# Additional stuff for the LaTeX preamble.
'preamble': """
...
\DeclareUnicodeCharacter{2015}{\\textemdash}
""",
}
We convert the "horizontal bar" unicode 2015 to the "emdash" latex character (unicode U+2014).
Thanks to this link : https://en.wikibooks.org/wiki/LaTeX/Special_Characters