This is a little helper app which connects to a google spreadsheet and generates JSON or JS files for translation keys.
At the moment there is only the console based version of the app working, which depends on settings.json file as configuration. A simple GUI is work in progress :)
- git clone this repository
- setup your google project and
private/google-key.pem
file following these steps - setup your
settings.json
file - run
i18n-monitor
to poll spreadsheet
anti:i18n Slim solutions for small projects, uses JS Objects
Output Format: js
tap:i18n Pretty complete solution with almost all use-cases covered, uses JSON format
Output Format: json
react-intl A translation solution made for React framework.
Output Format: intl
You will find an example file within the settings.example.json
.
You can define multiple jobs within the JSON file which get exported to the specific folders.
{
"jobs": [
{
"spreadsheetId": "YOUR_SPREADSHEET_ID",
"worksheetIndex": "1",
"serviceEmail": "YOUR_GOOGLE_SERVICE_EMAIL",
"outputFolder": "LOCAL_PATH_TO_YOUR_METEOR_APP_FOLDER",
"validLanguages": ["de","fr","it"],
"pollTimeout": 30000,
"outputFormat": "js",
"outputFileExtension": ".i18n.js"
},
{
"spreadsheetId": "YOUR_SPREADSHEET_ID",
"worksheetIndex": "2",
"serviceEmail": "YOUR_GOOGLE_SERVICE_EMAIL",
"outputFolder": "LOCAL_PATH_TO_YOUR_METEOR_APP_FOLDER",
"validLanguages": ["de","fr","it"],
"pollTimeout": 30000,
"outputFormat": "json",
"outputFileExtension": ".i18n.json"
},
{
"spreadsheetId": "YOUR_SPREADSHEET_ID",
"worksheetIndex": "3",
"serviceEmail": "YOUR_GOOGLE_SERVICE_EMAIL",
"outputFolder": "LOCAL_PATH_TO_YOUR_METEOR_APP_FOLDER",
"validLanguages": ["de","fr","it"],
"pollTimeout": 30000,
"outputFormat": "intl",
"outputFileExtension": ".i18n.js"
}
]
}
git clone https://github.com/ddresch/meteor-i18n-monitor i18n-monitor
cd i18n-monitor
npm install
meteor --settings settings.json
ATTENTION
To run npm install
you need to install at least version 3.0.0 of npm
.