[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Quilt-dev] Call for 0.42
From: |
Martin Quinson |
Subject: |
Re: [Quilt-dev] Call for 0.42 |
Date: |
Fri, 22 Jul 2005 18:18:42 +0200 |
User-agent: |
Mutt/1.5.6+20040907i |
On Wed, Jul 20, 2005 at 06:37:10PM +0200, Jean Delvare wrote:
> Hi all,
>
> > > I just finished updating the French translation, Andreas did the
> > > German one. Looks like we are ready to release 0.42?
>
> Hm, we have a problem. The recently introducted gettextization of the
> perl scripts introduced a dependency on Locale/gettext.pm, which appears
> NOT to be part of the standard perl distribution. I am not sure it is
> wise to add such a dependency for only error messages - theses perl
> scripts are not supposed to talk when everything works fine.
>
> Is it technically possible to only use Locale/gettext.pm if it exists,
> and disable internationalization if it doesn't rather than plain die? If
> it is possible, then I'd suggest that we do just that.
Here is a code chunk which should do it. It comes from the po4a project
which is deeply unrelated with quilt, beside the fact that I contribute to
both.
I'm currently somehow in vacations and would prefer if someone else could
integrate this into quilt properly.
<<<<<<<<<<<<<<<<<<<<<<
=head2 Wrappers for other modules
=item textdomain($)
This is a wrapper for Locale::gettext's textdomain() so that po4a still
works if that module is missing. This wrapper also calls
setlocale(LC_MESSAGES, "") so callers don't depend on the POSIX module
either.
=cut
sub textdomain
{
my ($domain)address@hidden;
return eval "use Locale::gettext; use POSIX; setlocale(LC_MESSAGES, '');
textdomain(\$domain)";
}
=item gettext($)
This is a wrapper for Locale::gettext's gettext() so that things still
work ok if that module is missing.
=cut
sub gettext
{
my ($str)address@hidden;
my $rc=eval "use Locale::gettext; Locale::gettext::gettext(\$str)";
return ($@ ? $str : $rc);
}
=item dgettext($$)
This is a wrapper for Locale::gettext's dgettext() so that things still
work ok if that module is missing.
=cut
sub dgettext
{
my ($domain, $str)address@hidden;
my $rc=eval "use Locale::gettext; dgettext(\$domain, \$str)";
return ($@ ? $str : $rc);
}
>>>>>>>>>>>>>>>>>>>>>>>
Have fun, Mt.
signature.asc
Description: Digital signature
- Re: [Quilt-dev] Call for 0.42, (continued)
- Re: [Quilt-dev] Call for 0.42, Jean Delvare, 2005/07/21
- Re: [Quilt-dev] Call for 0.42, Andreas Gruenbacher, 2005/07/21
- Re: [Quilt-dev] Call for 0.42, Jean Delvare, 2005/07/22
- Re: [Quilt-dev] Call for 0.42, Andreas Gruenbacher, 2005/07/22
- Re: [Quilt-dev] Call for 0.42, Jean Delvare, 2005/07/22
- Re: [Quilt-dev] Call for 0.42, Andreas Gruenbacher, 2005/07/22
- Re: [Quilt-dev] Call for 0.42, Andreas Gruenbacher, 2005/07/22
- Re: [Quilt-dev] Call for 0.42, Jean Delvare, 2005/07/23
- Re: [Quilt-dev] Call for 0.42, Andreas Gruenbacher, 2005/07/23
- Re: [Quilt-dev] Call for 0.42, Jean Delvare, 2005/07/24
- Re: [Quilt-dev] Call for 0.42,
Martin Quinson <=
- Re: [Quilt-dev] Call for 0.42, Jean Delvare, 2005/07/25