Package: po4a
Version: 0.45-1
Hi. I ran into a problem trying to use po4a to handle translations of
the Teckids teaching material, available under public/material/ from
<URL: https://www.teckids.org/cgit/verein.git >.
This simple latex file demonstrate the problem:
% cat >x.tex <<EOF
\documentclass{article}
\usepackage{listings}
\begin{document}
\begin{lstlisting}[language=c]
void setup() {
}
void loop() {
}
\end{lstlisting}
\end{document}
EOF
% po4a-gettextize -M UTF-8 -f latex -p teckids-material.pot -m x.tex
x.tex:7: (po4a::tex)
unknown environment: 'lstlisting'
%
I tried adding '-o verbatim=lstlisting', but this did not work properly
as the [language=c] parameter became part of the string to translate:
% po4a-gettextize -o verbatim=lstlisting -M UTF-8 -f latex -p
teckids-material.pot -m x.tex
% cat teckids-material.pot
# SOME DESCRIPTIVE TITLE
# Copyright (C) YEAR Free Software Foundation, Inc.
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2016-12-11 10:42+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#. type: lstlisting
#: x.tex:7
#, no-wrap
msgid ""
"[language=c]\n"
"void setup() {\n"
"}\n"
"\n"
msgstr ""
#. type: lstlisting
#: x.tex:10
#, no-wrap
msgid ""
"void loop() {\n"
"}"
msgstr ""
%
I would like the entire program listing should show up as one
translation block in the pot file.
--
Happy hacking
Petter Reinholdtsen