Skip to content
This repository has been archived by the owner on Jan 2, 2020. It is now read-only.

labels from locales #13

Closed
dryaf opened this issue Sep 20, 2011 · 2 comments
Closed

labels from locales #13

dryaf opened this issue Sep 20, 2011 · 2 comments

Comments

@dryaf
Copy link

dryaf commented Sep 20, 2011

hi,

i ve built my forms with formtastic.
the labels are automatically pulled from the locales file
formtastic.de.yml

de:
formtastic:
titles:
post_details: "Post details"
labels:
v_product:
vid: "Vitd-ID"
pnr: "Artikel-Nummer"
pnr2: "Artikel-Nummer2"
name: "Name"
dscr: "Beschreibung"
unit: "Einheit"
cmnt: "Anmerkungen"
dltm: "Lieferzeit"
price: "Preis"
edit:
title: "Edit title"

How could i tell attrtastic to get the labels from there?

best regards

@dryaf dryaf closed this as completed Sep 20, 2011
@dryaf
Copy link
Author

dryaf commented Sep 20, 2011

i ve just quit using formtastic.yml and used mongoid in the locales. that works for formtastic and attrtastic. great gem by the way :-) love it

de:
  mongoid:


    models:
      v_product: "Viterma-Produkte"


    attributes:
      v_product:
        vid: "Viterma-ID"
        pnr: "Artikel-Nummer"
        pnr2: "Artikel-Nummer2"
        name: "Name"
        dscr: "Beschreibung"
        unit: "Einheit"
        cmnt: "Anmerkungen"
        dltm: "Lieferzeit"
        price: "Preis"

@MBO
Copy link
Owner

MBO commented Sep 26, 2011

Oh, is it really working? That's great then.

Attrtastic uses #human_attribute_name from model, which I thing mongoid overrides to use their own scope for translations.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants