bug-texinfo
[Top][All Lists]
Advanced

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

Re: texinfo-6.8: Test failing


From: Gavin Smith
Subject: Re: texinfo-6.8: Test failing
Date: Mon, 5 Jul 2021 23:09:10 +0100
User-agent: Mutt/1.9.4 (2018-02-28)

On Mon, Jul 05, 2021 at 06:09:37PM +0200, Patrice Dumas wrote:
> 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.

In commit 8e53ffed59 I added code to run "locale -a" as a backup; hopefully
this will mostly resolve this issue.

Apparently selecting the language via the LANGUAGE variable is the best way
as this doesn't require a locale for the language to be installed.



reply via email to

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