Files
mozo-backend/app/assets/javascripts/shared-ember-helpers/translation.js.coffee
T
2015-01-13 13:38:52 +01:00

5 lines
242 B
CoffeeScript

Ember.Handlebars.helper 't', (path, params..., options)->
text = t(path, options.hash)
tag = if options.hash.bare then text else "<span data-t='#{path}' data-t-attributes='#{JSON.stringify(options.hash)}'>#{text}</span>"
tag.htmlSafe()