[Po4a-devel] Use of uninitialized value in pattern match ?

Nicolas François nicolas.francois at centraliens.net
Tue Mar 3 09:32:26 UTC 2009


Hello,

On Tue, Mar 03, 2009 at 10:08:28AM +0800, dongsheng.song at gmail.com wrote:
> 
> 1. cvs up; make clean; LC_ALL=C make
> ...
> Discard blib/man/ja/man3/Locale::Po4a::Xml.3pm.pod (109 of 157 strings; only
> 69.42% translated; need 80%).
> Discard blib/man/pl/man3/Locale::Po4a::Xml.3pm.pod (109 of 157 strings; only
> 69.42% translated; need 80%).
> XX Update po/bin/po4a.pot
> ../../lib/Locale/Po4a/Xml.pm:164: invalid variable interpolation at "$"
> Died at /home/dongsheng/var/cvs/po4a/_build/lib/My/Builder.pm line 51.
> make: *** [all] Error 1


I don't understand this one. Xml.pm:164 is
die wrap_mod("po4a::xml", dgettext("po4a", "'po4a-id=$id' in the translation does not exist in the original string (or 'po4a-id=$id' used twice in the translation)."));
And $id is always defined at that place.

Or maybe there is something wrong with the translation or the module which
extracts the translation from the PO file, and $id is changed to $foo.

Can you try changing it to:
die wrap_mod("po4a::xml", dgettext("po4a", "'po4a-id=%d' in the translation does not exist in the original string (or 'po4a-id=%d' used twice in the translation)."), $id, $id);



> 2.  When I use option 'untranslated' , the po file no effect
> PERLLIB=tools/po4a/lib/ tools/po4a/po4a-updatepo -M UTF-8 -f docbook
> -o doctype='docbook' -o untranslated='<programlisting> <screen>' \

<programlisting> and <screen> are already in _default_translated
and _default_placeholder.
Can you try adding -o nodefault='<programlisting> <screen>'?

I thought I added a check to make sure that a tag is not in two different categories, but this is obviously not the case.

What would also happen is that sub-tags of <programlisting> are translated.

for example
	<programlisting>
		foo
		<p>bar</p>
	</programlisting>

I would expect foo not to be translated, but bar will be in the PO file.
Adding <programlisting><p> should fix it (should only, because I'm not
sure I tested it;)

Best Regards,
-- 
Nekral



More information about the Po4a-devel mailing list