On 2014-04-24 19:49 GMT+02:00 Felix Dietze wrote:
Hi,
I'm using po4a to translate this LaTeX document:
https://github.com/iuf/rulebook/blob/master/src/iuf-rulebook.tex
It works well, but my translators get confused by the latex-commands
they see in the strings:
#. type: Plain text
#: ./src/iuf-rulebook.tex:11
msgid "\\textwidth=14.7cm \\textheight=22.1cm"
msgstr ""
#. \usepackage[nenglish]{babel}
#. type: Plain text
#: ./src/iuf-rulebook.tex:22
msgid "\\setlist{itemsep=-1mm, topsep=-1pt, partopsep=0pt}"
msgstr ""
#. turning off part numbering in the backmatter
#. parts will still go to the TOC
#. type: Plain text
#: ./src/iuf-rulebook.tex:28
msgid "\\g@addto@macro\\backmatter{\\setcounter{secnumdepth}{-2}}
\\makeatother"
msgstr ""
#. prettier TOC
#. use 'KOMAlike" if you don't want dots
#. type: Plain text
#: ./src/iuf-rulebook.tex:42
msgid ""
"\\usetocstyle{allwithdot} \\settocstylefeature [-1] {entryvskip} {15pt} "
"\\settocstylefeature [0] {entryvskip} {10pt} \\settocstylefeature [0] "
"{entryhook} {\\hspace{18pt} }"
msgstr ""
#. if a part only has a single chapter in it use \singlechapter{}
otherwise use the normal \chapter{}
#. type: Plain text
#: ./src/iuf-rulebook.tex:48
msgid ""
"\\singlechapter[1]{\\begin{mtchideinmaintoc} \\addstarredchapter{#1} "
"\\chapter*{#1} \\end{mtchideinmaintoc}}"
msgstr ""
Is there a way to exclude lines from the translation?
Hello,
Po4a has a predefined list of macros; you can extend it, see Locale::Po4a::TeX.
For instance, adding
% po4a: command -settocstylefeature[]{}{}
in the TeX file should remove \settocstylefeature from PO files.
A simpler solution is to move your preamble into a separate file which
is \include'd, and add an exclude_include option to exclude this file.
Denis