Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pushed g11n further so it did work with non-EN (credits + updated wor…
…kshopper modules)
- Loading branch information
Showing
12 changed files
with
71 additions
and
32 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 |
---|---|---|
@@ -1,15 +1,26 @@ | ||
var fs = require('fs'); | ||
var path = require('path'); | ||
var colors = require('colors-tmpl'); | ||
const fs = require('fs') | ||
, path = require('path') | ||
, colorsTmpl = require('colors-tmpl') | ||
, combinedStream = require('combined-stream') | ||
|
||
function read (file) { | ||
return fs.createReadStream(path.join(__dirname, file), {encoding: 'utf8'}) | ||
} | ||
|
||
function credits () { | ||
fs.readFile(path.join(__dirname, './credits.txt'), 'utf8', function (err, data) { | ||
if (err) { | ||
throw err; | ||
} | ||
console.log(colors(data)); | ||
}); | ||
function credits (workshopper) { | ||
combinedStream | ||
.create() | ||
.append(read ('./i18n/credits/' + workshopper.lang + '.header.txt')) | ||
.append(read ('./credits.txt')) | ||
.append(read ('./i18n/credits/' + workshopper.lang + '.footer.txt')) | ||
.on("error", function (err) { | ||
console.log(err) | ||
throw err | ||
}) | ||
.on("data", function (data) { | ||
console.log(colorsTmpl(data)) | ||
}) | ||
.resume() | ||
} | ||
|
||
module.exports = credits; | ||
module.exports = credits |
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,9 +1,4 @@ | ||
{yellow}{bold}You can learn generators due to this people:{/bold}{/yellow} | ||
|
||
{bold}Name GitHub Twitter{/bold} | ||
-------------------------------------------- | ||
Ruslan Ismagilov @isRuslan @is_ruslan | ||
Ilia Akhmadullin @i_akhmadullin @i_akhmadullin | ||
Max Ogden @maxogden @maxogden | ||
|
||
{yellow}{bold}Rod Vagg (@rvagg){/yellow}{/bold} made this workshopper framework (⌐■_■) | ||
Ruslan Ismagilov @isRuslan @is_ruslan | ||
Ilia Akhmadullin @i_akhmadullin @i_akhmadullin | ||
Max Ogden @maxogden @maxogden | ||
Christophe Porteneuve @tdd @porteneuve |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
{yellow}{bold}Rod Vagg (@rvagg){/yellow}{/bold} made this workshopper framework (⌐■_■) |
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,4 @@ | ||
{yellow}{bold}You can learn generators due to this people:{/bold}{/yellow} | ||
|
||
{bold}Name GitHub Twitter{/bold} | ||
----------------------------------------------------- |
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,2 @@ | ||
|
||
{yellow}{bold}Rod Vagg (@rvagg){/yellow}{/bold} a réalisé le framework d’ateliers (⌐■_■) |
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,4 @@ | ||
{yellow}{bold}Vous pouvez apprenre les générateurs grâce à ces personnes :{/bold}{/yellow} | ||
|
||
{bold}Nom GitHub Twitter{/bold} | ||
----------------------------------------------------- |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"title": "Apprenez les Générateurs", | ||
"subtitle": "Une intro aux générateurs ES6 via des exercices autonomes.", | ||
"menu": { | ||
"credits": "CRÉDITS" | ||
}, | ||
"error": { | ||
"didnt_use_generators": "On dirait que vous n’avez pas utilisé les générateurs (ಠ_ಠ)", | ||
"has_generators": "{red}Vous avez besoin de Node.js >= 0.11.x ou io.js >= 1.0.x pour utiliser les générateurs.{/red}\n\nCeci peut vous être utile :\n {bold}nvm{/bold} https://github.com/creationix/nvm\n {bold}n{/bold} https://github.com/tj/n" | ||
}, | ||
"exercise": { | ||
"RUN STOP RUN": "DÉPART ARRÊT DÉPART", | ||
"GENERATOR ITERATOR": "ITÉRATEUR GÉNÉRATEUR", | ||
"DELEGATING GENERATORS": "DÉLÉGATION DE GÉNÉRATEURS", | ||
"CATCH ERROR!": "RATTRAPE L'ERREUR !", | ||
"LOOK SYNC. DO ASYNC.": "AIE L'AIR SYNC. RESTE ASYNC.", | ||
"LOOK SYNC. MAKE PROMISE.": "AIE L'AIR SYNC. FAIS UNE PROMESSE." | ||
} | ||
} |
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
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