summaryrefslogtreecommitdiffstats
path: root/lib/parse
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2016-04-27 16:41:17 +0200
committerSamy Pessé <samypesse@gmail.com>2016-04-27 16:41:17 +0200
commit5b342b50ce862a4d60002451e6c1abd09a7b20ce (patch)
treea867e78a06111c24e35ae2f176b334bba23e25b4 /lib/parse
parent869822d180f3fa7bf3a263bc29e280789abfed7c (diff)
downloadgitbook-5b342b50ce862a4d60002451e6c1abd09a7b20ce.zip
gitbook-5b342b50ce862a4d60002451e6c1abd09a7b20ce.tar.gz
gitbook-5b342b50ce862a4d60002451e6c1abd09a7b20ce.tar.bz2
Add language property to book for multilingual
Diffstat (limited to 'lib/parse')
-rw-r--r--lib/parse/parseBook.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/parse/parseBook.js b/lib/parse/parseBook.js
index c30027c..33f19f2 100644
--- a/lib/parse/parseBook.js
+++ b/lib/parse/parseBook.js
@@ -32,14 +32,15 @@ function parseMultilingualBook(book) {
var langList = languages.getList();
return Promise.reduce(langList, function(currentBook, lang) {
- var child = Book.createFromParent(currentBook, lang.getPath());
+ var langID = lang.getID();
+ var child = Book.createFromParent(currentBook, langID);
return Promise(child)
.then(parseIgnore)
.then(parseConfig)
.then(parseBookContent)
.then(function(result) {
- return currentBook.addLanguageBook(lang, result);
+ return currentBook.addLanguageBook(langID, result);
});
}, book);
}