On Thu, May 26, 2005 at 05:52:39PM +0200, Francois Gouget wrote:
For the Wine project we are trying to make it as easy as possible for
Wine contributors to modify and rebuild the Wine documentation. The Po4a
dependencies have caused some concern in this regard: for each
dependency the contributor will have to track down which package to
install for his distribution and this makes the initial setup
significantly harder.
Po4a being not very widespread we have checked it in the Winedocs CVS
(
http://cvs.sourceforge.net/viewcvs.py/wine/docs/). But Po4a has quite a
few dependencies so this does not help very much. So now we are hoping
to make it possible to reduce the number of po4a dependencies. Here is
the list I came up with, together with some notes for each of them:
* Locale::gettext (perl module)
Needed by po4a for localization.
Provided by liblocale-gettext-perl on Debian, perl-Locale-gettext on
Mandrake and Fedora Core(DAG), perl-gettext on SUSE.
Would you be open to a patch that acted as a wrapper around
Locale::gettext so that po4a would continue to work untranslated if that
module was missing?
The idea we would add a 'Po4aGettext' module that would export
gettext() and dgettext() functions. These would try to load
Locale::gettext in an eval function and use it if that succeeds.
Otherwise the Po4aGettext would simply return the untranslated strings.
The only changes to the other Po4a modules would be replacing 'use
Locale::gettext' with 'use Po4aGettext'.
Ok. Great. It could even be done by default in the Common.pm module, which
would then export the d?gettext functions. Impact on other parts would be
the need to kill the explicit gettext loading.
* Text::WrapI18N (perl module)
Pure perl (so easy to check in) but depends on Text::CharWidth which
is not pure perl.
Provided by libtext-wrapi18n-perl on Debian. Found no RPM packages
providing it.
Text::WrapI18N was not used in po4a 0.16.2. I initially thought it
was used to wrap the text being output to the .po and .sgml files but in
fact it seems to only be used to print messages, warnings and errors.
Why is it needed? Doesn't a simple print work fine?
This module becomes important when you want to wrap CKJ languages
(japaneese, corean), which don't have any spaces, if I understood well. So
finding where you can cut the sentence properly is not as easy as in, say,
french.
So, actually, we *ought* to use it all around the place. Maybe through a
wrapper such as the one you propose for gettext...
* Term::ReadKey (perl module)
Provided by libterm-readkey-perl on Debian, perl-Term-ReadKey on
Mandrake and Fedora Core(DAG), perl-TermReadKey on SUSE.
This module is used to determine the size of the terminal. This
information is then used by the wrap functions.
But if it's not there, things should still work, using 80 as terminal size.
* SGMLS (perl module)
Needed by po4a to interface with the nsgmls parser.
Pure perl (so easy to check in).
Provided by libsgmls-perl on Debian, perl-SGMLSpm on Mandrake and
Fedora Core, perl-SGMLS on SUSE.
This is an essential part of po4a. The easiest way to remove this
dependency would be to check it into the Winedocs repository. So no
action needed on the Po4a side.
* nsgmls (command line tool)
Needed by po4a to parse the Sgml files.
Provided by sp on Debian, sgml-tools or openjade on Mandrake and
Fedora Core, opensp on SUSE.
This is an essential part of po4a. So it will have to remain as a
dependency which is reasonable.
Actually, I'd like since a long time to kill this one, changing it to an
home-made parser such as the one used in xml or so...
Bye, Mt.