Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

👌 Add ability to localize figure caption #14

Merged

Conversation

j123b567
Copy link
Contributor

@j123b567 j123b567 commented Jan 2, 2024

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 ""

Sphinx localization needs node source and line and if it is not present, lozalization step is skipped.
@codecov-commenter
Copy link

codecov-commenter commented Jan 12, 2024

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 ⚠️

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

Additional details and impacted files
@@            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     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@chrisjsewell chrisjsewell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good thanks!

@chrisjsewell chrisjsewell changed the title Add ability to localize figure caption 👌 Add ability to localize figure caption Jan 12, 2024
@chrisjsewell chrisjsewell merged commit e9e3d9a into sphinx-extensions2:main Jan 12, 2024
7 checks passed
@j123b567 j123b567 deleted the fix/figure-caption-lozalization branch February 9, 2024 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants