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

Dongsheng Song dongsheng.song at gmail.com
Wed Mar 4 01:42:32 UTC 2009


2009/3/3 Nicolas François <nicolas.francois at centraliens.net>:
> 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);
>

Today's cvs trunk OK.

>
>> 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>'?
>

No, it does't work.

> 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;)
>

What about treat them(e.g. 'programlisting', 'screen', 'userinput',
'computeroutput')
as final tag like xml2po ?

> Best Regards,
> --
> Nekral
>
> _______________________________________________
> Po4a-devel mailing list
> Po4a-devel at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/po4a-devel
>



More information about the Po4a-devel mailing list