On Tue, Jan 07, 2025 at 09:30:16PM +0100, Patrice Dumas wrote: > 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.
It could be that they don't have locales installed but haven't wiped the texinfo_document directory. They are not making a choice to disable Texinfo document translations. If we can detect that the locale is stuck at C/POSIX and that therefore translations are disabled, we could output a warning message. The fact that texi2any translations don't work if there are no locales is an implementation detail of texi2any. In theory we could load .mo files manually, or provide translations some other way that doesn't use gettext at all. The fact that a user doesn't have locales installed has nothing to do with the question of whether they want texi2any output to contain translated strings or not.