[Po4a-devel][RFCs] configuration file format (+ addendum change?)

Martin Quinson mquinson@ens-lyon.fr
Thu, 15 Jul 2004 19:56:26 -0700


Erm, as you imagined, I completely forgot about po4a recently. Let's fix that.

On Fri, Jul 02, 2004 at 04:45:48PM +0200, Jordi Vilalta wrote:
> On Wed, 30 Jun 2004 martin.quinson@free.fr wrote:
> 
> > Hello,
> > 
> > now that po4a is rather stable and reliable (thanks to the test suite), my 
> > feeling is that the main showstopper preventing po4a from being widly used is 
> > the way to use it. It's far too complicated, with 2 tools to use at each 
> > update, each of them requiring 3 or more options. My goal (beside becoming 
> > imortal/worldmaster/whatever) would be to solve that situation. 
> > 
> > I would like to come up with a design of configuration file which would allow 
> > people to do the two most often used actions (po4a-updatepo & po4a-translate) 
> > in one shoot as simple as "po4a -c configuration_file".
> 
> Interesting. Would it coexist with the current tools, or would it stand in 
> for them?

Of course it is an addition.

[...]

> Very clear and compact. The only thing I think can cause confusion is 
> using the same syntax for the pot/po files. I think it should have some 
> distinction, but this way it would be easier to parse. What's your 
> intention?

In fact, having my machine running again, I am now able to check the syntax
of the files I'm trying to mimic here. Thus, the example would become (with
you very good suggestion for addendums):

[po4a/path:] doc/l10n/project.doc.pot fr:doc/l10n/fr.po de:doc/l10n/de.po
[type: sgml] doc/my_stuff.sgml fr:doc/fr/mon_truc.sgml de:doc/de/mein_cram.sgml
[type: pod] script fr:doc/fr/script.1 de:doc/de/script.1 \
   adden_fr:doc/l10n/script_adden_fr.po adden_de:doc/l10n/script_adden_de.po

> I haven't used addendums yet, but it seems a complex issue. If you create 
> automaticaly a po msgid for each master file, many of them would be 
> wasted, because not all files need addendums (I think).
> 
> It also may not be directly translator's job, as it may need knowledge of 
> the document format in use. Using separate files keeps po files more 
> readable.
> 
> What about simplifying the format of the addendums? For example, to a 
> title and a content (plain text) so that this same addendum could be used 
> for all documents (each module could transform this plain text to its own 
> format), and then you only would need to say what files use the addendum 
> and what not.

Indeed, addendum needs refactoring, but not the one I was proposing. 

If you get support from the document author, you can ask him to add a
specific entity &translator_details; for example. 

> > Yet another limitation is that I have no idea about how to handle module 
> > options...
> 
> What about:
> 
> [mod] sgml -options...
> [mod] pod -options...
>
> I don't like mixing different kinds of options with a so similar syntax, 
> but it's the same issue as the main pot/po files I said above. Find an 
> alternative for that, and you'll probably find how to handle module 
> options.

me neither. Let's postpone this one. If you use the config file, you can't
use options ;)

Ok, I'm gonna commit my first version very soon. I just need to do some
basic testing before... Anyway, since it's an addition, the old syntax will
still work if I mess this one up ;)

Bye, Mt.

-- 
For every complex problem there is a solution which is simple, neat and wrong.