A patch to marshmallow to allow to translate marshmallow messages via GNU gettext
Project description
marshmallow-i18n-messages
A simple library to provide i18n messages for marshmallow validation errors.
Installation
from marshmallow_i18n_messages import add_i18n_to_marshmallow
add_i18n_to_marshmallow()
Usage
After the initialization above, all marshmallow validation errors will be translated to the current babel locale.
Invenio usage
In Invenio, call the statements above on top of the invenio.cfg file, before any other imports.
Contributing new translations
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.poin themarshmallow_i18n_messages/translations/<language>/LC_MESSAGESdirectory - 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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file marshmallow_i18n_messages-0.1.1.tar.gz.
File metadata
- Download URL: marshmallow_i18n_messages-0.1.1.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ccac29d5bb5232c4808e5e6e200f47fb23266cf2c7e9e0181fb8b504b5cf24d
|
|
| MD5 |
194a191f166e47697967bb2bcdc1111d
|
|
| BLAKE2b-256 |
fab04577d7808b8e2509106ec20a0efc1b1aaefaa6aefec5442f34b0857e8333
|
File details
Details for the file marshmallow_i18n_messages-0.1.1-py3-none-any.whl.
File metadata
- Download URL: marshmallow_i18n_messages-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e0fec90834eebd23ad976d8fd7c8255dac7224807ed4ddc8c328827f25a24920
|
|
| MD5 |
64a0f8197cea3c6a9f5879f715102333
|
|
| BLAKE2b-256 |
a0b5be43d549eca78b8c6e5df04acfd518fcffafe75de9d15735b5a407c894e7
|