bug-gettext
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: xgettext and XML files - extracting strings


From: Bruno Haible
Subject: Re: xgettext and XML files - extracting strings
Date: Wed, 26 Apr 2023 13:24:48 +0200

Jamenson Espindula wrote:
>     45     <para>This book is licensed under a <xref linkend="CC"/>.</para>
>     46     <para>Computer instructions may be extracted from the book under 
> the
>     47           <xref linkend="MIT"/>.</para>
>     48
>     49     <para><trademark class='registered'>Linux</trademark> is a 
> registered trademark of
>     50     Linus Torvalds.</para>
>     51
> 
>  = = = End XML file = = =
> 
> I tried to extract the strings. The POT file produced is:
> 
>  = = = Begin "bookinfo.pot" file = = =
> ...
> 
> #: /home/jamenson/repos/upstream/lfs-git/prologue/bookinfo.xml:49
> msgid "Linux"
> msgstr ""
> 
>  = = = End "bookinfo.pot" file = = =
> 
> As you can see, lines 45 and 46 were skipped.

Also, from line 49, only the <trademark> element was extracted, not the
<para> element.

It seems to me like XML elements with nested XML sub-elements are not
supported.

If you want support for these, I would look at other tools that produce
POT files, not xgettext directly. For DocBook, there is the 'poxml' package
https://invent.kde.org/sdk/poxml .

Bruno






reply via email to

[Prev in Thread] Current Thread [Next in Thread]