I’ve just been pulling my hair out trying to figure out why
makemessages wasn’t working for me. Turns out I was forgetting the
-l flag to specify a locale.
You have to pass either
--all, -a for all locales,
--locale LOCALE, -l LOCALE for a specific locale, or
--exclude EXCLUDE, -x EXCLUDE to exclude a specific locale.
Shouldn’t this command fail in some way if none of the these flags are passed? I’d be happy to try and contribute something if this sounds like a good idea.
The exact command I was running (on Django 2.2.10) was:
django-admin makemessages -d djangojs -i project/static -i node_modules -i dist -i docs
So I wasn’t passing any locale flags, but the command doesn’t output anything pointing out this mistake.