Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • R reproducible-website
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 20
    • Issues 20
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Reproducible BuildsReproducible Builds
  • reproducible-website
  • Merge requests
  • !56

Add i18n support

  • Review changes

  • Download
  • Patches
  • Plain diff
Closed Michael Pöhn requested to merge uniqx/reproducible-website:i18n into master Apr 24, 2020
  • Overview 38
  • Commits 1
  • Pipelines 24
  • Changes 14

This adds support for gettext (po) based internationalization using po4a and jekyll-polyglot.

The URLs for the original English text won't change. Each translating will be available within a separate sub-folder. eg: the french translation of /who will be available under /fr/who.

Right now this is configured to en default language and de as the sole active translation. (I didn't translate any texts so it's basically empty.) To enable an additional language it must be added in _config.yml and you have to run bin/i18n.sh to generate po/*.po files for that language.

po4a is currently configured to only publish translated sites where at leat 90% of the text is translated.

This also adds a language chooser to the navbar. It's using a dropdown menu from bootstrap and the translations-icon from the google material design icons library.

This is how the site looks like when a couple of translation-languages are enabled:

Edited Aug 19, 2020 by Michael Pöhn
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: i18n