i18n keyname for f.association #679

Closed
chrissearle opened this Issue Oct 24, 2012 · 1 comment

Comments

Projects
None yet
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 Oct 24, 2012

Closed

Simple form f.association fields field name i18n #13

@nashby nashby closed this in c5f913c Oct 24, 2012

@nashby

This comment has been minimized.

Show comment
Hide comment
@nashby

nashby Oct 24, 2012

Collaborator

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

Collaborator

nashby commented Oct 24, 2012

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

nashby added a commit that referenced this issue Oct 24, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment