Skip to content
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

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

jayaddison
Copy link
Contributor

Feature or Bugfix

  • Refactoring

Purpose

  • Use the more transparent (as in: easier and less ambiguous to understand) .jinja suffix for templated files within the Sphinx code repository, because they are evaluated as Jinja templates.

Detail

  • Rename files that had a _t suffix (short for 'template') to use .jinja as the file suffix instead.

Relates

@jayaddison
Copy link
Contributor Author

Nope, not as easy as reverting a single-commit; I'll revisit this again later.

@jayaddison jayaddison marked this pull request as draft May 9, 2024 23:32
…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
@jayaddison
Copy link
Contributor Author

Question: will this mess with localization/translation workflows? Various .po files refer to the template file paths:

$ 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

@n-peugnet
Copy link
Contributor

n-peugnet commented May 12, 2024

Question: will this mess with localization/translation workflows? Various .po files refer to the template file paths:

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants