On Mon, Aug 16, 2004 at 02:53:06AM +0200, Jordi Vilalta wrote:
On Sat, 14 Aug 2004, Martin Quinson wrote:
>We need a way to pass the charsets values on the command line or within the
>config file (or boths).
>
>The command line approach is trivial if we're ok to have the same encoding
>for all files. The config file is not very difficult under the same
>assumtion.
This can be an easy solution for a near release.
done.
>If we remove this assumption, it becomes more difficult. Very
difficult
>indeed, check the code of po4a.
For future releases we should go through this approach.
Yup, the current situation is crude. Enough for now, but hackish.
As I said some days ago:
>This would also take to a redesign of the po4a config files, since we need
>to specify more information there. This could be done together with the
>TransTractor redesign explained in the "Future directions" section. Well,
This redesign is not really related. It would allow to deal with formats were
all translations end in the same generated document. It implies a
modification for the Transtractor structure, but not really to the
configuration file, I guess.
>we should leave all this for a future release... but we should
begin
>thinking about it ;)
When dealing with... say 10 languages, and for each file of each language
you need to specify the output file, the output encoding and one or more
addendums (maybe something more in the future), this makes long lines in
the config file, very hard to deal with.
I think we should separate all this in lang-file blocks to make it more
clear, and together with this, think on how to pack all this information
to pass it to the "new" transtractor.
Maybe. The content of this file is not very difficult, but what we want to
express is a matrix of setting (masterfile x language), which is not trivial
in a linear file. It would be cool to be able to give defaults values, too.
Such as "use this addendum for all files of this language".
A tree based vision, such as xml (yurk) or apt config files may help or make
things even worse. I dunno.
apt-like would be:
potfile = po/perl-doc.pot;
pofile = {
fr = po/perl-doc.fr.po;
};
addendum::fr::* = po/fr/addendum.generic;
addendum::fr::"perl.pod" = po/fr/addendum.generic po/fr/addendum.perl.pod;
master = {
perl.pod = {
format = pod;
encoding = isolatin-1;
}; };
master::"perltoc.pod"::format = pod;
master::"perltoc.pod"::encoding = ascii;
fr::*::encoding = utf8;
This one seems powerfull enough, but harder to implement...
As I said before implementing po4a(1), the most difficult task here is to
come up with a config file format people can understand.
By now, use the first approach and document the current limitation
(we
have to release this week ;)
Yeah, you are right.
--
Le sens commun n'est pas si commun.
-- Voltaire
[Common sense is not so common]