0.5.2 • Published 8 years ago

i18n-gen v0.5.2

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

A CLI utility for generating i18n translation files (.yml and .json) from a single remote/local source

Input source formats

  • Remote Google Spreadsheet published as .tsv source
  • Local .XLSX file

Output locale definition formats

  • YAML (.yml)
  • JSON (.json)

Installation

  • As global utility

    npm install i18n-gen -g

  • Used in NPM project

    npm install i18n-gen --save-dev

Usage

  • Command example

    i18n-gen -p './out' -s https://docs.google.com/spreadsheets/d/1NO-w7UKhIwWCT4VymBnH7xk6VCUKECqB5XNrwt49rUA/pub?output=tsv

    The following files will be generated (defaults to YAML format if not specified):

    ./out/en.i18n.yml

    ./out/zh.i18n.yml

  • JSON option

    i18n-gen -p './out' -f 'json', -s https://docs.google.com/spreadsheets/d/1NO-w7UKhIwWCT4VymBnH7xk6VCUKECqB5XNrwt49rUA/pub?output=tsv

    Expected output:

    ./out/en.json

    ./out/zh.json

NPM script examples

...
"scripts": {
  "test:remote": "i18n-gen -p './out' -s https://docs.google.com/spreadsheets/d/1NO-w7UKhIwWCT4VymBnH7xk6VCUKECqB5XNrwt49rUA/pub?output=tsv",
  "test:local": "i18n-gen -p './out' -s ./test/data-source/i18n-gen-sample-source.xlsx",
  "test:local:json": "i18n-gen -p './out' -f 'json' -s ./test/data-source/i18n-gen-sample-source.xlsx",
  "test:remote:json": "i18n-gen -p './out' -f 'json' -s https://docs.google.com/spreadsheets/d/1NO-w7UKhIwWCT4VymBnH7xk6VCUKECqB5XNrwt49rUA/pub?output=tsv",
}
...
0.5.2

8 years ago

0.5.1

9 years ago

0.5.0

9 years ago

0.4.1

9 years ago

0.4.0

9 years ago

0.3.64

10 years ago

0.3.63

10 years ago

0.3.62

10 years ago

0.3.61

10 years ago

0.3.6

10 years ago

0.3.5

10 years ago

0.3.4

10 years ago

0.3.3

10 years ago

0.3.2

10 years ago

0.3.1

10 years ago

0.3.0

10 years ago

0.2.7

10 years ago

0.2.6

10 years ago

0.2.5

10 years ago

0.2.4

10 years ago