sphinx-extensions2 / sphinx-subfigure

A sphinx extension to create figures with multiple images
https://sphinx-subfigure.readthedocs.io
MIT License
12 stars 4 forks source link

👌 Add ability to localize figure caption #14

Closed j123b567 closed 8 months ago

j123b567 commented 9 months ago

Sphinx localization needs node source and line and if it is not present, localization step is skipped.

If the source looks like (MyST markdown)

::::{subfigure} A

:::{image} img1.png
:alt: Subfigure caption
:width: 100px
:::

Figure caption
::::

Then after running make gettext, this .pot file is generated

#: ../../index.md:1
msgid "Subfigure caption"
msgstr ""

After applying the PR, this .pot file is generated

#: ../../index.md:1
msgid "Subfigure caption"
msgstr ""

#: ../../index.md:8
msgid "Figure caption"
msgstr ""
codecov-commenter commented 8 months ago

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (fb52892) 80.65% compared to head (c79156f) 79.78%.

Files Patch % Lines
src/sphinx_subfigure/main.py 0.00% 4 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #14 +/- ## ========================================== - Coverage 80.65% 79.78% -0.88% ========================================== Files 5 5 Lines 274 277 +3 ========================================== Hits 221 221 - Misses 53 56 +3 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.