Skip to content

[ENH] Adding translations infrastructure and a word translation#71

Merged
AakashGfude merged 9 commits into
executablebooks:masterfrom
vincentxavier:patch-translations
Feb 2, 2022
Merged

[ENH] Adding translations infrastructure and a word translation#71
AakashGfude merged 9 commits into
executablebooks:masterfrom
vincentxavier:patch-translations

Conversation

@vincentxavier

Copy link
Copy Markdown
Contributor

This is a copy from
sphinx-book-theme.

I'm a bit stuck about how translate only the words that appears in the produced documents while not changing the identifier used in source files.

@welcome

welcome Bot commented Dec 2, 2021

Copy link
Copy Markdown

Thanks for submitting your first pull request! You are awesome! 🤗

If you haven't done so already, check out EBP's Code of Conduct and our Contributing Guide, as this will greatly help the review process.

Welcome to the EBP community! 🎉

@vincentxavier vincentxavier mentioned this pull request Dec 2, 2021
2 tasks
Signed-off-by: Vincent-Xavier JUMEL <vincent-xavier.jumel@ac-paris.fr>
@vincentxavier

Copy link
Copy Markdown
Contributor Author

I think I've get the right place to put the translation.

@vincentxavier

Copy link
Copy Markdown
Contributor Author

Have to rework from . import _ since it creates a circular import

@vincentxavier vincentxavier changed the title Adding translations infrastructure and a word translation Draft: Adding translations infrastructure and a word translation Dec 3, 2021
@vincentxavier

Copy link
Copy Markdown
Contributor Author

I've now tested the translation on my personnal page. I just need to write some tests about the translation, and translate the other strings.

Signed-off-by: Vincent-Xavier JUMEL <vincent-xavier.jumel@ac-paris.fr>
Signed-off-by: Vincent-Xavier JUMEL <endymion@thetys-retz.net>
Signed-off-by: Vincent-Xavier JUMEL <endymion@thetys-retz.net>
@vincentxavier vincentxavier changed the title Draft: Adding translations infrastructure and a word translation Adding translations infrastructure and a word translation Dec 3, 2021
@vincentxavier vincentxavier changed the title Adding translations infrastructure and a word translation [ENH] Adding translations infrastructure and a word translation Dec 3, 2021
@vincentxavier
vincentxavier marked this pull request as draft December 3, 2021 14:12
@vincentxavier
vincentxavier marked this pull request as ready for review December 3, 2021 14:12
Signed-off-by: Vincent-Xavier JUMEL <endymion@thetys-retz.net>
Signed-off-by: Vincent-Xavier JUMEL <endymion@thetys-retz.net>
@mmcky
mmcky requested a review from AakashGfude December 6, 2021 03:28
@codecov-commenter

codecov-commenter commented Dec 6, 2021

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 28.57143% with 30 lines in your changes missing coverage. Please review.

Project coverage is 88.26%. Comparing base (75b4e15) to head (bf7369d).

Files with missing lines Patch % Lines
sphinx_proof/translations/_convert.py 0.00% 30 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #71      +/-   ##
==========================================
- Coverage   96.22%   88.26%   -7.96%     
==========================================
  Files           5        6       +1     
  Lines         318      358      +40     
==========================================
+ Hits          306      316      +10     
- Misses         12       42      +30     
Flag Coverage Δ
pytests 88.26% <28.57%> (-7.96%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@AakashGfude

Copy link
Copy Markdown
Member

I've now tested the translation on my personnal page. I just need to write some tests about the translation, and translate the other strings.

Hi, @vincentxavier thank you for putting this together. Let us know when you write the tests. Also, the link to your personal page to test the translation would be helpful.

@AakashGfude

Copy link
Copy Markdown
Member

Thank you, @vincentxavier , this PR looks good to go. I feel like this line is not necessary for that file https://github.com/executablebooks/sphinx-proof/pull/71/files#diff-1a6b6a088ee724e8830ef4cb8137c12280dcfe891868bcf44ee7d8d1b24926c5R30 . But we can reiterate in follow-up PRs. I will go ahead and merge this one.
Thanks a lot again for adding translations.

@AakashGfude
AakashGfude merged commit e400bd9 into executablebooks:master Feb 2, 2022
@welcome

welcome Bot commented Feb 2, 2022

Copy link
Copy Markdown

Congrats on your first merged pull request in this project! 🎉
congrats

Thank you for contributing, we are very proud of you! ❤️

@dtenbrinck

Copy link
Copy Markdown

Thank you for your contribution! I was looking for exactly this feature and I am happy you implemented translations for sphinx-proof.
Is there a reason, why the directory jsons is not included in the current pip package of version 0.2.0? I had to download the directory from this repository and include it manually to get translations of the proof directives to work.

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.

4 participants