For the Django project I am working on I created a translation named en-ORGNAME that reflects the specific English jargon at use at the target organization. I use multiple instances of this application for multiple organizations and want to be able to customize the jargon according to the client organization.
It started of pretty nice, after running django makemessages -l en_ORGNAME I ended up with a .po file that I could translate. Running compilemessages made sure I have to .mo file as well.
The application only uses the LANGUAGE_CODE setting to determine language (no context processor or URLs). The locale path is set to
LOCALE_PATHS = (
os.path.join(BASE_DIR, 'locale'),)
When I run the application (using docker-compose and the development server) all works well and my translations show up as expected. However, when I deploy the application (using the same docker image) using Rancher the custom translation stops working. I have used an environment variable to set the language at container level and all other languages work fine.
I have tested the same stack in development (NGINX, Gunicorn, Django) and my custom translation works. I have tried adding the custom translation to the django.conf.locale dictionary (as per Add custom language for localization in Django app). Made no difference what so ever. With or without the adjusted locale dictionary the custom translations work on development but don't work on production.
Any ideas are more than welcome.
compilemessages
are indeed present and accessible (file permissions). At which point are you running compilemessages (in docker-entrypoint.sh e.g.?). Can you make it so that there is more verbose output from compilemessages during startup so that you can verify that it is indeed generating the files as expected. – Risadinha