Posted about 6 years ago. Visible to the public.

Use the same translations for ActiveRecord and ActiveModel

ActiveRecord translations live in locale.activerecord. ActiveModel translations live in locale.activemodel. To use the same translations for both, use YAML references with & and *:

Copy
de: models: &models user: 'Benutzer' attributes: &attributes user: email: 'E-Mail' errors: &errors format: ! '%{attribute} %{message}' messages: accepted: muss akzeptiert werden blank: muss ausgefüllt werden # ... activerecord: errors: *errors models: *models attributes: *attributes activemodel: errors: *errors models: *models attributes: *attributes

makandra has been working exclusively with Ruby on Rails since 2007. Our laser focus on a single technology has made us a leader in this space.

Owner of this card:

Avatar
Henning Koch
Last edit:
about 6 years ago
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Henning Koch to makandra dev
This website uses cookies to improve usability and analyze traffic.
Accept or learn more