Metadata-Version: 2.4
Name: marshmallow-i18n-messages
Version: 0.1.1
Summary: A patch to marshmallow to allow to translate marshmallow messages via GNU gettext
Home-page: https://github.com/oarepo/marshmallow-i18n-messages
Author: Miroslav Simek
Author-email: miroslav.simek@cesnet.cz
Project-URL: Bug Tracker, https://github.com/oarepo/marshmallow-i18n-messages/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: marshmallow
Requires-Dist: marshmallow-utils
Requires-Dist: babel
Requires-Dist: speaklater
Provides-Extra: tests
Requires-Dist: pytest; extra == "tests"
Provides-Extra: dev
Requires-Dist: polib; extra == "dev"
Dynamic: license-file

# marshmallow-i18n-messages

A simple library to provide i18n messages for marshmallow validation errors.

## Installation

```python
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:

1. Fork the repository and create a feature branch
2. Add your language to build.sh script and create an empty `messages.po` 
   in the `marshmallow_i18n_messages/translations/<language>/LC_MESSAGES` directory
3. Run the build.sh script
4. Translate the messages in the generated .po file
5. Run the build.sh script again
6. Commit the changes, push to your fork and create a pull request
