Hi,
On Thu, Aug 09, 2007 at 09:01:47PM +0300, kaloian(a)doganov.org wrote:
Nicolas François <nicolas.francois(a)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