Re: docs: "translations" extension breaks "make latexdocs" with 6.1.3<=Sphinx<7.2

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

 



On Mon, 12 Feb 2024, Vegard Nossum <vegard.nossum@xxxxxxxxxx> wrote:
> On 12/02/2024 22:52, Jonathan Corbet wrote:
>> Vegard Nossum <vegard.nossum@xxxxxxxxxx> writes:
>> 
>>> On 12/02/2024 11:28, Vegard Nossum wrote:
>>>> On 12/02/2024 10:52, Akira Yokosawa wrote:
>>>>> While testing update of sphinx_pre_install WRT pyyaml, I noticed build
>>>>> errors in "make latexdocs" against Fedora 39's distro Sphinx (v6.2.1).
>>>
>>>> I think we can solve it by making 'current_language' a true element
>>>> attribute:
>>> [...]
>>>> This is probably more correct anyway.
>>>>
>>>> I'll test this more thoroughly with a full build as I think translations
>>>> won't show up when using SPHINXDIRS= (because the translation is outside
>>>> the source tree) as well as with older/newer Sphinx versions.
>>>
>>> In the end, that first patch caused errors on Sphinx 4.x
>>> ("TypeError: LanguagesNode.__init__() got multiple values for argument
>>> 'current_language'").
>>>
>>> This seems to work across 2.x/3.x/6.x/7.x for me:
>> 
>> It occurs to me that me we should just have conf.py just not load the
>> translations extension at all if the builder is not "html"?
>
> I think we need to, otherwise it will have one of those issues that were
> discovered during the original submission: if you 'make latexdocs'
> first, then 'make htmldocs', the Translations nodes just won't be in the
> saved doctrees and won't be there for the HTML output.

"Note that the current builder tag is not available in conf.py, as it is
created after the builder is initialized."

https://www.sphinx-doc.org/en/master/usage/configuration.html


BR,
Jani.


-- 
Jani Nikula, Intel




[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