lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87cyw885iy.fsf@meer.lwn.net>
Date:   Fri, 17 Nov 2023 13:54:29 -0700
From:   Jonathan Corbet <corbet@....net>
To:     Vegard Nossum <vegard.nossum@...cle.com>
Cc:     linux-doc@...r.kernel.org,
        Federico Vaga <federico.vaga@...a.pv.it>,
        Akira Yokosawa <akiyks@...il.com>,
        Carlos Bilbao <carlos.bilbao@....com>,
        Alex Shi <alexs@...nel.org>,
        Yanteng Si <siyanteng@...ngson.cn>,
        Hu Haowen <src.res.211@...il.com>,
        linux-kernel@...r.kernel.org,
        Vegard Nossum <vegard.nossum@...cle.com>
Subject: Re: [PATCH] docs: translations: add translations links when they exist

Vegard Nossum <vegard.nossum@...cle.com> writes:

> 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 with v7.3.0.
>
> Signed-off-by: Vegard Nossum <vegard.nossum@...cle.com>
> ---
>  Documentation/conf.py                         |  2 +-
>  Documentation/sphinx-static/custom.css        |  8 ++
>  .../sphinx/templates/translations.html        | 12 +++
>  Documentation/sphinx/translations.py          | 96 +++++++++++++++++++
>  4 files changed, 117 insertions(+), 1 deletion(-)
>  create mode 100644 Documentation/sphinx/templates/translations.html
>  create mode 100644 Documentation/sphinx/translations.py

OK, this does seem to work.

The naming of the translations definitely needs to change; if we put out
something with "Taiwanese" in it, experience tells me, there will be
objections - and that's not what the translation was called when it was
added.

I'm unsure about putting the languages in the top bar like that; it will
already become pretty wide with the relabeled translations, and may not
look great on a small-screen device.  Perhaps a pulldown would be
better?

The build problem reported by Akira definitely needs to be fixed as
well.

Thanks,

jon

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ