0.5.2 • Published 5 years ago
i18n-gen v0.5.2
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
5 years ago
0.5.1
7 years ago
0.5.0
7 years ago
0.4.1
7 years ago
0.4.0
7 years ago
0.3.64
8 years ago
0.3.63
8 years ago
0.3.62
8 years ago
0.3.61
8 years ago
0.3.6
8 years ago
0.3.5
8 years ago
0.3.4
8 years ago
0.3.3
8 years ago
0.3.2
8 years ago
0.3.1
8 years ago
0.3.0
8 years ago
0.2.7
8 years ago
0.2.6
8 years ago
0.2.5
8 years ago
0.2.4
8 years ago