> From: Gavin Smith <[email protected]> > Date: Tue, 6 Jul 2021 13:10:59 +0100 > Cc: [email protected], [email protected], [email protected] > > > What will happen on platforms that don't have the 'locale' command > > installed (MS-Windows)? Should the code perhaps refrain from invoking > > the command if it isn't available, or at least shut up any resulting > > error messages? > > > > Thanks. > > > The code checks for en_US and en_US.UTF-8 first. If either of those work, > then 'locale' will not be run. Have you checked if document translation > works under MS-Windows? I gave instructions here - > https://lists.gnu.org/archive/html/bug-texinfo/2021-02/msg00157.html - or > you could run the test_scripts/layout_formatting_fr_icons.sh test.
The test_scripts/layout_formatting_fr_icons.sh test ran as part of "make check" when I built Texinfo 6.8, and it succeeded here. So I guess this is working fine on my system. However, perhaps on some other system it could fail, since AFAIU we don't really understand why it is fragile. > If that is not enough maybe there is something else we could do before > trying to call 'locale' for the benefit of MS-Windows. I think we can leave this at the current code, until some Windows user complains. > If the code does try to run 'locale' but the command doesn't exist, I agree > that we need to stop the error messages. When I comment out the code to > use en_US etc. and change the command name to "localexx", I get many > warnings printed: > > Can't exec "localexx": No such file or directory at > ../../tp/Texinfo/Report.pm line 264. > Use of uninitialized value in split at ../../tp/Texinfo/Report.pm line 264. > > I have made a change (commit 13364f2fa5) to only attempt to run 'locale' once > so that there will not be an error message (and performance hit) every time > a document string is attempted to be translated. OK, thanks. I think this is good enough for now.
