mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vegard Nossum <vegard.nossum@oracle.com>
To: Jonathan Corbet <corbet@lwn.net>
Cc: linux-doc@vger.kernel.org, Carlos Bilbao <carlos.bilbao@amd.com>,
	Alex Shi <alexs@kernel.org>, Hu Haowen <src.res.211@gmail.com>,
	linux-kernel@vger.kernel.org,
	Federico Vaga <federico.vaga@vaga.pv.it>,
	Jani Nikula <jani.nikula@linux.intel.com>,
	Akira Yokosawa <akiyks@gmail.com>,
	Yanteng Si <siyanteng@loongson.cn>
Subject: Re: [PATCH v2] docs: translations: add translations links when they exist
Date: Fri, 15 Dec 2023 16:11:16 +0100	[thread overview]
Message-ID: <cd45200a-7e9f-4a97-88a2-6d66408fe81d@oracle.com> (raw)
In-Reply-To: <db501d4f-f922-4a78-8496-858ac528df9e@oracle.com>


On 15/12/2023 16:04, Vegard Nossum wrote:
> 
> On 15/12/2023 13:37, Vegard Nossum wrote:
>> Add a new Sphinx extension that knows about the translations of kernel
>> documentation and can insert links to the translations at the top of
>> the document.
>>
>> It basically works like this:
>>
>> 1. Register a new node type, LanguagesNode.
>>
>> 2. Register a new transform, TranslationsTransform, that inserts a new
>>     LanguageNode at the top of every document. The LanguageNode contains
>>     "pending references" to translations of the document. The key here
>>     is that these are pending (i.e. unresolved) references that may or
>>     may not actually exist.
>>
>> 3. Register a 'doctree-resolved' event that iterates over all the
>>     LanguageNode nodes. Any unresolved references are filtered out; the
>>     list of resolved references is passed to the 'translations.html'
>>     template and rendered as an HTML node (if HTML output is selected).
>>
>> Testing: make htmldocs, make latexdocs with Sphinx v4.3.2 and Firefox.
> 
> Oh no, there's still a problem. If I run make htmldocs, make latexdocs,
> make htmldocs, then all the translation menus disappear from the HTML.
> 
> So ignore this for now.
> 
> If anybody has a solution feel free to respond with it.

Wait, no, I was accidentally browsing the wrong site *facepalm*

It works and the v2 patch is still correct, as far as I can tell.

I have covid and a fever so chalking it down to that. I will stop
posting until I'm recovered.


Vegard

  reply	other threads:[~2023-12-15 15:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-15 12:37 Vegard Nossum
2023-12-15 15:04 ` Vegard Nossum
2023-12-15 15:11   ` Vegard Nossum [this message]
2023-12-19 21:46 ` 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=cd45200a-7e9f-4a97-88a2-6d66408fe81d@oracle.com \
    --to=vegard.nossum@oracle.com \
    --cc=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 \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®