How can I detect third party package translations

Third party package translation detection

I’ve made a Django third party app, which I’m using in a Django project, running in Docker Compose. I want to translate ValidationError messages from the app inside the project, but the makemessages command doesn’t detect them. I thought, I’ll just add them manually, but when I call makemessages after that, my manually added translations are commented out.

I’ve looked for solutions, and found those SO-posts

The posts explain that I should be using symlinks, but I have had no success of doing it (same results as above), see an example below:

docker-compose exec web ln -s /usr/local/lib/python3.8/site-packages/mypackage ./

docker-compose exec web python makemessages --locale=da --symlinks

So I’m looking for help, what am I doing wrong or could I do something else? Maybe translate the messages inside the third party app itself like Django Rest Framework does?

I hope you can help, very much looking forward for anything that can point me in the right direction.

Niels Bach

i think the link command, must be part of your docker setup?