2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-08 17:22:31 +03:00

start wrapping text in {{_i}} for translation

This commit is contained in:
Jacob Thornton
2012-01-23 19:55:00 -08:00
parent b4b1ef6839
commit 82de03b67c
10 changed files with 247 additions and 257 deletions
+4 -2
View File
@@ -6,7 +6,7 @@ var layout, pages
// compile layout template
layout = fs.readFileSync(__dirname + '/../templates/layout.mustache', 'utf-8')
layout = hogan.compile(layout)
layout = hogan.compile(layout, { sectionTags: [{o:'_i', c:'i'}] })
// retrieve pages
pages = fs.readdirSync(__dirname + '/../templates/pages')
@@ -18,7 +18,9 @@ pages.forEach(function (name) {
, context = {}
context[name.replace(/\.mustache$/, '')] = 'active'
page = hogan.compile(page)
context._i = true
page = hogan.compile(page, { sectionTags: [{o:'_i', c:'i'}] })
page = layout.render(context, {
body: page
})