Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/pydata_sphinx_theme/translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,17 @@ def setup_translators(app: Sphinx):
If we don't detect an HTML-based translator, then we do nothing.
"""
if not app.registry.translators.items():
try:
default_translator_class = app.builder.default_translator_class
except AttributeError:
# some builders, e.g. linkcheck, do not define 'default_translator_class'
return

translator = types.new_class(
"BootstrapHTML5Translator",
(
BootstrapHTML5TranslatorMixin,
app.builder.default_translator_class,
default_translator_class,
),
{},
)
Expand Down
Loading