On Mon, Nov 25, 2024 at 07:26:24PM +0100, Patrice Dumas wrote: > On Fri, Nov 22, 2024 at 07:14:40PM +0000, Gavin Smith wrote: > > On Fri, Nov 22, 2024 at 12:10:33PM +0100, Patrice Dumas wrote: > > > Hello, > > > > > > Now that the XS modules are used, there are new errors in the CI. > > > > > > For Cygwin64 and Macos-13, there are many errors with translations. For > > > these platforms in the CI, the Perl version is 5.40.X, such that XS is > > > used for getting translated strings in documents, but it does not seems > > > to work. There are no visible memory errors as there was in freebsd for > > > an older Perl. > > > > It's difficult to investigate without direct access to the system. > > Agreed, and even with direct access, it could still be difficult. > > I do not think that we need to fully solve that for the release. I > think that our best options are actually: > 1) use Perl function to find translated strings in the default case > but provide with a customization variable to use the default used now > 2) keep the default as it is now but add a customization variable to > always use the Perl function to find translated strings > > 1) would actually be more in line with what we have done for long, by > using the pure Perl libintl-perl while we could have used the > libintl-perl XS module for speed, but this means not getting the best of > GNU where gettext works as intended for perl > 5.38. > > Opinions?.
If I understand correctly, there are two ways to get translations in the XS modules. One is to call the gettext functions directly. The other is to call back into the Perl interpreter to use the non-XS translation functionality. For older versions of Perl we use the latter method as calling gettext directly doesn't work reliably due a bug in the Perl interpreter which has since been fixed. On the two systems you mention (Cygwin64 and Macos-13), in spite of Perl appearing to be new enough, calling gettext does not work. It is presumed that calling back into Perl would work, though. Have I understood the issue correctly? Could we make a configure-time check to see whether getting translations with gettext works? I think it is something that we should be able to determine automatically rather than trouble the user with a customization variable.