fix(i18n): recognize t() funcs

This commit is contained in:
Matteo Pagliazzi
2014-05-15 23:11:52 +02:00
parent 78589f9af4
commit 77c7e1aa93
2 changed files with 7 additions and 2 deletions
+3 -1
View File
@@ -3,9 +3,11 @@ api = module.exports
moment = require 'moment'
i18n = require './i18n.coffee'
t = (string, vars) ->
(lang) ->
func = (lang) ->
vars ?= lang
i18n.t(string, vars, lang)
func.i18nLangFunc = true #Trick to recognize this type of function
func
###
---------------------------------------------------------------