There are known issues with gettext message exraction for js files. makemessages skips aronud a third of the messages (in askbot). xgettext does not support js, but can be used with --language=python, but still skips messages.
manage.py makemessages -d djangojs -l fr
(makemessages understands that this domain is for messages from js files - by the look of it)
To use xgettext, which works only on individual files:
xgettext --language=python --from-code=utf-8 post.js
I posted a question about the Babel extractor on SO here, which their docs say can be used for js message extraction, but didn't get an answer.
I'm wondering what others who are localizing askbot are using for this, maybe you're using your own concocted script or doing it manually, or you know some better tool.
I thought to raise this here anyway as others might hit the issue.
answered 2012-04-27 04:10:21 -0500zaf
jinja2_makemessages to generate translation pairs and get po files updated. So instead of
makemessages I run
python manage.py jinja2_makemessages --no-wrap -l <language> -e html,py,txt
Create your Q&A site at askbot.com. Managed Askbot hosting at just $15/mo. Dedicated hosting, support contracts, consulting services.create your Q&A site
Asked: 2012-04-27 01:41:33 -0500
Seen: 89 times
Last updated: Apr 27 '12