lkml.org 
[lkml]   [2023]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2] docs: translations: add translations links when they exist
From

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.


Vegard

\
 
 \ /
  Last update: 2023-12-15 16:05    [W:0.077 / U:0.968 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site