Merge pull request #10581 from tk0miya/10579_i18n_UnboundLocalError

Fix #10579: i18n: UnboundLocalError is raised on translating raw directive
This commit is contained in:
Takeshi KOMIYA
2022-06-26 14:14:36 +09:00
committed by GitHub
2 changed files with 2 additions and 0 deletions

View File

@@ -32,6 +32,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
--------

View File

@@ -238,6 +238,7 @@ class Locale(SphinxTransform):
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):