Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PO4A:LATEX ifthenelse puts everything in one message #448

Open
van-beek opened this issue Dec 14, 2023 · 0 comments
Open

PO4A:LATEX ifthenelse puts everything in one message #448

van-beek opened this issue Dec 14, 2023 · 0 comments

Comments

@van-beek
Copy link

van-beek commented Dec 14, 2023

Hi, i am probably overlooking something or doing something wrong.

consider the following latex code:

\section{this is the chapter title}

here is the first paragraph in the document, it will go in the translation
file just fine.

the second paragraph will also be put in the po file just fine.

\ifthenelse{\equal{includesubsections}{1}}{

\subsection{this is the first subsection}

here the text for the subsection is included.

\subsection{this is the second subsection}

here again some text to translate.

but all this paragraphs are put in one msg in de po file.


}{
here is the text if i dont want subsections.

}

then i call the following command to create a pot file:
po4a-gettextize -f latex -m latex.tex -p translation.pot

this will generate the following pot file:

# 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: 2023-12-14 10:50+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#. type: section{#2}
#: latex.tex:2
msgid "this is the chapter title"
msgstr ""

#. type: Plain text
#: latex.tex:5
msgid ""
"here is the first paragraph in the document, it will go in the translation "
"file just fine."
msgstr ""

#. type: Plain text
#: latex.tex:7
msgid "the seccond paragraph will also be put in the po file just fine."
msgstr ""

#. type: subsection{#2}
#: latex.tex:24
msgid "this is the first subsection"
msgstr ""

#. type: ifthenelse{#2}
#: latex.tex:24
msgid ""
"here the text for the subsection is included.  \\subsection{this is the "
"second subsection} here again some text to translate.  but all this "
"paragraphs are put in one msg in de po file."
msgstr ""

#. type: ifthenelse{#3}
#: latex.tex:24
msgid "here is the text if i dont want subsections."
msgstr ""

As you can see in the ifthenelse{#2} everything after the first plain text paragraph is put in one msgid. no separation of the subsection and the second sub paragraph anymore in separate msgid's.

where do i go wrong, or is it a bug in the latex processing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant