diff --git a/common/script/i18n.coffee b/common/script/i18n.coffee index edc3ae02c8..3e9b08f01d 100644 --- a/common/script/i18n.coffee +++ b/common/script/i18n.coffee @@ -27,7 +27,7 @@ module.exports = if string try - _.template(string, (clonedVars)) + _.template(string)((clonedVars)) catch e 'Error processing the string. Please see Help > Report a Bug.' else @@ -39,6 +39,6 @@ module.exports = module.exports.translations[locale].stringNotFound try - _.template(stringNotFound, {string: stringName}) + _.template(stringNotFound)({string: stringName}) catch e 'Error processing the string. Please see Help > Report a Bug.' diff --git a/common/script/src/i18n.js b/common/script/src/i18n.js index 315624e76a..3b91ede35b 100644 --- a/common/script/src/i18n.js +++ b/common/script/src/i18n.js @@ -25,7 +25,7 @@ module.exports = { clonedVars.locale = locale; if (string) { try { - return _.template(string, clonedVars); + return _.template(string)(clonedVars); } catch (_error) { e = _error; return 'Error processing the string. Please see Help > Report a Bug.'; @@ -37,7 +37,7 @@ module.exports = { stringNotFound = module.exports.translations[locale] && module.exports.translations[locale].stringNotFound; } try { - return _.template(stringNotFound, { + return _.template(stringNotFound)({ string: stringName }); } catch (_error) { diff --git a/website/public/js/services/guideServices.js b/website/public/js/services/guideServices.js index e442be6199..a8bd144e52 100644 --- a/website/public/js/services/guideServices.js +++ b/website/public/js/services/guideServices.js @@ -184,7 +184,7 @@ function($rootScope, User, $timeout, $state, Analytics) { } _.each(chapters, function(chapter, k){ - _(chapter).flatten().each(function(step, i) { + _(chapter).flattenDeep().each(function(step, i) { step.content = "