diff --git a/common/script/content/index.coffee b/common/script/content/index.coffee index 28d13f4c30..44607837c0 100644 --- a/common/script/content/index.coffee +++ b/common/script/content/index.coffee @@ -1,13 +1,8 @@ -_ = require 'lodash' api = module.exports + +_ = require 'lodash' moment = require 'moment' -i18n = require '../i18n.coffee' -t = (string, vars) -> - func = (lang) -> - vars ?= {a: 'a'} - i18n.t(string, vars, lang) - func.i18nLangFunc = true #Trick to recognize this type of function - func +t = require './translation.coffee' ### --------------------------------------------------------------- diff --git a/common/script/content/translation.coffee b/common/script/content/translation.coffee new file mode 100644 index 0000000000..e668933f35 --- /dev/null +++ b/common/script/content/translation.coffee @@ -0,0 +1,9 @@ +i18n = require '../i18n.coffee' +t = (string, vars) -> + func = (lang) -> + vars ?= {a: 'a'} + i18n.t(string, vars, lang) + func.i18nLangFunc = true #Trick to recognize this type of function + func + +module.exports = t