diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/classes.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/classes.html.jinja index b6963d17..1aee5fd2 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/classes.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/classes.html.jinja @@ -16,6 +16,7 @@ Context: {% endblock logs %} {% import "language"|get_template as lang with context %} +{#- Language module providing the `t` translation method. -#} {% if config.docstring_section_style == "table" %} {% block table_style scoped %} diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/examples.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/examples.html.jinja index 9c330ec7..48913f80 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/examples.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/examples.html.jinja @@ -16,6 +16,7 @@ Context: {% endblock logs %} {% import "language"|get_template as lang with context %} +{#- Language module providing the `t` translation method. -#}

{{ section.title or lang.t("Examples:") }}

{% for section_type, sub_section in section.value %} diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/functions.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/functions.html.jinja index 40ccb3b0..53bda233 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/functions.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/functions.html.jinja @@ -16,6 +16,7 @@ Context: {% endblock logs %} {% import "language"|get_template as lang with context %} +{#- Language module providing the `t` translation method. -#} {% if config.docstring_section_style == "table" %} {% block table_style scoped %} diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/modules.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/modules.html.jinja index 10a50647..239f7a55 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/modules.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/modules.html.jinja @@ -16,6 +16,7 @@ Context: {% endblock logs %} {% import "language"|get_template as lang with context %} +{#- Language module providing the `t` translation method. -#} {% if config.docstring_section_style == "table" %} {% block table_style scoped %} diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/other_parameters.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/other_parameters.html.jinja index 9b531914..7daabeda 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/other_parameters.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/other_parameters.html.jinja @@ -16,6 +16,7 @@ Context: {% endblock logs %} {% import "language"|get_template as lang with context %} +{#- Language module providing the `t` translation method. -#} {% if config.docstring_section_style == "table" %} {% block table_style scoped %} diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/parameters.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/parameters.html.jinja index 4c5d2681..3de6f4a9 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/parameters.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/parameters.html.jinja @@ -16,6 +16,7 @@ Context: {% endblock logs %} {% import "language"|get_template as lang with context %} +{#- Language module providing the `t` translation method. -#} {% if config.docstring_section_style == "table" %} {% block table_style scoped %} diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/raises.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/raises.html.jinja index 6f81adc9..79024057 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/raises.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/raises.html.jinja @@ -16,6 +16,7 @@ Context: {% endblock logs %} {% import "language"|get_template as lang with context %} +{#- Language module providing the `t` translation method. -#} {% if config.docstring_section_style == "table" %} {% block table_style scoped %} diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/receives.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/receives.html.jinja index d2d21e0f..2fcce8ef 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/receives.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/receives.html.jinja @@ -16,6 +16,7 @@ Context: {% endblock logs %} {% import "language"|get_template as lang with context %} +{#- Language module providing the `t` translation method. -#} {% if config.docstring_section_style == "table" %} {% block table_style scoped %} diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/returns.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/returns.html.jinja index b6573d94..8feeb054 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/returns.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/returns.html.jinja @@ -16,6 +16,7 @@ Context: {% endblock logs %} {% import "language"|get_template as lang with context %} +{#- Language module providing the `t` translation method. -#} {% if config.docstring_section_style == "table" %} {% block table_style scoped %} diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/warns.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/warns.html.jinja index c9294aaf..6143257d 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/warns.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/warns.html.jinja @@ -16,6 +16,7 @@ Context: {% endblock logs %} {% import "language"|get_template as lang with context %} +{#- Language module providing the `t` translation method. -#} {% if config.docstring_section_style == "table" %} {% block table_style scoped %} diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/yields.html.jinja b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/yields.html.jinja index 30326a3d..d326c1fe 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring/yields.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring/yields.html.jinja @@ -16,6 +16,7 @@ Context: {% endblock logs %} {% import "language"|get_template as lang with context %} +{#- Language module providing the `t` translation method. -#} {% if config.docstring_section_style == "table" %} {% block table_style scoped %} diff --git a/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/attributes.html.jinja b/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/attributes.html.jinja index c3586f6a..8df20e1c 100644 --- a/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/attributes.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/attributes.html.jinja @@ -1,8 +1,22 @@ +{#- Template for "Attributes" sections in docstrings. + +This template renders a list of documented attributes in the format +specified with the [`docstring_section_style`][] configuration option. + +Context: + section (griffe.docstrings.dataclasses.DocstringSectionAttributes): The section to render. +-#} + {% block logs scoped %} + {#- Logging block. + + This block can be used to log debug messages, deprecation messages, warnings, etc. + -#} {{ log.debug() }} {% endblock %} {% import "language"|get_template as lang with context %} +{#- Language module providing the `t` translation method. -#} diff --git a/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/other_parameters.html.jinja b/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/other_parameters.html.jinja index 339a0cee..4b416b65 100644 --- a/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/other_parameters.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/other_parameters.html.jinja @@ -1,8 +1,22 @@ +{#- Template for "Other parameters" sections in docstrings. + +This template renders a list of documented other parameters in the format +specified with the [`docstring_section_style`][] configuration option. + +Context: + section (griffe.docstrings.dataclasses.DocstringSectionAttributes): The section to render. +-#} + {% block logs scoped %} + {#- Logging block. + + This block can be used to log debug messages, deprecation messages, warnings, etc. + -#} {{ log.debug() }} {% endblock %} {% import "language"|get_template as lang with context %} +{#- Language module providing the `t` translation method. -#}
diff --git a/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/parameters.html.jinja b/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/parameters.html.jinja index ad69e78a..10bbd7ba 100644 --- a/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/parameters.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/parameters.html.jinja @@ -1,8 +1,22 @@ +{#- Template for "Parameters" sections in docstrings. + +This template renders a list of documented parameters in the format +specified with the [`docstring_section_style`][] configuration option. + +Context: + section (griffe.docstrings.dataclasses.DocstringSectionAttributes): The section to render. +-#} + {% block logs scoped %} + {#- Logging block. + + This block can be used to log debug messages, deprecation messages, warnings, etc. + -#} {{ log.debug() }} {% endblock %} {% import "language"|get_template as lang with context %} +{#- Language module providing the `t` translation method. -#}
diff --git a/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/raises.html.jinja b/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/raises.html.jinja index ae7f38dc..f350bc97 100644 --- a/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/raises.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/raises.html.jinja @@ -1,8 +1,22 @@ +{#- Template for "Raises" sections in docstrings. + +This template renders a list of documented exceptions in the format +specified with the [`docstring_section_style`][] configuration option. + +Context: + section (griffe.docstrings.dataclasses.DocstringSectionAttributes): The section to render. +-#} + {% block logs scoped %} + {#- Logging block. + + This block can be used to log debug messages, deprecation messages, warnings, etc. + -#} {{ log.debug() }} {% endblock %} {% import "language"|get_template as lang with context %} +{#- Language module providing the `t` translation method. -#}
diff --git a/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/receives.html.jinja b/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/receives.html.jinja index a37db154..804a04a0 100644 --- a/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/receives.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/receives.html.jinja @@ -1,8 +1,22 @@ +{#- Template for "Receives" sections in docstrings. + +This template renders a list of documented received values (generators) in the format +specified with the [`docstring_section_style`][] configuration option. + +Context: + section (griffe.docstrings.dataclasses.DocstringSectionAttributes): The section to render. +-#} + {% block logs scoped %} + {#- Logging block. + + This block can be used to log debug messages, deprecation messages, warnings, etc. + -#} {{ log.debug() }} {% endblock %} {% import "language"|get_template as lang with context %} +{#- Language module providing the `t` translation method. -#}
diff --git a/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/returns.html.jinja b/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/returns.html.jinja index 8f7dbd9b..0074327a 100644 --- a/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/returns.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/returns.html.jinja @@ -1,8 +1,22 @@ +{#- Template for "Returns" sections in docstrings. + +This template renders a list of documented returned values in the format +specified with the [`docstring_section_style`][] configuration option. + +Context: + section (griffe.docstrings.dataclasses.DocstringSectionAttributes): The section to render. +-#} + {% block logs scoped %} + {#- Logging block. + + This block can be used to log debug messages, deprecation messages, warnings, etc. + -#} {{ log.debug() }} {% endblock %} {% import "language"|get_template as lang with context %} +{#- Language module providing the `t` translation method. -#}
diff --git a/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/warns.html.jinja b/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/warns.html.jinja index 8ae5eb17..88308b68 100644 --- a/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/warns.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/warns.html.jinja @@ -1,8 +1,22 @@ +{#- Template for "Warns" sections in docstrings. + +This template renders a list of documented warnings in the format +specified with the [`docstring_section_style`][] configuration option. + +Context: + section (griffe.docstrings.dataclasses.DocstringSectionAttributes): The section to render. +-#} + {% block logs scoped %} + {#- Logging block. + + This block can be used to log debug messages, deprecation messages, warnings, etc. + -#} {{ log.debug() }} {% endblock %} {% import "language"|get_template as lang with context %} +{#- Language module providing the `t` translation method. -#}
diff --git a/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/yields.html.jinja b/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/yields.html.jinja index 44670856..bd43955d 100644 --- a/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/yields.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/yields.html.jinja @@ -1,8 +1,22 @@ +{#- Template for "Yields" sections in docstrings. + +This template renders a list of documented yielded values (generators) in the format +specified with the [`docstring_section_style`][] configuration option. + +Context: + section (griffe.docstrings.dataclasses.DocstringSectionAttributes): The section to render. +-#} + {% block logs scoped %} + {#- Logging block. + + This block can be used to log debug messages, deprecation messages, warnings, etc. + -#} {{ log.debug() }} {% endblock %} {% import "language"|get_template as lang with context %} +{#- Language module providing the `t` translation method. -#}
diff --git a/src/mkdocstrings_handlers/python/templates/readthedocs/_base/language.html.jinja b/src/mkdocstrings_handlers/python/templates/readthedocs/_base/language.html.jinja index 9c03b815..5b643726 100644 --- a/src/mkdocstrings_handlers/python/templates/readthedocs/_base/language.html.jinja +++ b/src/mkdocstrings_handlers/python/templates/readthedocs/_base/language.html.jinja @@ -1,6 +1,12 @@ +{#- Import translation macros for the given language and fallback language. -#} + {% block logs scoped %} + {#- Logging block. + + This block can be used to log debug messages, deprecation messages, warnings, etc. + -#} {% endblock logs %} - + {% set lang_pth = "languages/" ~ locale | get_template %} {% if lang_pth is existing_template %} {% import lang_pth as lang %} @@ -9,4 +15,4 @@ {% else %} {% import "languages/en"|get_template as lang %} {% macro t(key) %}{{ lang.t(key) }}{% endmacro %} -{% endif %} \ No newline at end of file +{% endif %}