Question

I run django-admin makemessages -l ro -e html,txt,rml in the application's directory (above the locale directory) to generate the PO files. When I open a PO file with Poedit, e.g. locale/ro/LC_MESSAGES/django.po, I can not see where the message is being referenced. The paths from the catalog look like this:

#: admin.py:12 admin.py:23

so Poedit tries to open locale/ro/LC_MESSAGES/admin.py which of course does not exist.

Update:

find -path '*/locale/ro/LC_MESSAGES/django.po' -exec sed --in-place -r '/^#: / s/([a-zA-Z_./]+):([0-9]+)/..\/..\/..\/\1:\2/g' {} \+

fixes the paths, but I would still like to see this problem solved at its core.

I've also reported this on Django's bug tracker.

Was it helpful?

Solution

See the poedit-users mailing list thread (yes, that was the best place to ask).

Update: ​Poedit handles this case correctly since version 1.5.6.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top