translate .js files using gettext

Kentor picture Kentor · Jan 28, 2010 · Viewed 8.3k times · Source

I found this cool js gettext library -> http://code.google.com/p/gettext-js/ but I don't understand how to implement it. I am using poedit to edit the translations and I can see that it works when I checkout the project and run the demo file but when I make changes to the text, the .po files don't get updated and I can't see the new text. Does anybody have any idea? Thanks!

Answer

Mark White picture Mark White · Feb 18, 2010

"I also had to force python in the gettext command":

  1. File|Preferences|Parsers
  2. Edit Python
  3. Edit "List of extensions..":
  4. *.py;*.js
  5. Edit "Parser commend:"
  6. xgettext --language=Python --force-po -o %o %C %K %F

Done.

Thanks for leading me there Kentor :)