[Po4a-devel] Updating the translation of two custom xml files with new version of a file and new options about tags

Nicolas François nicolas.francois at centraliens.net
Sun Dec 27 22:25:28 UTC 2009


Hello,

On Sun, Dec 27, 2009 at 10:09:27PM +0200, moradan228 at gmail.com wrote:
> 
> 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.

I don't know why you think there should be 1476 strings, but the new
options are taken into account (see for example doc/genr_funcs.xml:816 or
doc/genr_funcs.xml:155).
If you think it should have 1476 strings, the reason might also be that
there are some new strings in the XML files. The only way to find this is
to compare the new and old POT files.

Note on the config file:
As all files are sharing the same DTD, it would be easier and more
maintainable for you to use the same po4a options for all files.
In that case, I would use the same options for all XML files with an
alias. It would also be easier for adding new languages to use the $lang
construct:

[po4a_langs] ru pt_BR
[po4a_paths] doc/i10n/gretl_help.pot $lang:doc/i10n/$lang.po

[po4a_alias:xml] 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> i<para><emphasis> \
		i<para><book> i<para><cmd> i<para><program> <menu-path> \
		<effect>' \
		-o 'untranslated=<repl> <example> <emphasis> <code> \
		<fnarg> <argument> <flag> <code> <demo> <lit> <table> \
		<cell> <optparm> <filename> <math>'"

[type: xml] doc/gretl_commands.xml $lang:doc/$lang/gretl_commands_$lang.xml
[type: xml] doc/genr_funcs.xml     $lang:doc/$lang/genr_func_$lang.xml

I also think it would improve your PO files to set the <para> as
re-wrapable: w<para> instead of <para> (ditto for some others)

And you may also want to specify the tags more directly (i.e. i<quote>
instead of i<para><quote>), but the POT file should be examined to make
sure it does not bring more text into a translatable content.

Best Regards,
-- 
Nekral



More information about the Po4a-devel mailing list