inveniosoftware / cookiecutter-invenio-rdm

Cookiecutter template for a new InvenioRDM instance.
MIT License
4 stars 33 forks source link

global: add translations folder #242

Closed ppanero closed 2 years ago

ppanero commented 2 years ago

Folder is empty, the user will execute the extract messages first to initialize the corresponding files if they want custom i18n strings.

Question:

Manual steps for it to work (This will be migrated to invenio-cli)

$ pybabel extract --mapping-file=translations/babel.ini --msgid-bugs-address=info@inveniosoftware.org --copyright-holder=CERN --add-comments=NOTE --output-file=translations/messages.pot --input-dirs=./

$ pybabel init --input-file=translations/messages.pot --output-dir=translations/ --locale=de

$ pybabel compile --use-fuzzy --directory=./translations

To update the catalog run:

$ pybabel update --input-file=translations/messages.pot --output-dir=translations/

Application level translations folder is loaded here.

mkdir ~/.virtualenvs/instance-translations/var/instance/translations
cp -R translations/de ~/.virtualenvs/instance-translations/var/instance/translations