Skip to content

oldmill1/csvtojson

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

This is used in the process of creating a json file used with react-intl.

Say you receive a PO file from your translation service. "I can't use this" you say. I need it in JSON, in this format:

{
    "id": "test",
    ...
}

So you do po2csv myFile.po translated.csv.

Now you have a CSV. This script takes it from there, and converts that CSV into a JSON file that you can drop in to your react-intl React app.

To use it with default settings, download the file to your Mac and run python main.py.

Current issues:

  • There may be some problems with quotes
  • It adds a comma to the last row of your JSON, which is invalid. I manually nick it for now.

Feel free to help me out by submitting a PR to fix any of the issues above. I may get to it sooner or later.

About

A tool to convert your translated data file in CSV format to JSON

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages