9 lines
399 B
CoffeeScript
9 lines
399 B
CoffeeScript
App.THelper = Ember.Helper.helper (params, options)->
|
|
path = params[0]
|
|
toptions = options
|
|
if params.length > 1 and typeof(params[1].serialize) is 'function'
|
|
$.extend toptions, params[1].serialize()
|
|
text = t(path, toptions)
|
|
tag = if options.bare then text else "<span data-t='#{path}' class='translation' data-t-attributes='#{JSON.stringify(toptions)}'>#{text}</span>"
|
|
tag.htmlSafe()
|