On Tue, Jan 07, 2025 at 07:46:29PM +0000, Gavin Smith wrote: > On Tue, Jan 07, 2025 at 08:21:48PM +0100, Patrice Dumas wrote: > > On Tue, Jan 07, 2025 at 06:55:33PM +0000, Gavin Smith wrote: > > > That would succeed in suppressing the error messages from "locale", but > > > it wouldn't make the strings be translated properly. In fact, the > > > error messages from "locale" were useful in this case for investigating > > > why the strings were not translated and why the tests failed, so it > > > seems more useful to keep them than to silence them. > > > > It could be annoying if users do not care about translations, they would > > have to see the message anyway. > > > > Maybe redirect to /dev/null unless DEBUG, VERBOSE or TEST is set? > > It's not the best sign of an error but it is better than silently > creating a manual which does not use translated strings even though > they are available.
But they are not really available if the locales are not present at all. The message signals that the locales command has trouble with a lack of installed locales, it is not truely an error message of Texinfo. If we switched locales without calling "locales -a" we would not get this error anyway. > As far as I can tell from the test log that was sent, this message > is only sent when the manual output is translated due to "@documentlanguage" > - if the manual doesn't use this directive, which is the majority of > times, there will be no errors output, so it does not seem like a severe > problem. Indeed, issues with translations can only happen if the manual is not in english... > The alternative would be to output a more informative warning message > that translations would not work, and to suppress the messages printed by > "locale". As far as I can say, it is never possible to distinguish a lack of translation and some kind of error in the gettext framework. In that precise case, if "locales -a" did not output a message, I also think that we should not output a message either, as what could be seen from texi2any is that the locale is still C/POSIX and could not be switched, but we cannot know if it is an error, or if the user do not want to have locales installed and has wiped out all the texinfo_document translations files anyway. -- Pat