https://github.com/apptension/sheetms
A webpack plugin to parse google sheet files into translation jsons
https://github.com/apptension/sheetms
Last synced: about 2 months ago
JSON representation
A webpack plugin to parse google sheet files into translation jsons
- Host: GitHub
- URL: https://github.com/apptension/sheetms
- Owner: apptension
- License: mit
- Created: 2021-12-04T08:36:43.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-12-06T07:58:03.000Z (over 3 years ago)
- Last Synced: 2025-04-20T04:05:35.637Z (2 months ago)
- Language: JavaScript
- Size: 3.52 MB
- Stars: 4
- Watchers: 4
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SheeTMS - Webpack Plugin
Because managing translations & copy files can be a nightmare, and the available translations services are expensive,
requires a learning process and is difficult to maintain. Spreadsheets are
widely known and a "must have" tool for any organization. Using spreadsheets to keep
your copy and translations is not only free, easy to use and cool, but is the Sheet! 💩## How does it work?
In build time, the plugin fetches all tabs from your Google Spreadsheet and converts the first and second
columns to JSON files, where the name of the tab becomes the file name.That way, you can simply name your tabs as the standard Intl languages (e.g. `en`, `en-GB`, `pl-PL`, etc..)
and you have all your translations files ready to use!## Installation
`npm i @cpburn/google-sheets-to-json` 🎉
## Configuration
```
//Add this config in your plugins in webpack.config.jsnew GoogleSheetToJson({
spreadsheetId: 'mySecretSpreadsheetId',
output: path.join(__dirname, '../src/translations/'),
apiKey: yourApiKey,
forceCreate: isEnvDevelopment
})
````spreadsheetId`: string - The Google Spreadsheet id
`output`: string - The absolute path to create the JSONs
`apiKey`: string - Your Google App api key. [Click here to learn how to create one.](https://developers.google.com/workspace/guides/create-project)
`forceCreate`: boolean - Forces the creation of all translation files. Useful when cold starting a project, and usually
is set to true during development. Defaults to `false`.