[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: texinfo-6.8: Test failing

From: Patrice Dumas
Subject: Re: texinfo-6.8: Test failing
Date: Mon, 5 Jul 2021 18:09:37 +0200

On Mon, Jul 05, 2021 at 11:36:55AM +0100, Gavin Smith wrote:
> Yes I agree, if we can't make the test pass in the case that no locales
> are installed.
> It's a frustrating problem as we aren't using the locale information for
> the user, we are using it for a document that is being produced that could
> be in a different language.  Whatever locales the user has installed should
> be irrelevant.  Some time I will look over the gettext documentation again
> and try to see if there is a better way of doing this.

I had a look at gettext_pp.pm in libintl-perl/lib/Locale, and I can't
see an easy way to avoid the call to POSIX::setlocale.  There is
actually a possibility, we could set a specific locale in
Texinfo/Report.pm instead of having list and use the undocumented last 
argument of dcnpgettext, like:

  my $translation_result = Locale::Messages::dcnpgettext('', undef, $message, 
undef, undef, LC_MESSAGES, $locale)

instead of

  my $translation_result = Locale::Messages::gettext($message);

But I think that it is not a good idea, as this last argument is
undocumented for good reasons and it could be removed from 
libintl-perl future implementations.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]