import { connect } from 'react-redux'
import merge from 'lodash/merge'
import { setEntity } from '../../lib/actions/entityActions'
import { toggleSessionPopup } from '../../UserSession/actions/SessionActions'
import PledgeForm from '../components/PledgeForm'
import updateAction from '../../lib/Form/actions/updateAction'

const mapStateToProps = function(state, ownProps) {
  return {
    availableTags: assembleTags(ownProps.tags),
    currentUser: state.currentUser,
  }
}

function assembleTags(tags) {
  return tags.map(function(tag) {
    return {
      value: tag.id,
      label: tag.name,
    }
  })
}

const mapDispatchToProps = dispatch => ({
  onLinkClick: function(event) {
    event.preventDefault()

    dispatch(toggleSessionPopup())
    window.scrollTo(0, 0)
  },
})

export default connect(
  mapStateToProps,
  mapDispatchToProps
)(PledgeForm)

@@ -64,16 +64,43 @@
 /merge'%0A
+import I18n from 'i18n-js'%0A
 import %7B
@@ -612,16 +612,37 @@
 el: 
+I18n.t(%60tags.names.$%7B
 tag.name
 ,%0A  
@@ -637,16 +637,19 @@
 tag.name
+%7D%60)
 ,%0A    %7D%0A

Use tag name translations in new pledge form