Re: LaTeXila: some questions



On Sat, Jul 16, 2011 at 03:33:21PM +0200, Sébastien Wilmet wrote:
> On Sat, Jul 16, 2011 at 10:25:14AM +0200, Daniel Mustieles García wrote:
> > 2011/7/16 Johannes Schmid <jhs jsschmid de>
> > >
> > > its-tool[1] seems the way to go nowadays. It does only handle xml AFAIK.
> > >
> > 
> > There is also a tool called xml2po that can help you to get the .po file
> > from your xml files, but i think itstool is the best choice.
> > >
> > > [1] http://blogs.gnome.org/shaunm/2010/10/27/xml-translations-with-its/
> > >
> 
> OK. itstool seems very interesting. I'll try to use it with CMake. And 
> if I succeed, I suppose it will be well integrated with Damned Lies (for 
> the Mallard documentation, and for the other XML file).

Done. Now LaTeXila uses ITS Tool for managing translations of the 
Mallard documentation, the build tools and the templates.

I hope that the integration with Damned Lies will go smoothly.

To update the *.pot, there are some scripts:
- update_pot.sh
- help/update_help_pot.sh
- data/templates/update_templates_pot.sh
- data/build_tools/update_build_tools_pot.sh

These scripts can be merged into one single script if needed. But I 
don't know how Damned Lies update the *.pot in other projects.

> If I don't use gnome-doc-utils for the Mallard doc, I'll need to know 
> how to install correctly the pages. The main problem I see is to open 
> the documentation in the good language. With gedit for example, to open 
> the documentation, it's simply the URI "ghelp:gedit". We don't have to 
> specify the language nor the complete path.

The *.pages must simply be installed in 
<prefix>/share/gnome/help/<project_name>/. Whatever the <prefix> is.

> =====
> 
> One question remains: what about the templates (*.tex files)? Currently, 
> each template is duplicated for each language. For example: 
> article-en.tex, article-fr.tex, report-it.tex, etc.
> 
> For all templates except the letter one, the unique change is to add one 
> line (the babel package in most cases).
> 
> For the letter template, it's more complicated because there are some 
> strings to translate, and for some languages the template can be 
> completely different (e.g. if another document class is used). So for 
> the letter, it would be too complicated and not enough flexible if the 
> template is decomposed into a lot of translatable strings. The letter 
> template must be translated in "one block".
> 
> It is possible to encode the templates as XML files. For the letter, it 
> would be simply one big string to translate. For the other templates, 
> there would be three blocks, but only the second block would be 
> translatable (and would be empty in English).

For the templates I have done what I said: one string for the babel 
package, and one big string for the letter.

What is installed is *.tex files, not the XML files. There is a little 
script that do the conversion during the compilation.

An empty string can not be translatable, so there is a comment:
% babel package or equivalent

This comment is removed in the final default *.tex.

Attachment: pgpqi22W3v8nk.pgp
Description: PGP signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]