Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

narp

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

narp

The worlds best super translation manager package handler

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
33
increased by3200%
Maintainers
1
Weekly downloads
 
Created
Source

narp

A workflow utility to ease localization in JS(X) apps by automizing the following steps:

narp push

  1. Extraction of strings from source code (react-gettext-parser)
  2. Merging upstream and local translations in order to support translations in branches (pot-merge)
  3. Uploading POT resources to Transifex

narp pull

  1. Download PO translations from Transifex
  2. Converting PO to JSON (gettext-parser)
  3. Writing the JSON translations to where you want it

Installation

To use it easily, install narp globally with:

npm install -g narp

To use it in an automatization pipeline in your project, install it as a dev dependency:

npm install --save-dev narp

Usage

Using the CLI

# extract + merge pots + upload pot
node push
# download po's + convert to json + write to file
node pull

Using the API

import { push, pull } from 'narp';

push();

pull();

Configuration in .narprc

.narprc is narp's configuration file. There you specify configs for the different tasks that require so.

You only need to specify the configs that you want to overwrite.

The defaults are:

{
  "transifex": {
    "username": null,
    "password": null,
    "project": null,
    "resource": null,
    "sourceLang": "en"
  },
  "extract": {
    "componentPropsMap": { /* react-gettext-parser defaults */ },
    "funcArgumentsMap": { /* react-gettext-parser defaults */ }
  },
  "output": "messages.json"
}

Development

Creating builds

# Create a build from source
npm run build

# Build continuously as you save files
npm run build -- --watch

Making it globally available while testing

cd path/to/narp && npm link

Releases

Follow semver when bumping the version number, commit it and run

npm publish

FAQs

Package last updated on 19 Apr 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc