pipe-translator

0.0.26 • Public • Published

pipe-translator

The pipe-translator is a React.js app with an express server that reads i18n.json files from a project and visualizes their content. It therefore makes it possible for you to view and edit translation messages for each module in your project.

Installation

  1. Run $ npm install pipe-translator in your project directory
  2. Add "translate": "pipe-translator start",to the "scripts" in your package.json

Usage

  1. Run $ npm run translate in your project directory
  2. Open your browser on localhost:6001 and you can start editing the module translations
  3. In your project each i18n.json file needs to have following structure for the pipe-translator to work
{
  "name": "Module name",
  "description": "Discribe your module", 
  "i18n": [
    {
      "id": "Hello string",
      "description": "Discribe your string",
      "length": "250",
      "message": {
        "en-us": "Hello {World}",
        "de-de": "Hallo {Welt}"
      }
    }
  ]
}

Development

  1. Install your local pipe-translator with running $ npm install path/to/your/pipe-translator in your test project
  2. Add "translate": "pipe-translator start",to the "scripts" in the package.json of your test project. The server will now be started and sources its 18nfiles from your test project. When making server updates rerun this command.
  3. Run $ npm run start in your local pipe-translator to see your development changes of the react app.
  4. Update the react app in the src folder
  5. Update the version number in package.json and bin/pipe-translator.js
  6. Run $ npm run build
  7. Copy /build folder inside /static
  8. Publish the repository directory on npm

Readme

Keywords

none

Package Sidebar

Install

npm i pipe-translator

Weekly Downloads

0

Version

0.0.26

License

none

Unpacked Size

9.43 kB

Total Files

6

Last publish

Collaborators

  • pipe-modules
  • tom-morse