Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

transifexify

inventaire14MIT1.1.0

a little script to remove undefined, null or empty values in a json file to avoid Transifex errors

transifex, json

readme

A little script to remove undefined, null or empty values in a json file to avoid Transifex errors

When submitting a json file to Transifex, if it has null, undefined or '' values, like this one, Transifex will reject your file. This module just generates a file without the key/value pairs with those values.

Additionnally, it will filter-out values on the pattern /^__\w+$/, allowing to use special values in your logic, and have those key/value removed in the file sent to Transifex.

Installation

npm install -g transifexify

How To

It takes json files as input with names like fr.json and creates a fr.transifex.json file that shouldn't throw errors when parsed by Transifex

  • you can pass either one file

    transifexify path/to/lang/files/de.json
    # => path/to/lang/files/de.transifex.json
  • or several

    transifexify path/to/lang/files/*.json
    # => path/to/lang/files/de.transifex.json, path/to/lang/files/fr.transifex.json etc