Skip to content

Loading…

i18n keyname for f.association #679

Closed
chrissearle opened this Issue · 1 comment

2 participants

@chrissearle

Suspect I'm missing something obvious here.

In the model:

  belongs_to :composer

On the view (haml):

    = f.input :title
    = f.input :soloists
    = f.association :composer

In the translation file:

    labels:
      defaults:
        title: 'Song Title'
        soloists: 'Soloist(s)'
        composer: 'Composer Name'

For the two text fields I get the correct i18n name
For the composer field - I get a real nice dropdown - but the label "Composer" - looks like it's the auto-generated name for fields without an i18n key.

Am not seeing what key needs to be given to match for form fields made with f.association - would love someone to point me in the right direction :)

Versions - rails 3.2.8, simple_form 2.0.4

@chrissearle chrissearle referenced this issue in chrissearle/notearkiv
Closed

Simple form f.association fields field name i18n #13

@nashby nashby closed this in c5f913c
@nashby

@chrissearle I've just fixed it in master branch. For now you can use composer_id: 'Composer Name' in your locale file. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.