Skip to content

Commit 2c0bd53

Browse files
committed
Fix i18n used in multilingual book
1 parent 6dd7f61 commit 2c0bd53

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/generators/website.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ Generator.prototype.prepareTemplateEngine = function() {
100100
that.env.addFilter('lvl', function(lvl) {
101101
return lvl.split(".").length;
102102
});
103-
that.env.addGlobal('__', that.book.i18n.bind(that.book));
104103

105104
// Add extension
106105
that.env.addExtension('AutoEscapeExtension', new AutoEscapeExtension(that.env));
@@ -238,6 +237,8 @@ Generator.prototype._writeTemplate = function(tpl, options, output, interpolate)
238237

239238
basePath: ".",
240239
staticBase: path.join(".", "gitbook"),
240+
241+
'__': that.book.i18n.bind(that.book)
241242
}, options)
242243
);
243244
})

0 commit comments

Comments
 (0)