Updating the translation of two custom xml files with new version of a file and new options about tags
by Ivan Sopov
Hello.
Some time ago I have successfully generated a .pot-file and two
.po-files for help-system of a Gretl program (a part of a GNU project
- gretl.sf.net) which is in two xmls
I used these versions of files:
http://gretl.cvs.sourceforge.net/viewvc/*checkout*/gretl/gretl/doc/comman...
http://gretl.cvs.sourceforge.net/viewvc/*checkout*/gretl/gretl/doc/comman...
I used the following config file to do this:
[po4a_paths] doc/i10n/gretl_help.pot ru:doc/i10n/ru.po pt_BR:doc/i10n/pt_BR.po
[type: xml] doc/genr_funcs.xml ru:doc/ru/genr_func_ru.xml
pt_BR:doc/pt_BR/genr_func_pt_BR.xml\
opt:"-o 'translated=<para> i<para><lit> i<para><math> \
i<para><argname> i<para><quote> i<para><cmdref> i<para><guideref> \
i<para><fncref> i<para><sub> i<para><sup> i<para><repl> \
i<para><quote><lit>' \
-o 'untranslated=<repl> \
<example> <emphasis> \
<code> <fnarg>'"
[type: xml] doc/gretl_commands.xml ru:doc/ru/gretl_commands_ru.xml
pt_BR:doc/pt_BR/gretl_commands_pt_BR.xml\
opt:"-o 'translated=<para> i<para><lit> i<para><math> i<para><quote>\
i<para><emphasis> i<para><repl> i<para><cmdref> i<para><book> \
i<para><guideref> i<para><cmd> \
i<para><sub> i<para><sup> i<para><program>\
<menu-path> <effect>' \
-o 'untranslated=<argument> <flag> \
<code> <demo> <example> <lit> <table> <cell> <repl> \
<optparm> <filename> <math>'"
I have uploaded them on launchpad.net and we translated some parts of
them. Now we want to update our .pot and .po-files (ru and pt_BR) with
the new version of one of the xmls. The other file wasn't changed. So
new files are:
http://gretl.cvs.sourceforge.net/viewvc/*checkout*/gretl/gretl/doc/comman...
http://gretl.cvs.sourceforge.net/viewvc/*checkout*/gretl/gretl/doc/comman...
Also I uderstand that I need to add two tags for inline translation
for unchanged gretl_funcs.xml. So the config file should look like
this:
[po4a_paths] doc/i10n/gretl_help.pot ru:doc/i10n/ru.po pt_BR:doc/i10n/pt_BR.po
[type: xml] doc/genr_funcs.xml ru:doc/ru/genr_func_ru.xml
pt_BR:doc/pt_BR/genr_func_pt_BR.xml\
opt:"-o 'translated=<para> i<para><lit> i<para><math> \
i<para><argname> i<para><quote> i<para><cmdref> i<para><guideref> \
i<para><fncref> i<para><sub> i<para><sup> i<para><repl> \
i<para><quote><lit> i<para><equation> i<para><by>' \
-o 'untranslated=<repl> \
<example> <emphasis> \
<code> <fnarg>'"
[type: xml] doc/gretl_commands.xml ru:doc/ru/gretl_commands_ru.xml
pt_BR:doc/pt_BR/gretl_commands_pt_BR.xml\
opt:"-o 'translated=<para> i<para><lit> i<para><math> i<para><quote>\
i<para><emphasis> i<para><repl> i<para><cmdref> i<para><book> \
i<para><guideref> i<para><cmd> \
i<para><sub> i<para><sup> i<para><program>\
<menu-path> <effect>' \
-o 'untranslated=<argument> <flag> \
<code> <demo> <example> <lit> <table> <cell> <repl> \
<optparm> <filename> <math>'"
When I simply try to launch a po4a with a new config file and existing
old .pot and .po-files I receive a message about 1485 strings in
.pot-file. And it should contain 1476 strings with the new
config-file. 1485 is the number of strings from the existing .pot
file. AFAIU it is not updated with new tags for inline translation. My
.pot-file and two .po-files are in the attachment.
Thanks a lot for such a program. With "-k 0" option I can produce now
a translated versions of these xmls and this is already something.
With respect, Ivan Sopov.
P.S. Actually the pt_BR.po file was generated from a .pot-file on the launchpad.
15 years
Polish man pages broken again in po4a 0.37
by Robert Luberda
Hi,
The Polish man pages generated from POD are unreadable, e.g. (from
Locale::PO4A::Man(3), please also note its strange header, but this
is another problem):
_build::pod::3::pUseriC_build::pod::3::pl::lib::Locale::Po4a::Man(3)
NAZWA
Locale::Po4a::Man - Konwersja stron podrAeXcznika z/do
plikA~Xw PO
OPIS
Celem projektu po4a ("po for anything") jest uAaXatwienie
tAaXumaczeAaX (oraz, co ciekawsze, zarzAeXdzania
tAaXumaczeniami) przy uAaXyciu narzAeXdzi gettext w tych
obszarach, gdzie nie byAaXy uAaXywane, jak na przykAaXad w
obszarze dokumentacji.
The problem seems to be caused by po4a-build not passing --utf8 to
pod2man, and by po4a, which doesn't include any `==encoding' line in
translated PODs.
I was able to work-around this in po4a-build by defining a following
simple pod2man function there, and then rebuilding po4a:
pod2man()
{
i=`expr $# - 1`
file=`eval echo '$'$i`
case $file in
*_build*)
sed -e '1,/=head1/s/=head1/=encoding
UTF-8\n\n&/' $file > $file.tmp
cp $file.tmp $file
/usr/bin/pod2man --utf8 "$@"
;;
*)
/usr/bin/pod2man "$@"
;;
esac
}
Regards,
robert
15 years