You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug #2880 adds captions of toctrees into translations and it works well for visible toctrees. However, when toctrees are hidden, captions can still be seen in templates like sphinx_rtd_theme, however, no texts are added to po files and thus we cannot translate those captions.
To Reproduce
The index.rst is
.. test_toc documentation master file, created by sphinx-quickstart on Fri Mar 15 13:44:35 2019. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive.
Welcome to test_toc's documentation!
====================================
.. toctree::
:maxdepth:2:caption:Contents::hidden:content
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
After executing make gettext, the corresponding pot file is generated:
# SOME DESCRIPTIVE TITLE.# Copyright (C) 2019, Wenjun Si# This file is distributed under the same license as the test_toc package.# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.##,fuzzymsgid ""msgstr ""
"Project-Id-Version: test_toc \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-03-15 13:46+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#:../../source/index.rst:7msgid"Welcome to test_toc's documentation!"msgstr""#:../../source/index.rst:19msgid"Indices and tables"msgstr""#:../../source/index.rst:21msgid":ref:`genindex`"msgstr""#:../../source/index.rst:22msgid":ref:`modindex`"msgstr""#:../../source/index.rst:23msgid":ref:`search`"msgstr""
which does not include the string Contents:. However, the generated HTML page does include this string in navigation div, and it cannot be translated:
Environment info
OS: MacOS
Python version: 3.7.2 (Miniconda)
Sphinx version: 1.8.5
Additional context
I dive into the code of sphinx and discover that I18nBuilder ignores hidden tocs when writing pots. I will submit a PR to solve this.
The text was updated successfully, but these errors were encountered:
Describe the bug
#2880 adds captions of toctrees into translations and it works well for visible toctrees. However, when toctrees are hidden, captions can still be seen in templates like
sphinx_rtd_theme
, however, no texts are added topo
files and thus we cannot translate those captions.To Reproduce
The
index.rst
isAfter executing
make gettext
, the corresponding pot file is generated:which does not include the string
Contents:
. However, the generated HTML page does include this string in navigation div, and it cannot be translated:Environment info
Additional context
I dive into the code of sphinx and discover that I18nBuilder ignores hidden tocs when writing pots. I will submit a PR to solve this.
The text was updated successfully, but these errors were encountered: