Files
mozo-backend/app/assets/javascripts/shared-ember-helpers/translation.js.coffee
T

5 lines
222 B
CoffeeScript

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