Skip to main content

Convert PO files to JSON

Project description

pojson

pojson is a 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.

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 --help

Normally you would send the output to a file, such as:

$ pojson convert myproject something.po > something.json

$ pojson convert -j myproject something.po > something.js

Normally 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

Javascript Gettext: http://jsgettext.berlios.de/

CHANGES

0.2 (2011-06-02)

  • Error when referring to non-existent po file

0.1 (2011-05-04)

  • Initial release.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pojson-0.2.tar.gz (34.1 kB view details)

Uploaded Source

File details

Details for the file pojson-0.2.tar.gz.

File metadata

  • Download URL: pojson-0.2.tar.gz
  • Upload date:
  • Size: 34.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pojson-0.2.tar.gz
Algorithm Hash digest
SHA256 bacc7005f8ea64f489c41441d0770d8c0dd96bab9af1c0ac10822a94fbbb8cdd
MD5 0379658a1134587fe059269013752084
BLAKE2b-256 4fecad2345d1aeed21be2fba1a7edf8e48891e467c1fbdea4e9115fef52a20c9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page