[Po4a-devel]Some details

Jordi Vilalta jvprat@wanadoo.es
Fri, 4 Jun 2004 12:16:26 +0200 (CEST)


Hi,

On Wed, 26 May 2004, Martin Quinson wrote:
> On Wed, May 26, 2004 at 03:53:28PM +0200, Jordi Vilalta wrote:
> > On Tue, 25 May 2004, Martin Quinson wrote:
> > > On Sat, May 22, 2004 at 03:34:28PM +0200, Jordi Vilalta wrote:
> > > [...] 
> > > > I haven't been able to find the main po4a man page, although most of the 
> > > > other man pages refer to it. Does it exist? Isn't it installed along with 
> > > > the other ones?
> > >  
> > > man 7 po4a 
> > > pod2man doc/po4a.7.pod
> > 
> > Yes, I can build it manually, but it isn't built nor installed 
> > automaticaly with make (I think it should).
> 
> Yeah, the debian package does install it, but I didn't found how to add some
> extra rules to the Makefile.PL. If anybody knows how to do so, it'd be cool.
> 
> [..] 
> > > 
> > > > And the last one (for now): How could I see the po4a program translations 
> > > > in action? (I refer to the french one in the CVS and the spanish I'm 
> > > > doing). I've tried something like
> > > >   LANG=fr po4a-gettextize
> > > > and things like that, but all appears in english, like before. What am I 
> > > > missing?
> > > 
> > > It depends on the way you installed it. I get it in french...
> > 
> > I've been looking it, and I saw that translations are not automaticaly 
> > installed. I tried with:
> >   make -C po install
> > and after upgrading gettext to 0.13, it seems now the po/bin/*.po catalogs 
> > are installed.
> 
> How, the lack of sub-directory recursion in this stupid Makefile.PL again.
> Sorry, I'm puzzeled.
> 
> > In spite of this, I can't get any translated message at runtime.
> 
> ls /usr/share/locale/es/LC_MESSAGES/po4a.mo ?
> I suspect the same kind of problem than above. Couldn't you try to install
> the debian package? I though gentoo was based on debian anyhow...

Yes, po4a.mo is there, and... it works (for french, spanish and catalan :) 
It was my fault. I only watched to the help messages:
Usage:
    po4a-gettextize -f <format> -m <master.doc> [-l <localized.doc>] -p
    <translation.po>

Options:
...

This is already in english, but the module specific messages appears 
translated :)

> 
> > The translations in po/pod/*.po aren't currently used to generate any 
> > final file (as translated man's), are they?
> 
> The translated man page generation takes place during the debian package
> compilation. This is wrong again.
> 

About these other issues (translating and installing manpages, and 
treating the po directory) I've been watching for an alternative solution:

I've seen that debian/rules is a kind of Makefile. There are some parts of 
debian specific stuff, but the major part seems platform independent. It 
would be nice to extract these common parts and create a main Makefile 
with them. This way, everyone could have access to the translated 
manpages, and debian/rules could use this main Makefile. The recusion 
issue would be solved.

The second part is that this Makefile would collide with the one generated 
from Makefile.PL. I've been reading a little about ExtUtils::MakeMaker and 
I've seen that there's another project (Module::Build) that aims to 
replace this. It's here: http://search.cpan.org/dist/Module-Build/
I also found this introductory article, that tells the advantages of 
Module::Build, and some small steps for migrating from 
ExtUtils::MakeMaker, http://www.perl.com/pub/a/2003/02/12/module1.html
This aims to be completely perl-based, so there aren't intermediate 
Makefiles and it's used this way:
  perl Build.PL
  ./Build
  ./Build test
  ./Build install

It's very similar to the current process, but it frees the Makefile name. 
This way we could have the main Makefile call this script, and do all the 
other things (and we could forget about the bootstrap, because this main 
Makefile would do it all).

I think it could be a good enhancement. If you like the idea but don't 
have the time to watch it, I could try to test it.

Regards,

Jordi Vilalta