bug-texinfo
[Top][All Lists]
Advanced

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

Re: t/languages.t documentlanguage test failure (fixed)


From: Gavin Smith
Subject: Re: t/languages.t documentlanguage test failure (fixed)
Date: Tue, 31 Oct 2023 20:39:54 +0000

On Mon, Oct 30, 2023 at 07:25:40PM +0000, Gavin Smith wrote:
> The test "perl -w t/languages.t documentlanguage" started failing
> recently for me.  This test refers to the input file
> tp/tests/formatting/documentlanguage.texi which specifies
> "@documentlanguage pt".

I think I found the problem.  After I ran texi2any on a test file
with strace I found that texinfo_document.pot was being opened under
LocaleData/pt.us-ascii:

$ grep texinfo_document log
openat(AT_FDCWD, 
"/home/g/src/texinfo/GIT/tp/../tp/../tp/LocaleData/pt_PT/LC_MESSAGES/texinfo_document.mo",
 O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, 
"/home/g/src/texinfo/GIT/tp/../tp/../tp/LocaleData/pt/LC_MESSAGES/texinfo_document.mo",
 O_RDONLY) = 3
newfstatat(AT_FDCWD, "/usr/share/locale/en/LC_MESSAGES/texinfo_document.mo", 
0x564cfdf794a8, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, 
"../tp/../tp/LocaleData/pt.us-ascii/LC_MESSAGES/texinfo_document.mo", 
{st_mode=S_IFREG|0644, st_size=9885, ...}, 0) = 0
newfstatat(AT_FDCWD, 
"../tp/../tp/LocaleData/pt.us-ascii/LC_MESSAGES/texinfo_document.mo", 
{st_mode=S_IFREG|0644, st_size=9885, ...}, 0) = 0
openat(AT_FDCWD, 
"../tp/../tp/LocaleData/pt.us-ascii/LC_MESSAGES/texinfo_document.mo", 
O_RDONLY|O_CLOEXEC) = 3
newfstatat(AT_FDCWD, 
"../tp/../tp/LocaleData/pt/LC_MESSAGES/texinfo_document.mo", 
{st_mode=S_IFREG|0644, st_size=14283, ...}, 0) = 0
newfstatat(AT_FDCWD, 
"../tp/../tp/LocaleData/pt/LC_MESSAGES/texinfo_document.mo", 
{st_mode=S_IFREG|0644, st_size=14283, ...}, 0) = 0
openat(AT_FDCWD, "../tp/../tp/LocaleData/pt/LC_MESSAGES/texinfo_document.mo", 
O_RDONLY|O_CLOEXEC) = 3
newfstatat(AT_FDCWD, "/usr/share/locale/pt_PT/LC_MESSAGES/texinfo_document.mo", 
0x564cfdf794a8, 0) = -1 ENOENT (No such file or directory)

The "pt.us-ascii" directory still existed under tp/LocaleData even though
pt had been deleted from po_document.

"rm -r LocaleData/pt.us-ascii" has made the test pass again.

There may have been some mixing of translations between pt.us-ascii and
pt; as you can see, both versions were being opened.  It's another reason
to eliminate the .us-ascii variants, as recently discussed.  I suspect that
some change somewhere had changed which version was being preferred at
some point leading to the change in test result, even though the
translations hadn't changed.

It is something to be aware of when removing translations, that the
directories under LocaleData (not tracked in git) should be deleted
as well.





reply via email to

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