Skip to content

This is a helper app which polls a google spreadsheet and generates JSON or JS files used as translation keys.

Notifications You must be signed in to change notification settings

ddresch/meteor-i18n-monitor

Repository files navigation

i18n-monitor

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 :)

Setup

  1. git clone this repository
  2. setup your google project and private/google-key.pem file following these steps
  3. setup your settings.json file
  4. run i18n-monitor to poll spreadsheet

Supported i18n solutions (packages)

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

settings.json options

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"
    }
  ]
}

Run i18n-monitor

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.

About

This is a helper app which polls a google spreadsheet and generates JSON or JS files used as translation keys.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published