Hey! How can I change the translation (.po) in misago-docker?
Hey! How can I change the translation (.po) in misago-docker?
You can create custom directory within misagodocker
named extra_locale
and put your language directory containing the mo
and po files
in it.
Then you can create settings_override.py
file in that directory with those contents:
import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
LOCALE_PATHS = [
os.path.join(BASE_DIR, "extra_locale"),
]
Then reload the site with ./appctl rebuild
Thank you.
Should this still work? I put the files in the /root/misago_docker/misago/misagodocker/extra_locale
folder: for_use_misago_django_hu.po
and, for_use_misago_js-frontend_hu.po
with settings_override.py
with the code but it's not working.
And i do ./appctl rebuild
This is not going to work with Django's translation system ;)
First, you can't just make extra_locale
directory and throw in files into it. Inside the extra_locale
you need to create directory named after locale code of language you are translating for. hu
in your case. Inside hu
directory there has to be extra directory named LC_MESSAGES
. This LC_MESSAGES
directory is where Django is looking for translation files.
Next, you can't name your files anything. Those files must be named django.mo
and djangojs.mo
. You can compile PO
files with translation sources to MO
using manage.py compilemessages -l hu
. But this will not work in misago-docker
. Only with development setup which is available on main repo. :)