ruby on rails - Best practice for sharing translation of Active Record attributes -
i have following yaml in 1 of translation files:
se: activerecord: attributes: user: name: "namn" town: "stad" admin: name: "namn" level: "nivå" pet: name: "namn" company: name: "namn" food: name: "namn"
is there way me dry , share translation of name
across models? bonus points if can remove entries pet
, company
, food
completely.
se: common: &common name: "namn" activerecord: attributes: user: <<: *common town: "stad" admin: <<: *common level: "nivå" pet: <<: *common company: <<: *common food: <<: *common
Comments
Post a Comment