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

Tab headers not translated after building with a valid po-file #137

Open
Nikulinnn opened this issue Aug 24, 2021 · 9 comments · May be fixed by #142
Open

Tab headers not translated after building with a valid po-file #137

Nikulinnn opened this issue Aug 24, 2021 · 9 comments · May be fixed by #142
Labels

Comments

@Nikulinnn
Copy link

Nikulinnn commented Aug 24, 2021

Describe the problem

Tab headers are generated to po files and therefore can be translated. However, translations do not apply once building the translated version.

I am not sure if this is a problem within the extension or not, but any hints on how to fix it would much appreciated.

PS thanks for a great extension!

Link to your repository or website

No response

Steps to reproduce

  1. Add a tabs directive to the document, for example:
.. tabs::

   .. tab:: Техническая поддержка

      Служба технической поддержки круглосуточно готова ответить на ваши вопросы.    
  1. Generate a po file.
  2. Add the translation of the corresponding string
msgid "Техническая поддержка"
msgstr "Service Desk"
  1. Build the localized version of the document.
  2. Check out for the absence of the tab header translation:

image

The version of Python you're using

No response

Your operating system

No response

Versions of your packages

No response

Additional context

No response

@Nikulinnn Nikulinnn added the bug label Aug 24, 2021
@welcome
Copy link

welcome bot commented Aug 24, 2021

Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.

If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).

Welcome to the EBP community! 🎉

@foster999
Copy link
Collaborator

Thanks for raising this 😊 it looks like sphinx has a translatable node type which might help here. I'll add this in, but may ask you to run the change with an example as I'm not familiar with building with translation!

@Nikulinnn
Copy link
Author

@foster999 , I will gladly test the change once it is available. Thank you very much for taking the time to work on this issue!

@foster999
Copy link
Collaborator

Thanks @Nikulinnn, please could you try with branch 137-translatable-tabs? This can be installed using pip install git+https://github.com/executablebooks/sphinx-tabs.git@137-translatable-tabs.

Failing this, please could you provide (or point to) a minimal example that I can run for testing.

@Nikulinnn
Copy link
Author

@foster999 , thank you for the update!
Unfortunately, this fix did not solve the issue.
I will make and attach an archive with an example for testing.
Thanks once again for taking the time to fix this issue. I will be right back.

@migasQ
Copy link

migasQ commented Feb 2, 2022

@Nikulinnn Hi! Did you had time to check whats going wrong in the solution? Or should I provide some test files? Stumbling on the same issue as well.

@Nikulinnn
Copy link
Author

@migasQ , I am sorry for the delay in my answer. I have not had the time to provide a test example so far. I will be able to get back to this subject in a couple weeks. If you happen to have the time to provide an example prior this time, please, do so.

@migasQ
Copy link

migasQ commented Mar 20, 2022

No problem, here's an example I compiled. Need to run pip first with the requirements.txt file (there are some unnecessary packages in the requirements.txt but I had no time to clean it up). When building it with make html (default German) and make -e SPHINXOPTS="-D language='en'" html (English) you will notice that the tab headers are not translated:
example_tab

Example: example_tab.tar.gz

@jcs-odoo
Copy link

Hi, and thanks for this great extension! I am also interested in being able to translate tab headings, although I don't think I can help much, apart from testing the fix :)

Thanks, and have a great day!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants