pojson

Convert PO files to JSONfiles
Download

pojson Ranking & Summary

Advertisement

  • Rating:
  • License:
  • BSD License
  • Publisher Name:
  • Martijn Faassen
  • Publisher web site:
  • http://codespeak.net/lxml/

pojson Tags


pojson Description

Convert PO files to JSONfiles pojson is a Python tool that allows you to create JSON data (and .js) files from PO files. The JSON and .js files are compatible with the format required by Javascript Gettext. It can be used instead of the Perl-based po2json tool included in this project.Javascript Gettext: http://jsgettext.berlios.de/Basic use:pojson convert < translation_domain > < path/to/po >Generate .js file:pojson convert -j < translation_domain > < path/to/po >Pretty-print output:pojson convert -p < translation_domain > < path/to/po >Help: pojson convert --helpNormally you would send the output to a file, such as:pojson convert myproject something.po > something.jsonpojson convert -j myproject something.po > something.jsNormally pojson will try to guess the encoding of the .po file, but you can also explicitly supply an encoding:pojson convert -e utf-8 myproject something.po > something.json Requirements: · Python What's New in This Release: · Actually got the output wrong so jsgettext couldn't work with it. Fixed. · Some sanity checking that the input file has the .po extension, as evidently polib accepts any file and still gives output...


pojson Related Software