New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename template files in Sphinx to use preferred .jinja
suffix.
#12364
base: master
Are you sure you want to change the base?
Rename template files in Sphinx to use preferred .jinja
suffix.
#12364
Conversation
Follow-up to pull request sphinx-doc#11916
Nope, not as easy as reverting a single-commit; I'll revisit this again later. |
…plication and test code" This reverts commit cef1059. Conflicts: sphinx/builders/_epub_base.py sphinx/builders/changes.py sphinx/ext/imgmath.py sphinx/writers/latex.py
… references to '_t'-suffix templates" This reverts commit f0f22fd.
… template detection and rendering" This reverts commit 2a5a9a0. Conflicts: sphinx/ext/imgmath.py sphinx/writers/latex.py
Question: will this mess with localization/translation workflows? Various $ grep -r '_t:' sphinx/locale | sort | head -n 10
sphinx/locale/ar/LC_MESSAGES/sphinx.po:#: sphinx/builders/latex/__init__.py:199 sphinx/templates/latex/latex.tex_t:91
sphinx/locale/ar/LC_MESSAGES/sphinx.po:#: sphinx/domains/std/__init__.py:571 sphinx/templates/latex/latex.tex_t:106
sphinx/locale/ar/LC_MESSAGES/sphinx.po:#: sphinx/templates/latex/longtable.tex_t:52
sphinx/locale/ar/LC_MESSAGES/sphinx.po:#: sphinx/templates/latex/longtable.tex_t:63
sphinx/locale/ar/LC_MESSAGES/sphinx.po:#: sphinx/templates/latex/sphinxmessages.sty_t:10
sphinx/locale/ar/LC_MESSAGES/sphinx.po:#: sphinx/templates/latex/sphinxmessages.sty_t:11
sphinx/locale/ar/LC_MESSAGES/sphinx.po:#: sphinx/templates/latex/sphinxmessages.sty_t:12
sphinx/locale/ar/LC_MESSAGES/sphinx.po:#: sphinx/templates/latex/sphinxmessages.sty_t:13
sphinx/locale/ar/LC_MESSAGES/sphinx.po:#: sphinx/templates/latex/sphinxmessages.sty_t:8
sphinx/locale/ar/LC_MESSAGES/sphinx.po:#: sphinx/templates/latex/sphinxmessages.sty_t:9 |
No problem, these comments are automatically added and updated by the gettext extractor (here a script based on babel, which should maybe be updated). They are only there as an indication for the translators and are not used when looking up for translation of messages. |
Feature or Bugfix
Purpose
.jinja
suffix for templated files within the Sphinx code repository, because they are evaluated as Jinja templates.Detail
_t
suffix (short for 'template') to use.jinja
as the file suffix instead.Relates
.jinja
files #11916.