Skip to content

Instantly share code, notes, and snippets.

@josevalim
Created January 4, 2010 10:02
Show Gist options
  • Save josevalim/268433 to your computer and use it in GitHub Desktop.
Save josevalim/268433 to your computer and use it in GitHub Desktop.
I18n yml format proposal for Rails 3
# This a sample YML file from Rails 2.3. The objective is to propose a yml based on this
# one which will reduce error messsages duplication, as outline in this post:
#
# http://groups.google.com/group/rails-i18n/browse_thread/thread/3085a78831ed8fae
#
# Proposals are available below and also check the forks at the right.
en:
activerecord:
models:
admin: "Admin"
artist: "Artist"
attributes:
admin:
name: "Name"
errors:
messages:
blank: "cannot be blank"
models:
user:
blank: "no blank fields here"
attributes:
name:
blank: "so how people call you?"
# This simply proposes renaming activerecord to models and models to names,
# as first said in Rails I18n group.
en:
models:
names:
admin: "Admin"
artist: "Artist"
attributes:
admin:
name: "Name"
errors:
messages:
blank: "cannot be blank"
models:
user:
blank: "no blank fields here"
attributes:
name:
blank: "so how people call you?"
# Since the problem are the error messages, we could move it to the root namespace,
# and keep all the rest compatible.
en:
activerecord:
models:
admin: "Admin"
artist: "Artist"
attributes:
admin:
name: "Name"
errors:
messages:
blank: "cannot be blank"
models:
user:
blank: "no blank fields here"
attributes:
name:
blank: "so how people call you?"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment