@$translations ||= {}

# dummy implementation of real client side translations
@t ||= (path, vars={}) ->
  parts = path.split('.')
  parts[parts.length - 1]

@t_substitute_params ||= (msg, params)->
  for variable, value of params
    msg = msg.replace("%{#{variable}}", value)
  msg

