A simple library to provide i18n messages for marshmallow validation errors.
from marshmallow_i18n_messages import add_i18n_to_marshmallow
add_i18n_to_marshmallow()
After the initialization above, all marshmallow validation errors will be translated to the current babel locale.
In Invenio, call the statements above on top of the invenio.cfg
file, before any other imports.
To contribute new translations/fix translation issues:
- Fork the repository and create a feature branch
- Add your language to build.sh script and create an empty
messages.po
in themarshmallow_i18n_messages/translations/<language>/LC_MESSAGES
directory - Run the build.sh script
- Translate the messages in the generated .po file
- Run the build.sh script again
- Commit the changes, push to your fork and create a pull request