Skip to content

Add mdbook-i18n-helpers for multi-lingual support#5

Open
benjamink wants to merge 1 commit intomainfrom
feat/i18n-support
Open

Add mdbook-i18n-helpers for multi-lingual support#5
benjamink wants to merge 1 commit intomainfrom
feat/i18n-support

Conversation

@benjamink
Copy link
Copy Markdown
Owner

Summary

  • Configures book.toml with the gettext preprocessor and xgettext output backend
  • Adds po/messages.pot — the extracted translation template (generated from all source markdown)
  • Updates the GitHub Actions deploy workflow to install mdbook-i18n-helpers (with binary caching) and auto-build a translated site for every po/*.po file found, placing each at book/<lang>/

Adding a new language

# Initialize translation file
msginit -i po/messages.pot -l es -o po/es.po

# Edit po/es.po with Poedit or any PO editor, then commit
# The next deploy will automatically publish Spanish at /es/

Test plan

  • Verify English build still succeeds with no .po files present
  • Add a sample .po file and confirm the translated version builds to book/<lang>/
  • Confirm GitHub Pages deployment succeeds

🤖 Generated with Claude Code

- Configure book.toml with gettext preprocessor and xgettext output
- Add po/ directory with extracted messages.pot template (18k lines)
- Update GitHub Actions workflow to install mdbook-i18n-helpers with
  binary caching and auto-build any po/*.po translation files

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

1 participant