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

Translated pages don't reload correctly while using doc-live-lang #323

Open
yardasol opened this issue Jul 13, 2024 · 2 comments
Open

Translated pages don't reload correctly while using doc-live-lang #323

yardasol opened this issue Jul 13, 2024 · 2 comments
Labels
scipy-24 translations Translation and localization of content

Comments

@yardasol
Copy link
Contributor

yardasol commented Jul 13, 2024

During my work on translating the packaging guide, I followed the instructions in TRANSLATING.md to build a live version of the website using the following command:

nox -s docs-live-lang -- es

When I would save changes in my editor, the session running the live website would appear to catch the changes (the terminal would update), but the actual content appeared to not change! Poking around the noxfile.py (credit to @RobPasMue for this idea), we found that that docs-live-lang is just a wrapper around the docs-live command, which has the form:

nox -s docs-live -- -D language=es

When using this command to run a live webpage, I found that content changed correctly when source files were changed.

To Reproduce

  1. Set up a virtual environment as specified in the Setting Up Your Local Environment section
  2. Start a live website using the docs-live-lang command.
  3. Make some edits to the Spanish-side of one of the .po files (I was using documentation.po) and check to see if the content updates correctly.

If other people are able to reproduce this issue, it might be worth switching the instructions to have contributors use the docs-live command.

System info:

OS: Debian 12
Python 3.10.14
nox 2024.4.15
Text editor: VIM 9.0

@yardasol yardasol changed the title Page doesn´t reload correctly while using doc-live-lang Translated pages don't reload correctly while using doc-live-lang Jul 13, 2024
@flpm
Copy link
Member

flpm commented Jul 13, 2024

Thanks for opening the issue, I will investigate!

@flpm
Copy link
Member

flpm commented Jul 14, 2024

I was able to reproduce the issue on my machine (Pop OS Linux) at first, but the same issue happened with calling doc-lives without the wrapping sessions. After I refreshed the browser while the local server was up, it started working.

My intuition is that it is not related to nox but with Sphinx autobuild. It seems to detect that a file has changed but then decides that there is no need to rebuild the .mo files (the compiled version of the .po files) for the Spanish translation.

I will keep looking.

@willingc willingc added the translations Translation and localization of content label Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scipy-24 translations Translation and localization of content
Projects
None yet
Development

No branches or pull requests

4 participants