[Po4a-devel] Translatable attributes in HTML

Nicolas François nicolas.francois at centraliens.net
Thu Aug 9 21:36:39 UTC 2007


Hi,

On Thu, Aug 09, 2007 at 09:01:47PM +0300, kaloian at doganov.org wrote:
> Nicolas François <nicolas.francois at centraliens.net> writes:
> 
>     I don't think it's a problem.  Even if, with includessi, the file
>     is included multiple times, the POT file will contain only one
>     copy of the common strings. So the work of translating the
>     included files will be done only once.
> 
> I agree that there is no problem when including one external file
> multiple times in an article.  (We don't have such case, I think.).
> The problem is when there are hundreth of articles that all include a
> few common external files.  (Which is more like our case.)  We would
> like to translate the few common external files separately from the
> articles they are included in.

I would use a single POT for all the files.

> A quick test shows that changing just `tag_trans_close' does the job.

Nice.

See attached a patch I plan to commit.

It adds a ontagerror option to the Xml module, and implement multiple
strategies.
In your case, I wonder if a "silent" strategy could not be useful.

> (It is hard to test this in the current CVS HEAD, because for some
> reason po4a always resolves SSI #include directives.  So, I did it in
> a slightly older version of CVS HEAD, which still does not support
> `includessi'.)

Thanks for noticing. That's fixed.

>     BTW, in that case should the SSI element be translatable?
>     Maybe
>             <!--#include virtual="file.html" -->
>     Should be translated to
>             <!--#include virtual="file.$lang.html" -->
> 
> We're doing this with a simple sed script, there is no need to bother
> the translators (or po4a) with this.

Well, if it's useful for many peoples, it's worth it.

Kind Regards,
-- 
Nekral
-------------- next part --------------
A non-text attachment was scrubbed...
Name: po4a_Xml_ontagerror.patch
Type: text/x-diff
Size: 5034 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/po4a-devel/attachments/20070809/f124517a/attachment.patch 


More information about the Po4a-devel mailing list