App.SettingsLocaleView = Ember.View.extend
  templateName: 'settings/locale'
  classNames: 'settings-locale'
  classNameBindings: ['current']
  current: (-> @get('locale') is $locale ).property('controller.locale')
  localeFlag: (->
    new Ember.Handlebars.SafeString "<img src=\"#{$assets_path}user/flags/flag-#{@get('locale')}.png\">"
  ).property('locale')
  click: ->
    setLocale @get('locale')
    @set 'controller.locale', @get('locale')
