Re: [PATCH] docs: translations: use attribute to store current language

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

 



On Thu, 15 Feb 2024 07:41:09 +0100, Vegard Nossum wrote:
> Akira Yokosawa reported [1] that the "translations" extension we added in
> commit 7418ec5b151f ("docs: translations: add translations links when they
> exist") broke the build on Sphinx versions v6.1.3 through 7.1.2 (possibly
> others) with the following error:
> 
>     Exception occurred:
>       File "/usr/lib/python3.12/site-packages/sphinx/util/nodes.py", line 624, in _copy_except__document
>         newnode = self.__class__(rawsource=self.rawsource, **self.attributes)
>                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>     TypeError: LanguagesNode.__init__() missing 1 required positional argument: 'current_language'
>     The full traceback has been saved in /tmp/sphinx-err-7xmwytuu.log, if you want to report the issue to the developers.
> 
> Solve this problem by making 'current_language' a true element attribute
> of the LanguagesNode element, which is probably the more correct way to do
> it anyway.
> 
> Tested on Sphinx 2.x, 3.x, 6.x, and 7.x.
> 
> [1]: https://lore.kernel.org/all/54a56c2e-a27c-45a0-b712-02a7bc7d2673@xxxxxxxxx/

Let me add a couple of tags below.

> 
> Fixes: 7418ec5b151f ("docs: translations: add translations links when they exist")
> Reported-by: Akira Yokosawa <akiyks@xxxxxxxxx>
> Signed-off-by: Vegard Nossum <vegard.nossum@xxxxxxxxxx>
Closes: https://lore.kernel.org/all/54a56c2e-a27c-45a0-b712-02a7bc7d2673@xxxxxxxxx/
Tested-by: Akira Yokosawa <akiyks@xxxxxxxxx>  # Sphinx 4.3.2, 5.3.0 and 6.2.1

        Thanks, Akira

> ---
>  Documentation/sphinx/translations.py | 10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)





[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux