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

Fix #10579: i18n: UnboundLocalError is raised on translating raw directive #10581

Merged
merged 1 commit into from Jun 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES
Expand Up @@ -30,6 +30,7 @@ Bugs fixed
* #10520: HTML Theme: Fix use of sidebar classes in ``agogo.css_t``.
* #6679: HTML Theme: Fix inclusion of hidden toctrees in the agogo theme.
* #10566: HTML Theme: Fix enable_search_shortcuts does not work
* #10579: i18n: UnboundLocalError is raised on translating raw directive

Testing
--------
Expand Down
1 change: 1 addition & 0 deletions sphinx/transforms/i18n.py
Expand Up @@ -238,6 +238,7 @@ def apply(self, **kwargs: Any) -> None:
continue # skip if the node is already translated by phase1

msgstr = catalog.gettext(msg)
noqa = False

# See above.
if not isinstance(node, LITERAL_TYPE_NODES):
Expand Down