forked from theoephraim/grunt-i18n-gspreadsheet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1bbc942
commit 0bf9d90
Showing
9 changed files
with
192 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ | |
node_modules | ||
npm-debug.log | ||
tmp | ||
tmp_* | ||
locales |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# grunt-i18n-gspreadsheet | ||
# grunt-i18n-spreadsheet | ||
|
||
> Grunt plugin to generate i18n locale files from a google spreadsheet | ||
|
@@ -8,23 +8,23 @@ This plugin requires Grunt `~0.4.1` | |
If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command: | ||
|
||
```shell | ||
npm install grunt-i18n-gspreadsheet --save-dev | ||
npm install grunt-i18n-spreadsheet --save-dev | ||
``` | ||
|
||
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript: | ||
|
||
```js | ||
grunt.loadNpmTasks('grunt-i18n-gspreadsheet'); | ||
grunt.loadNpmTasks('grunt-i18n-spreadsheet'); | ||
``` | ||
|
||
## The "i18n_gspreadsheet" task | ||
## The "i18n_spreadsheet" task | ||
|
||
### Overview | ||
In your project's Gruntfile, add a section named `i18n_gspreadsheet` to the data object passed into `grunt.initConfig()`. | ||
In your project's Gruntfile, add a section named `i18n_spreadsheet` to the data object passed into `grunt.initConfig()`. | ||
|
||
```js | ||
grunt.initConfig({ | ||
i18n_gspreadsheet: { | ||
i18n_spreadsheet: { | ||
options: { | ||
// Task-specific options go here. | ||
}, | ||
|
@@ -87,12 +87,14 @@ Most likely, you will just be writing a single set of locale files from a single | |
|
||
```js | ||
grunt.initConfig({ | ||
i18n_gspreadsheet: { | ||
i18n_spreadsheet: { | ||
my_config: { | ||
options: { | ||
google_account: '[email protected]', | ||
google_password: 'MySuperSecretPassword', | ||
document_key: '0Araic6gTol6SdEtwb1Badl92c2tlek45OUxJZDlyN2c' | ||
google_docs: { | ||
google_account: '[email protected]', | ||
google_password: 'MySuperSecretPassword', | ||
document_key: '0Araic6gTol6SdEtwb1Badl92c2tlek45OUxJZDlyN2c' | ||
} | ||
} | ||
} | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
{ | ||
"name": "grunt-i18n-gspreadsheet", | ||
"name": "grunt-i18n-spreadsheet", | ||
"description": "Grunt plugin to generate i18n locale files from a google spreadsheet", | ||
"version": "0.1.5", | ||
"homepage": "https://github.com/theoephraim/grunt-i18n-gspreadsheet", | ||
"homepage": "https://github.com/theoephraim/grunt-i18n-spreadsheet", | ||
"author": { | ||
"name": "Theo Ephraim", | ||
"email": "[email protected]" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/theoephraim/grunt-i18n-gspreadsheet.git" | ||
"url": "git://github.com/theoephraim/grunt-i18n-spreadsheet.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/theoephraim/grunt-i18n-gspreadsheet/issues" | ||
"url": "https://github.com/theoephraim/grunt-i18n-spreadsheet/issues" | ||
}, | ||
"licenses": [ | ||
{ | ||
"type": "MIT", | ||
"url": "https://github.com/theoephraim/grunt-i18n-gspreadsheet/blob/master/LICENSE-MIT" | ||
"url": "https://github.com/theoephraim/grunt-i18n-spreadsheet/blob/master/LICENSE-MIT" | ||
} | ||
], | ||
"main": "Gruntfile.js", | ||
|
@@ -31,18 +31,27 @@ | |
"grunt-contrib-jshint": "~0.6.0", | ||
"grunt-contrib-clean": "~0.4.0", | ||
"grunt-contrib-nodeunit": "~0.2.0", | ||
"grunt": "~0.4.1" | ||
"grunt": "~0.4.1", | ||
"grunt-contrib-connect": "~0.5.0" | ||
}, | ||
"peerDependencies": { | ||
"grunt": "~0.4.1" | ||
}, | ||
"keywords": [ | ||
"gruntplugin", "grunt", "i18n", "google", "spreadsheet", "gdocs", "locale" | ||
"gruntplugin", | ||
"grunt", | ||
"i18n", | ||
"google", | ||
"spreadsheet", | ||
"gdocs", | ||
"locale" | ||
], | ||
"dependencies": { | ||
"google-spreadsheet": "~0.2.5", | ||
"step": "0.0.5", | ||
"underscore": "~1.5.2", | ||
"mkdirp": "~0.3.5" | ||
"mkdirp": "~0.3.5", | ||
"request": "~2.27.0", | ||
"csv": "~0.3.6" | ||
} | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
key,en,fr,es,comments | ||
!test,en,fr,es,Must be the same as locale -- used for testing | ||
,hello,bonjour,hola,default (en) is empty for testing | ||
,goodbye,Au revoir,Adios, | ||
!newlineTest1,"This item | ||
has a newline in it.",,, | ||
!newlineTest2,"This item | ||
|
||
has 2 newlines in it.",,, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.