From f1e1ea11eff011bb8832c6c8a3fc88ca981dd404 Mon Sep 17 00:00:00 2001 From: Matteo Pagliazzi Date: Thu, 15 May 2014 23:35:07 +0200 Subject: [PATCH] fix(i18n): super fast fix for i18n issues, REVISIT, cc @lefnire --- script/i18n.coffee | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/script/i18n.coffee b/script/i18n.coffee index 7f332b1505..0feb4baf77 100644 --- a/script/i18n.coffee +++ b/script/i18n.coffee @@ -14,11 +14,10 @@ module.exports = locale = arguments[2] locale = 'en' if (!locale? or (!module.exports.strings and !module.exports.translations[locale])) - string = if (!module.exports.strings) then module.exports.translations[locale][stringName] else module.exports.strings[stringName] if string - if vars then _.template(string, vars) else string + _.template(string, (vars or {})) else stringNotFound = if (!module.exports.strings) then module.exports.translations[locale].stringNotFound else module.exports.strings.stringNotFound _.template(stringNotFound, {string: stringName}) \ No newline at end of file