Skip to content

Add tool which can build translations for all available languages #13

@mgeisler

Description

@mgeisler

The mdbook-gettext preprocessor translates a book into a single language. To translate your book into all available languages, you need to build a look yourself. An example of this can be found in the publish.yml GitHub action for Comprehensive Rust 🦀:

      - name: Build all translations
        run: |
          for po_lang in ${{ env.LANGUAGES }}; do
              echo "::group::Building $po_lang translation"
              MDBOOK_BOOK__LANGUAGE=$po_lang \
              MDBOOK_OUTPUT__HTML__SITE_URL=/comprehensive-rust/$po_lang/ \
              mdbook build -d book/$po_lang
              echo "::endgroup::"
          done

We should make this easier somehow. Idea:

  • Build a small command line tool (perhaps called mdbook-i18n) where mdbook-i18n build would do the looping seen above.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requesthelp wantedExtra attention is needed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions