Skip to content

jpinkster/properties-to-json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Convert Properties files to JSON

I was working on an app for a client in NativeScript that was a conversion from iOS. This application required 35 language translations in which they had all the translations in iOS .properties files. I received both zipped and unzipped variations from them. Instead of converting these over to JSONs manually, I created this NODE task to do it for me.

Assumption

This task is assume that your properties files will be named similarly to mine ({{string}}_{{locale}}.properties or {{string}}_{{locale}}.properties.zip). I will split the name of the file on _ and grab the second part for the new file name, which will be placed into a json folder. FYI - I am also running the whole object through a sanitizer to remove double escaping that happens in the buffer stream.

How to use

  • Download the repo
  • Run npm install
  • Place your files into the strings folder
  • Run node convert.js

Contributing

If you have ideas, feel free to get in touch and let me know. Or if you want to suggest something, feel free to create a pull request with your ideas.

About

Convert iOS properties files to JSON

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published