UNPKG

react-intl-po

Version:

Extract POT from react-intl and convert back to json.

16 lines (13 loc) 311 B
import * as R from 'ramda'; import po2json from 'po2json'; const parseFileSync = R.pipe( // 1. Convert po to json format filename => po2json.parseFileSync(filename), // 2. Omit pot epmty head above R.omit(['']), // 3. Omit plural R.mapObjIndexed(R.nth(1)), ); export default { parseFileSync, };