Created
January 4, 2010 10:02
-
-
Save josevalim/268433 to your computer and use it in GitHub Desktop.
I18n yml format proposal for Rails 3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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?" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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