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

Depend on the correct moFile for a given md file. #31

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

derekriemer
Copy link
Member

We need the correct title for a given languages translated documentation, which comes from the moFile. However, the previous version of the build script accidentally depended on a variable assigned inside the for loop which was used to assign the languages actual moFile. This loop variable is assigned inside the loop, and not outside it, is overridden on each iteration, and is not persisted anywhere so we cann reference the correct moFile when we later generate the html. This pr fixes that. in this pr, I create a moByLang dictionary, and store the moFile as a value. The key for this moFile is the language code. That way, the html for language KR depends on the moFile for kr, and not the moFile for whatever language was last assigned in the for loop. That way, if the ES languagges po file updates, the dependency system will correctly attribute that Korean is the language we need to regenenrate HTML for. This also undoes the try/except logic that incorrectly hid the real issue, which was the inappropriate refrencing of a for loop variable that may have never been created.

We need the correct title for a given languages translated documentation, which comes from the moFile. However, the previous version of the build script accidentally depended on a variable assigned inside the for loop which was used to assign the languages actual moFile. This loop variable is assigned inside the loop, and not outside it, is overridden on each iteration, and is not persisted anywhere so we cann reference the correct moFile when we later generate the html. This pr fixes that. in this pr, I create a moByLang dictionary, and store the moFile as a value. The key for this moFile is the language code. That way, the html for language KR depends on the moFile for kr, and not the moFile for whatever language was last assigned in the for loop. That way, if the ES languagges po file updates, the dependency system will correctly attribute that Korean is the language we need to regenenrate HTML for. This also undoes the try/except logic that incorrectly hid the real issue, which was the inappropriate refrencing of a for loop variable that may have never been created.
@josephsl
Copy link
Contributor

josephsl commented Jun 17, 2023 via email

@XLTechie
Copy link
Member

XLTechie commented Jun 17, 2023 via email

@derekriemer
Copy link
Member Author

No worries! Enjoy your travels!

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

Successfully merging this pull request may close these issues.

3 participants