❯ cat index.md
# Test
:::{button-ref} ref
:ref-type: ref
:outline:
Some text
:::
(ref)=
## Header
❯ cat conf.py
project = "test"
extensions = [
"myst_parser",
"sphinx_design",
]
myst_enable_extensions = [
"colon_fence",
"deflist",
"substitution",
"html_image",
]
html_theme = "sphinx_book_theme"
locale_dirs = ["locales/"]
❯ sphinx-build . _build/html -b html
Running Sphinx v4.3.0
loading pickled environment... done
myst v0.15.2: MdParserConfig(renderer='sphinx', commonmark_only=False, enable_extensions=['colon_fence', 'deflist', 'substitution', 'html_image'], dmath_allow_labels=True, dmath_allow_space=True, dmath_allow_digits=True, dmath_double_inline=False, update_mathjax=True, mathjax_classes='tex2jax_process|mathjax_process|math|output_area', disable_syntax=[], url_schemes=['http', 'https', 'mailto', 'ftp'], heading_anchors=None, heading_slug_func=None, html_meta=[], footnote_transition=True, substitutions=[], sub_delimiters=['{', '}'], words_per_minute=200)
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 1 source files that are out of date
updating environment: 0 added, 1 changed, 0 removed
reading sources... [100%] index
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] index
generating indices... genindex done
writing additional pages... search done
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded.
The HTML pages are in _build/html.
❯ cat locales/de/LC_MESSAGES/index.po
# SOME DESCRIPTIVE TITLE.
# Copyright (C)
# This file is distributed under the same license as the test package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2021.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: test \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-26 22:08+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.9.1\n"
#: ../../index.md:1
msgid "Test"
msgstr ""
#: ../../index.md:3
msgid "Some text"
msgstr "Irgendein Text"
#: ../../index.md:12
msgid "Header"
msgstr "Title"
❯ sphinx-build . _build/html/de -b html -Dlanguage=de
Running Sphinx v4.3.0
loading translations [de]... done
making output directory... done
myst v0.15.2: MdParserConfig(renderer='sphinx', commonmark_only=False, enable_extensions=['colon_fence', 'deflist', 'substitution', 'html_image'], dmath_allow_labels=True, dmath_allow_space=True, dmath_allow_digits=True, dmath_double_inline=False, update_mathjax=True, mathjax_classes='tex2jax_process|mathjax_process|math|output_area', disable_syntax=[], url_schemes=['http', 'https', 'mailto', 'ftp'], heading_anchors=None, heading_slug_func=None, html_meta=[], footnote_transition=True, substitutions=[], sub_delimiters=['{', '}'], words_per_minute=200)
building [mo]: targets for 1 po files that are out of date
writing output... [100%] locales/de/LC_MESSAGES/index.mo
building [html]: targets for 1 source files that are out of date
updating environment: [new config] 1 added, 0 changed, 0 removed
reading sources... [100%] index
/home/awvwgk/projects/src/git/docu-fpm/test/index.md:3: WARNING: inconsistent term references in translated message. original: ['ref'], translated: []
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] index
generating indices... genindex done
writing additional pages... search done
copying static files... done
copying extra files... done
dumping search index in German (code: de)... done
dumping object inventory... done
build succeeded, 1 warning.
The HTML pages are in _build/html/de.
Describe the problem
CSS classes are dropped from button-ref when translating the label. The gettext replacement should only replace the button label rather than the complete directive creating the button.
Link to your repository or website
https://github.com/awvwgk/fpm-docs/blob/main/pages/index.md
Steps to reproduce
Steps to reproduce
Original document:
Translated
button-ref:The version of Python you're using
3.9.7
Your operating system
Linux
Versions of your packages
Environment file: https://github.com/awvwgk/fpm-docs/blob/main/environment.yaml
Additional context
No response