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

Build translations from mdbook-i18-helpers #1236

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sakex
Copy link
Collaborator

@sakex sakex commented Sep 22, 2023

Supports mdbook build and mdbook serve. I'd recommend waiting a bit before submitting and let translators try it by manually patching this PR.

It uses google/mdbook-i18n-helpers#84

@sakex sakex requested a review from mgeisler September 22, 2023 11:38
mv book/$po_lang/html book/html/$po_lang
echo "::endgroup::"
done
run: cd book && find . -name "exerciser" -type d -exec bash -c 'zip --recurse-paths ./html/$(dirname {})/comprehensive-rust-exercises.zip {}/comprehensive-rust-exercises/' \;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think this is doing the same thing that the original logic was doing. It looks like the original was putting the archive at book/$po_lang/html/comprehensive-rust-exercises.zip, but with the version you have here they would end up at book/html/$po_lang/comprehensive-rust-exercises.zip. Is this change intentional?

@randomPoison randomPoison added the waiting for author Waiting on the issue author to reply label Nov 8, 2023
@max-heller
Copy link
Contributor

Likely relevant to this is that the publish workflow now passes additional configuration for each language to a mdbook backend (mdbook-pandoc) to render PDFs. We should be sure this maintains the same functionality:

# Include language-specific Pandoc configuration
if [ -f ".github/pandoc/$book_lang.yaml" ]; then
export MDBOOK_OUTPUT__PANDOC__PROFILE__PDF__DEFAULTS=".github/pandoc/$book_lang.yaml"
fi
fi
mdbook build -d "$dest_dir"
if [ -f "$dest_dir/pandoc/pdf/comprehensive-rust.pdf" ]; then
mv "$dest_dir/pandoc/pdf/comprehensive-rust.pdf" "$dest_dir/html/"
fi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for author Waiting on the issue author to reply
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants