This commit is contained in:
psychobunny
2016-02-23 13:33:46 -05:00
parent 1dba781923
commit 75917e25b3
11 changed files with 14 additions and 25 deletions

View File

@@ -140,20 +140,11 @@ var fallbackTransport;
}
function renderAndTranslate(tpl, params, lang, callback) {
async.waterfall([
function(next) {
render('emails/partials/footer' + (tpl.indexOf('_plaintext') !== -1 ? '_plaintext' : ''), params, next);
},
function(footer, next) {
params.footer = footer;
render(tpl, params, next);
},
function(html, next) {
translator.translate(html, lang, function(translated) {
next(null, translated);
});
}
], callback);
render(tpl, params, function(err, html) {
translator.translate(html, lang, function(translated) {
callback(err, translated);
});
});
}
function getHostname() {