All of lore.kernel.org
 help / color / mirror / Atom feed
From: Akira Yokosawa <akiyks@gmail.com>
To: Vegard Nossum <vegard.nossum@oracle.com>
Cc: alexs@kernel.org, carlos.bilbao@amd.com, corbet@lwn.net,
	federico.vaga@vaga.pv.it, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, siyanteng@loongson.cn,
	src.res.211@gmail.com, Jani Nikula <jani.nikula@linux.intel.com>,
	Akira Yokosawa <akiyks@gmail.com>
Subject: Re: [PATCH] docs: translations: add translations links when they exist
Date: Fri, 3 Nov 2023 09:09:28 +0900	[thread overview]
Message-ID: <272c0cfc-188a-41c7-9ba1-e1ba0f996298@gmail.com> (raw)
In-Reply-To: <378b0571-a89b-43a2-8921-3f23afa0f254@oracle.com>

On 2023/11/02 20:07, Vegard Nossum wrote:
> On 01/11/2023 15:56, Akira Yokosawa wrote:
>> It looks like this introduces hysteresis in successive runs of
>> "make htmldocs" and "make latexdocs".
>>
>> Steps to reproduce
>>
>>    1. Run "make cleandocs"
>>
>>    2. Run "make htmldocs"
>>
>>    3. Run "make latexdocs"
>>
>> This aborts with the message (under Sphinx 7.2.6):
>>
>>    Extension error (translations):
>>    Handler <function process_languages at 0x7f122f343420> for event 'doctree-resolved' threw an exception (exception: 'LaTeXBuilder' object has no attribute 'templates')
>>    make[2]: *** [Documentation/Makefile:128: latexdocs] Error 2
>>    make[1]: *** [/linux/Makefile:1695: latexdocs] Error 2
>>    make: *** [Makefile:234: __sub-make] Error 2
>>    Command exited with non-zero status 2
>>
>> If I run "make latexdocs" in step 2 and "make htmldocs" in step 3,
>> both runs complete successfully, but html pages don't have the
>> expected links to other translations.
>>
>> All I can do is to report the symptoms.
>> Vegard, can you look into them?
> 
> Thanks for testing this out and reporting!
> 
> I think we can fix this by moving the "is this html output?" check from
> the TranslationsTransform into the 'doctree-resolved' handler (which, as
> far as I can tell, runs after the doctree has been serialized to disk
> but before output is generated).
> 
> I've attached an incremental patch, does that seem to work for you? I> test both (clean/html/latex + clean/latex/html) and it seemed to work here.

Yes, it works here as well.

        Thanks, Akira

> 
> I had a look at using a custom "visit" callback that would just render
> the HTML in place instead of manipulating the doctree, but it also
> doesn't feel right as then you need to specify callbacks for every
> output writer; there doesn't seem to be a way to ignore the node by
> default. Maybe I should ask on the Sphinx/docutils mailing lists what
> the "proper" way to do this would be.
> 
> Thanks again!
> 
> 
> Vegard

  reply	other threads:[~2023-11-03  0:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-28 16:29 [PATCH] docs: translations: add translations links when they exist Vegard Nossum
2023-10-28 18:51 ` Vegard Nossum
2023-11-03  2:00   ` Yanteng Si
2023-10-30 11:30 ` Federico Vaga
2023-10-30 17:11 ` Jani Nikula
2023-11-01 14:56 ` Akira Yokosawa
2023-11-02 11:07   ` Vegard Nossum
2023-11-03  0:09     ` Akira Yokosawa [this message]
2023-11-17 20:54 ` Jonathan Corbet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=272c0cfc-188a-41c7-9ba1-e1ba0f996298@gmail.com \
    --to=akiyks@gmail.com \
    --cc=alexs@kernel.org \
    --cc=carlos.bilbao@amd.com \
    --cc=corbet@lwn.net \
    --cc=federico.vaga@vaga.pv.it \
    --cc=jani.nikula@linux.intel.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=siyanteng@loongson.cn \
    --cc=src.res.211@gmail.com \
    --cc=vegard.nossum@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.