Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • CAiMIRA CAiMIRA
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 53
    • Issues 53
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 6
    • Merge requests 6
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Issue
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • CAiMIRACAiMIRA
  • CAiMIRACAiMIRA
  • Merge requests
  • !418

Draft: Internationalization: EN-FR

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Luis Aleixo requested to merge feature/internationalization into master Dec 07, 2022
  • Overview 1
  • Commits 27
  • Pipelines 8
  • Changes 24

How to extract new strings to be translated:

Make sure that pybabel is installed:

pip install pybabel

In the caimira/apps directory run the following command:

pybabel extract -F babel-mapping.ini -o locale/base.pot ./

How to update the .po file:

In the caimira/apps directory run the following command:

msgmerge --no-wrap --sort-by-file --output-file=locale/fr/LC_MESSAGES/messages.po locale/fr/LC_MESSAGES/messages.po locale/base.pot

At this stage the translations can be done in the .po file.

How to compile and genera the .mo file:

msgfmt locale/fr/LC_MESSAGES/messages.po --output-file=locale/fr/LC_MESSAGES/messages.mo

Reference: https://st4lk.github.io/en/blog/2015/01/31/tornado-internationalization-and-localization.html

Edited Jan 11, 2023 by Luis Aleixo
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: feature/internationalization