First time here? Check out the FAQ!

Revision history  [back]

What do you use for extrarcting messages from javascript files

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.

[

To use makemessages with javascript message in a separate djangojs domain:

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.

What do you use for extrarcting messages from javascript files

There are known issues with gettext message exraction for js files. makemessages skips aronud a third of the messages (in askbot). messages. xgettext does not support js, but can be used with --language=python, but but still skips messages.

[

To use makemessages with javascript message in a separate djangojs domain:

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.