Django Makeallmessages
Django Makeallmessages allows you to set default arguments to your makemessage commands and covers all
the regular file extensions, including your JavaScript files, with one command!
❌ Don't do this
$ python manage.py makemessages --locale=en
--locale=fr
--ignore=tests/*
$ python manage.py makemessages --locale=en
--locale=fr
--ignore=node_modules/*
--ignore=tests/*
--domain=djangojs
✅ Do this!
$ python manage.py makeallmessages
Overview
Requirements
Django Makeallmessages requires Django 2.2 or later.
Fetching It
You can get Django Makeallmessages by using pip
$ pip install django-makeallmessages
To install it from source, clone the repository and run setup.py
$ git clone git://github.com/vonNiklasson/django-makeallmessages.git
$ cd django-makeallmessages
$ python setup.py install
Installation
To add django_makeallmessages to your project you must first add it to INSTALLED_APPS
in the projects settings.py file
INSTALLED_APPS = (
...
'django_makeallmessages',
...
)
Configuration
You can configure default values to be used when running makeallmessages. This is done by setting
the MAM_DEFAULTin your projects settings.py file.
Example:
MAM_DEFAULT = {
"locale": ["en", "fr"],
"extension": ["php", "twig"],
"ignore": ["node_modules/*", "tests/*"],
"no_wrap": True
}
The default settings are all derived from the arguments used in the standard makemessages command.
Available parameters:
locale(list): A list locales you want to make messages from.extension(list): A list of extensions you want to include, beyond the standard extensions (html,txt,py,js)ignore(list): A list of files or directories to ignore matching a glob-style pattern.no_wrap(bool): A boolean that decides whether to not break long message lines into several lines.
Command line arguments
Two additional CLI arguments has been added to the makeallmessages apart from the default ones
derived from makemessages.
The makeallmessages command is derived from the default makemessages, which means that you can still use any arguments
that are valid for makemessages as well.
--no-mam-default: Will ignore any default values set in theMAM_DEFAULTsetting.--quiet, -q: Suppresses any output when running the command. Fatal errors will still be printed.
Metadata
Release files for django-makeallmessages 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-makeallmessages-0.2.1.tar.gz | 4.9 kB | Without provenance | Details for django-makeallmessages-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_makeallmessages-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for django_makeallmessages-0.2.1-py3-none-any.whl |
Total release size: 11.2 kB
Release files / django-makeallmessages-0.2.1.tar.gz
| Download URL | django-makeallmessages-0.2.1.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
da8725eb265e3202d1751e8540a25cb105162bf2de93211d801563dffe4d4d29
|
|
BLAKE2b-256 checksum How to use checksums |
d0d7e5f2dbe339a752d08a0fade32cf42f6ff0aadc63a62f87cd2b3ba28ebd74
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6
|
Release files / django_makeallmessages-0.2.1-py3-none-any.whl
| Download URL | django_makeallmessages-0.2.1-py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4326a06ad3c11024ab72306c85beb71799bfd7b8cbaff9e6c1386d1c1556f87f
|
|
BLAKE2b-256 checksum How to use checksums |
06fd0b610c823c1251562a18a6d70c284e4e8f99d58b30524758a3d48c4edeec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6
|
Security for django-makeallmessages 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.